Quantcast

Bus control and if statement

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bus control and if statement

paulss83
This post was updated on .
Hello,
I need to some help about this code:

~midival = Bus.control(s, 1);
~fader1;
(
MIDIClient.init;
MIDIIn.connectAll;
MIDIIn.control = { arg src, chan, num, val;
        [~midichan.set(chan), ~midinum.set(num), ~midival.set(val)].postln};
)



(
//start first buffer with the same control input buses
{
        var in2, delay, vol;
        if (~midichan == 0 && ~midinum == 13, ~fader1 = ~midival);
        in2 = SoundIn.ar(1, ~fader1.kr/127);
        delay = AllpassC.ar(in2, 2, [0.1, 0.15], 500);
        Out.ar(0, Pan2.ar(in2)) + delay
}.play;
)

With if statement i had select a specific fader's controller but it does not work becouse all faders work...
What's the problem?
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bus control and if statement

Nathan Ho
Hi paulss83,

Sorry, but this is not in the right place. This top-level forum is not used. For subscribers to see your messages, you need to be subscribed to sc-users (or sc-users-acl for non-delivery) and you need to post in the "SuperCollider Users" subforum: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/SuperCollider-Users-New-Use-this-f2676391.html


Nathan

paulss83 wrote
Hello,
I need to some help about this code:

~midival = Bus.control(s, 1);
~fader1;
(
MIDIClient.init;
MIDIIn.connectAll;
MIDIIn.control = { arg src, chan, num, val;
        [~midichan.set(chan), ~midinum.set(num), ~midival.set(val)].postln};
)



(
//start first buffer with the same control input buses
{
        var in2, delay, vol;
        if (~midichan == 0 && ~midinum == 13, ~fader1 = ~midival);
        in2 = SoundIn.ar(1, ~fader1.kr/127);
        delay = AllpassC.ar(in2, 2, [0.1, 0.15], 500);
        Out.ar(0, Pan2.ar(in2)) + delay
}.play;
)

With if statement i had select a specific fader's controller but it does not work becouse all faders work...
What's the problem?
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bus control and if statement

paulss83
Hi Nathan,

I’ve already done this.

Paolo
Il giorno 06/dic/2016, alle ore 00:32, Nathan Ho [via New SuperCollider Mailing Lists Forums (Use These!!!)] <[hidden email]> ha scritto:

Hi paulss83, 

Sorry, but this is not in the right place. This top-level forum is not used. For subscribers to see your messages, you need to be subscribed to sc-users (or sc-users-acl for non-delivery) and you need to post in the "SuperCollider Users" subforum: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/SuperCollider-Users-New-Use-this-f2676391.html


Nathan 

paulss83 wrote
Hello, 
I need to some help about this code: 

~midival = Bus.control(s, 1); 
~fader1; 
( 
MIDIClient.init; 
MIDIIn.connectAll; 
MIDIIn.control = { arg src, chan, num, val; 
        [~midichan.set(chan), ~midinum.set(num), ~midival.set(val)].postln}; 
) 



( 
//start first buffer with the same control input buses 
{ 
        var in2, delay, vol; 
        if (~midichan == 0 && ~midinum == 13, ~fader1 = ~midival); 
        in2 = SoundIn.ar(1, ~fader1.kr/127); 
        delay = AllpassC.ar(in2, 2, [0.1, 0.15], 500); 
        Out.ar(0, Pan2.ar(in2)) + delay 
}.play; 
) 

With if statement i had select a specific fader's controller but it does not work becouse all faders work... 
What's the problem? 
Thank you



To unsubscribe from Bus control and if statement, click here.
NAML

Loading...