refactor eventshortener

This commit is contained in:
2024-05-12 23:02:39 +02:00
parent 18487a52f5
commit 25745504b2
3 changed files with 65 additions and 58 deletions

40
with_midi.scd Normal file
View File

@ -0,0 +1,40 @@
MIDIClient.destinations;
m
(
~test => [ sp: "kick", nb: 0 ];
~test.play;
)
(
~test = Pbind(
\instrument, 'splayer',
\sp, Bank("kick")[0],
);
~test.play;
)
(
~test >> [
pat: "0 2 3 4",
midiout: m
];
~test.play;
)
(
m = MIDIOut.newByName("MIDI", "Bus 1");
~test >> [ pat: "0 2 3 4", midiout: m ];
~test.play;
)
(
~baba = Pbind(
\type, \midi,
[\trig, \delta, \dur, \str, \num], Pmini("[1 2 3 4]/2"),
\degree, Pfunc({ |e| if(e.trig > 0) { e.str.asInteger } { \rest } }),
\midiout, m
);
~baba.play;
)