[sc-users] [linux] send midi-in to a controlbus
nescivi
nescivi at gmail.com
Sun Oct 7 15:39:56 PDT 2007
Hi,
On 10/7/07, Constantin Popp <constantin.popp at googlemail.com> wrote:
>
> 'm trying to route an incomming midi-controller-value to an control bus
> which is supposed to control the out-volume of an synth. i just don't hear
> anything which means the value of the out-volume stays zero.
>
>
> this is the code:
>
>
> SynthDef("testBus", { arg bus;
> var ovalue;
> CCResponder({
> arg src, chan, num, value;
> Out.kr(bus,value);
> }, nil, nil, nil, nil);
>
> }).send(s);
CCResponder is not something you can use inside a SynthDef.
Please check the helpfile for it, for an example of how to use it.
it should look something like this:
b = Bus.control(s,1);
CCResponder({
arg src, chan, num, value;
b.set( value );
}, nil, nil, nil, nil);
then it should work.
sincerely,
Marije
PS, this is not a linux specific question!
SynthDef("testMidiIn", { arg bus, freqOffset = 200, vol = 0.25;
> var sig, volme;
> In.kr(bus).scope;
> sig = SinOsc.ar(freqOffset, 0, 0.9 * Lag.kr(In.kr(bus),0.25 ));
> Out.ar(0, sig);
> }).send(s);
>
> b = Bus.control(s,1);
> x = Synth.new("testBus", [\bus, b.index]);
>
> y = Synth.after(x, "testMidiIn",[\bus, b.index])
>
>
>
> thanx for you help.
> constantin popp
>
>
> _______________________________________________
> sc-users mailing list
> sc-users at create.ucsb.edu
> http://www.create.ucsb.edu/mailman/listinfo/sc-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.create.ucsb.edu/pipermail/sc-users/attachments/20071007/e0beed81/attachment.htm
More information about the sc-users
mailing list