Skip to content

Commit

Permalink
added the ability to do arpeggios against chordables
Browse files Browse the repository at this point in the history
  • Loading branch information
rl337 committed Feb 24, 2014
1 parent c421cad commit bd21c53
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/classes/Chordable.ck
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ public class Chordable {

function void play(Chord chord, dur duration, float gain) {
for (0 => int i; i < v.cap(); i++) {
spork ~ v[i].play(chord.note(i), duration, gain);
spork ~ v[i].play(chord.note(i), duration, gain/v.cap());
}

duration => now;
}

function void arpeggio(Chord chord, int sequence[], dur duration, float gain) {
for (0 => int i; i < sequence.cap(); i++) {
v[i].play(chord.note(sequence[i]), duration / sequence.cap(), gain);
}
}

}

0 comments on commit bd21c53

Please sign in to comment.