Module: Marche
- Defined in:
- lib/rubySC/musique.rb
Overview
module pour gérer des marches.
Class Method Summary collapse
Class Method Details
.marcheChromatique(intervalles, voix) ⇒ Object
100 101 102 103 104 105 106 |
# File 'lib/rubySC/musique.rb', line 100 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) ⇒ Object
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/rubySC/musique.rb', line 108 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 |