Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s.quit
- s.boot
- s.options.numInputBusChannels = 32;
- s.options.numOutputBusChannels = 32;
- Server.local.boot
- (
- ~root_note = 60 - 7; // F
- ~funk = {
- arg note_num, velocity;
- {
- var freq = ~root_note.midicps;
- var env = Env([ 0, 1, 0.5, 1, 0 ], [ 0.01, 0.5, 0.02, 0.5 ]);
- /* "--".postln;
- note_num.postln;
- velocity.postln;
- "--".postln;*/
- freq = freq * note_num / velocity;
- SinOsc.ar( freq, 0, 0.05 ) * EnvGen.kr( env, doneAction: 2 ) !2
- }.play
- };
- // ~ Cirklon on the hood!
- MIDIIn.connectAll;
- //MIDIIn.disconnectAll
- n = MIDIFunc.noteOn({
- arg velocity, note_num, channel;
- ~funk.value(note_num,velocity)
- });
- //n.free;
- c = MIDIFunc.cc({
- arg value, cc;
- ~root_note = value;
- });
- //c.free;
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement