// title: Fifths (QuNeo demo) // author: Bruno Ruviaro // description: // playing Pbinds with a MIDI controller (QuNeo, etc). // code: // Running Fifths // (QuNeo demo) // // // Ctrl + A, then Ctrl + Enter s.waitForBoot({ MIDIIn.connectAll; a = Array.fill(8, {arg count; [count, count+7] }); f = {arg velocity, midinote; var notes = if(midinote>=44, {a.reverse+midinote}, {a+midinote}); p = Pbind( \midinote, Pstutter(Pwrand([1, 3, 5], [0.1, 0.8, 0.1], inf), Pseq(notes)), \dur, 0.1, \amp, velocity/127 * 0.8, \legato, 0.1, \ctranspose, Pstutter(8, Pwhite(0, 36)) ).play(quant: 0.1); }; MIDIdef.noteOn(\test, { arg vel, note; /*note.postln;*/ f.value(vel, note) }); });