Quantcast

synchronised panning and Stepper question

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

synchronised panning and Stepper question

mott
Hi list,

I'd like the following synth to pan hard left and hard right with each
pulse of the sound as it accelerates, however I've not been able to get
it to work. I tried to use a pulse control signal which varies between 1
and -1 but it doesn't work (see the commented line for "pan"). I tried
different things with Select as well

Can someone please suggest how this can be done?

Another question: how can I get Stepper.kr to stop at "1000" and not
return 0 (or any other value other than 1000). I've tried various values
for Stepper's "reset" and "resetval" parameters but they don't seem to
do anything.

Thanks, Iain

(
Ndef(\test,
     {
         var rate = XLine.kr(3, 164, 30);
         var freq = 200 + (Stepper.kr(Impulse.kr(rate), 0, 0, 1000, 1,
1000) * 2);
         //        var pan = (LFPulse.kr(rate, 0, 0.4)*2)-1;
         var pan = 0 ;
         var snd = DiodeRingMod.ar(SinOsc.ar(freq ),
             SinOsc.ar(200 * [0.75, 1, 0.5])).sum * 0.2 * Lag.ar(
                 LFPulse.ar( rate, 0, 0.4), 0.05) * 0.2;
         Pan2.ar(snd, pan);
     };
).play;
)










--
_________
Iain Mott
http://escuta.org


_______________________________________________
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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: synchronised panning and Stepper question

Fredrik Olofsson
here are three ways to do it.  (there are more)
(
Ndef(\test,
   {
       var rate = XLine.kr(3, 164, 30);
                var trig= Impulse.kr(rate);
       var freq = 200 + (Stepper.kr(trig, 0, 0, 1000, 1, 1000) * 2);
                //var pan= ToggleFF.kr(trig)*2-1;
                //var pan= Demand.kr(trig, 0, Dseq([-1, 1], inf));
                var pan= PulseCount.kr(trig)%2*2-1;
       var snd = DiodeRingMod.ar(SinOsc.ar(freq ),
           SinOsc.ar(200 * [0.75, 1, 0.5])).sum * 0.2 * Lag.ar(
               LFPulse.ar( rate, 0, 0.4), 0.05) * 0.2;
       Pan2.ar(snd, pan.poll);
   };
).play;
)

_f

> 10 feb 2017 kl. 16:17 skrev Iain Mott <[hidden email]>:
>
> Hi list,
>
> I'd like the following synth to pan hard left and hard right with each pulse of the sound as it accelerates, however I've not been able to get it to work. I tried to use a pulse control signal which varies between 1 and -1 but it doesn't work (see the commented line for "pan"). I tried different things with Select as well
>
> Can someone please suggest how this can be done?
>
> Another question: how can I get Stepper.kr to stop at "1000" and not return 0 (or any other value other than 1000). I've tried various values for Stepper's "reset" and "resetval" parameters but they don't seem to do anything.
>
> Thanks, Iain
>
> (
> Ndef(\test,
>    {
>        var rate = XLine.kr(3, 164, 30);
>        var freq = 200 + (Stepper.kr(Impulse.kr(rate), 0, 0, 1000, 1, 1000) * 2);
>        //        var pan = (LFPulse.kr(rate, 0, 0.4)*2)-1;
>        var pan = 0 ;
>        var snd = DiodeRingMod.ar(SinOsc.ar(freq ),
>            SinOsc.ar(200 * [0.75, 1, 0.5])).sum * 0.2 * Lag.ar(
>                LFPulse.ar( rate, 0, 0.4), 0.05) * 0.2;
>        Pan2.ar(snd, pan);
>    };
> ).play;
> )
>
>
>
>
>
>
>
>
>
>
> --
> _________
> Iain Mott
> http://escuta.org
>
>
> _______________________________________________
> 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/


  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: synchronised panning and Stepper question

mott
Thanks again Fredrik. Discovered that RunningMax can solve the issue
with Stepper.

all the best,


Em 10/02/2017 13:27, Fredrik Olofsson escreveu:

> here are three ways to do it.  (there are more)
> (
> Ndef(\test,
>     {
>         var rate = XLine.kr(3, 164, 30);
> var trig= Impulse.kr(rate);
>         var freq = 200 + (Stepper.kr(trig, 0, 0, 1000, 1, 1000) * 2);
> //var pan= ToggleFF.kr(trig)*2-1;
> //var pan= Demand.kr(trig, 0, Dseq([-1, 1], inf));
> var pan= PulseCount.kr(trig)%2*2-1;
>         var snd = DiodeRingMod.ar(SinOsc.ar(freq ),
>             SinOsc.ar(200 * [0.75, 1, 0.5])).sum * 0.2 * Lag.ar(
>                 LFPulse.ar( rate, 0, 0.4), 0.05) * 0.2;
>         Pan2.ar(snd, pan.poll);
>     };
> ).play;
> )
>
> _f
>
>> 10 feb 2017 kl. 16:17 skrev Iain Mott <[hidden email]>:
>>
>> Hi list,
>>
>> I'd like the following synth to pan hard left and hard right with each pulse of the sound as it accelerates, however I've not been able to get it to work. I tried to use a pulse control signal which varies between 1 and -1 but it doesn't work (see the commented line for "pan"). I tried different things with Select as well
>>
>> Can someone please suggest how this can be done?
>>
>> Another question: how can I get Stepper.kr to stop at "1000" and not return 0 (or any other value other than 1000). I've tried various values for Stepper's "reset" and "resetval" parameters but they don't seem to do anything.
>>
>> Thanks, Iain
>>
>> (
>> Ndef(\test,
>>     {
>>         var rate = XLine.kr(3, 164, 30);
>>         var freq = 200 + (Stepper.kr(Impulse.kr(rate), 0, 0, 1000, 1, 1000) * 2);
>>         //        var pan = (LFPulse.kr(rate, 0, 0.4)*2)-1;
>>         var pan = 0 ;
>>         var snd = DiodeRingMod.ar(SinOsc.ar(freq ),
>>             SinOsc.ar(200 * [0.75, 1, 0.5])).sum * 0.2 * Lag.ar(
>>                 LFPulse.ar( rate, 0, 0.4), 0.05) * 0.2;
>>         Pan2.ar(snd, pan);
>>     };
>> ).play;
>> )
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> _________
>> Iain Mott
>> http://escuta.org
>>
>>
>> _______________________________________________
>> 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/
>
>    #|
>       fredrikolofsson.com     musicalfieldsforever.com
>    |#
>
>
> _______________________________________________
> 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/

--
_________
Iain Mott
http://escuta.org


_______________________________________________
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...