module Marche

module pour gérer des marches.

Public Class Methods

marcheChromatique(intervalles, voix) click to toggle source
# File lib/rubySC/musique.rb, line 87
def self.marcheChromatique  intervalles, voix

  nbFois=SC.listeVoix[voix.name].degree.length
  voix.setRoot ({"root" => "Pstutter(#{nbFois}, Pseq(#{intervalles}, inf))"})
  SC.updateScore

end
marcheDiatonique(voix, intervalle) click to toggle source
# File lib/rubySC/musique.rb, line 95
def self.marcheDiatonique voix, intervalle

  melodie=SC.listeVoix[voix].degree

  tmp= Array.new(intervalle.size) do |x|
    t=melodie.map { |note|
      if note.is_a? Array then
        note.map do |y| y+intervalle[x] end
      else
        note+intervalle[x]*x
      end }
    "Pseq(#{t})"
  end

  SC.updater voix, "degree", "[#{tmp.join(',')}]"
  SC.listeVoix[voix].information="en marche ! ..."

end