Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (
- var master, low, high, lowN, highN, player;
- TempoClock.tempo = 1;
- master = Pbind(
- \type, \midi,
- \midiout, m,
- \sustain, 1,
- );
- lowN = 33;
- highN = 6;
- low = Pbindf(
- master,
- \chan, 0,
- \midinote, Pclump(Pseq([1, Pwhite(6, 9, 1)], inf), Pwhite(36, 48)),
- \dur, Pser([Pwhite(4, 8, 1), Pwhite(12, 24, 1)], lowN),
- \tracker, Pseq((1..lowN)),
- \reporter, Pfunc({
- arg thisEvent;
- "low: % of %".format(thisEvent.tracker, lowN).postln;
- }),
- );
- high = Pbindf(
- master,
- \chan, 1,
- \midinote, [56, 68, 80] - Prand([0, 1], inf),
- \dur, Pwhite(7, 13, highN),
- \tracker, Pseq((1..highN)),
- \reporter, Pfunc({
- arg thisEvent;
- "high: % of %".format(thisEvent.tracker, highN).postln;
- }),
- );
- player = Ptpar([
- 60 * 0, low,
- 60 * 1, high,
- 60 * 3, high,
- 60 * 5, high,
- ]).play;
- )
- Pseq([Pwhite(4, 8, 1), Pwhite(12, 24, 1)], inf).asStream.nextN(30).sum / 60;
- Pwhite(7, 13).asStream.nextN(6).sum / 60;
- (0..15).do{|i| m.allNotesOff(i)};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement