1
0

initial commit

This commit is contained in:
2025-02-26 07:33:14 +01:00
commit 13e794f44b
21 changed files with 515 additions and 0 deletions

27
midi_in_gate.scd Normal file
View File

@ -0,0 +1,27 @@
(
MIDIClient.init;
MIDIIn.connectAll;
MIDIFunc.trace(true);
)
(
~synths = Array.fill(127, nil);
MIDIdef.noteOn(\on, {
arg val, num, chan,src;
if(~synths[num] == nil, { // To be absolutely save
~synths[num] = Synth(\supersaw, [
\amp, 0.1,
\freq, num.midicps,
\harm, exprand(4,20)]);
});
});
MIDIdef.noteOff(\off, {
arg val, num, chan,src;
if(~synths[num] != nil, { // To be absolutely safe
~synths[num].set(\gate, 0);
~synths[num] = nil; // Remove the reference
});
});
)