Last active
June 19, 2016 15:10
-
-
Save multivac61/0571d154eedc9d9aa829ddab45b402e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A code snippet to show how one way to | |
// seperate incoming MIDI CC signals and the | |
// server side. | |
( | |
MIDIIn.connectAll; | |
a = Bus.control(s); | |
MIDIdef.cc(\cc_test, { |src, chan, num, value| | |
[src, chan, num, value, src.linexp(0, 127, 10, 10000)].postln; | |
a.set(src.linexp(0, 127, 10, 10000)); | |
} //, cc_number | |
); | |
SynthDef(\sin, {|out=0, freqq| | |
var freq = Lag3.kr(freqq); | |
var sig = SinOsc.ar(freq)!2; | |
Out.ar(out, sig); | |
}).add; | |
) | |
l = Synth(\sin, [\freqq, a.asMap]); | |
SynthDef(\sin, {|out=0, amp, myVar| | |
var freq = Lag3.kr(a.kr); | |
var sig = SinOsc.ar(freq)!2; | |
Out.ar(out, sig); | |
}).add; | |
) | |
l = Synth(\sin); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment