Browse files

udpated tone_row_melody example to use Durations constants

  • Loading branch information...
1 parent f5b10a8 commit 1d3d5568e15f7c77d0a25c108bf824dba50412a3 @adamjmurray committed Jul 8, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 examples/tone_row_melody.rb
View
3 examples/tone_row_melody.rb
@@ -6,12 +6,13 @@
require 'mtk/midi/file'
include MTK
include PitchClasses
+include Durations
file = ARGV[0] || 'MTK-tone_row_melody.mid'
row = PitchClassSet(Db, G, Ab, F, Eb, E, D, C, B, Gb, A, Bb)
pitch_pattern = Pattern.PitchCycle *row
-rhythm_pattern = Pattern.RhythmCycle(Pattern.Choice 0.25, 0.5, 0.75, 1) # choose between sixteenth, eighth, dotted eighth, and quarter
+rhythm_pattern = Pattern.RhythmCycle(Pattern.Choice s, e, e+s, q) # choose between sixteenth, eighth, dotted eighth, and quarter
sequencer = Sequencer::RhythmicSequencer.new [pitch_pattern, rhythm_pattern], :max_steps => 36
timeline = sequencer.to_timeline

0 comments on commit 1d3d556

Please sign in to comment.