Panning for headphones/stereo speakers based on OSC messages received

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

Panning for headphones/stereo speakers based on OSC messages received

louisea
Hi,

I am trying to use panning as a variable that is changed by OSC messages received, so that when certain OSC messages are received, sound plays through the right headphone/speaker, for others the left, and for others both. I am using the following code, which I think should work from other examples I have seen, but at the moment can only make it work for the right headphone. For the OSC code below with Pdefn(\oscOutputside, 1), the sound plays through the right, but for Pdefn(\oscOutputside, 0) the sound plays through both sides instead of playing only through the left. Does anyone know why this is - how to make it play only through the left?

(
OSCFunc ( { | msg, time, addr, port |
        a.tempo_(tempo);
        Pdefn(\oscOutputside, [0,1]);
}, '/bothsidesnormal);
);

(
OSCFunc ( { | msg, time, addr, port |
        a.tempo_(tempo*2);
        Pdefn(\oscOutputside, 0);
}, '/leftfast');
);

(
OSCFunc ( { | msg, time, addr, port |
        a.tempo_(tempo*2);
        Pdefn(\oscOutputside, 1);
}, '/rightfast');
);

(
OSCFunc ( { | msg, time, addr, port |
        a.tempo_(tempo*2);
        Pdefn(\oscOutputside, [0,1]);
}, '/bothfast');
);


Many thanks,

Louise
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Panning for headphones/stereo speakers based on OSC messages received

5tefan


Am 2017-01-10 um 12:07 schrieb louisea:
> For the OSC code below with Pdefn(\oscOutputside, 1), the sound
> plays through the right, but for Pdefn(\oscOutputside, 0) the sound plays
> through both sides instead of playing only through the left.

Shouldn't it be Pdefn(\oscOutputside, -1)? Don't know what your SynthDef
looks like but if you're using a Pan2 to pan your output a value of -1
should pan to the left speaker while 0 would center the output.

hth, Stefan

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Loading...