Skip to content

Instantly share code, notes, and snippets.

@triss
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triss/712d425f64e143b90d94 to your computer and use it in GitHub Desktop.
Save triss/712d425f64e143b90d94 to your computer and use it in GitHub Desktop.
~synths = Array.fill(13, { Synth(\mainSynth) });
~sequence = Array.fill(13, { Array.fill(16, 0) })
// step through sequence
Tdef(\sequencePlayer, {
loop {
16.do {
arg i;
// here's the iterator for the different sequences
13.do {
arg j;
// if step is on trigger synth, otherwise close synths gate
if(sequence[j][i] == 1) {
~synths[j].set(\gate, 1);
} {
~synths[j].set(\gate, 0);
};
};
0.25.wait;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment