Class: Zgomot::Comp::Note::Progression
- Defined in:
- lib/zgomot/comp/note.rb
Instance Method Summary collapse
Instance Method Details
#notes(prog) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/zgomot/comp/note.rb', line 4 def notes(prog) count = -1 prog.items.map do |d| count += 1; idx_length, idx_velocity = count % prog.length.length, count % prog.velocity.length pitch = d.eql?(:R) ? :R : prog.pitches[d-1] Zgomot::Midi::Note.new(:pitch => pitch, :length => prog.length[idx_length], :velocity => prog.velocity[idx_velocity]) end end |