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
88 89 90 91 92 93 94 |
# File 'lib/rubySC/musique.rb', line 88 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
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/rubySC/musique.rb', line 96 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 |