Re: Pbind question
[email protected] Sat, 12 Jun 2021 12:34:17 +0200
| Newsgroups | gmane.comp.audio.supercollider.user |
|---|---|
| Message-ID | <CABYyzgD_OcS68nroJVPZQijnMz97D47SHMnGsz8mKvyYEZuB+A@mail.gmail.com> |
--000000000000811c5a05c48f2b9b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello -> James / hjh. This has definitely piqued my interest, thank you so much ! It's working fine with any SynthDef. I struggled at first and then *it managed to make itself work*, I had absolutely no idea how. At first it didn't... then it did.. then it didn't anymore... it turns out the problem was VarLag haha ! since a few days ago I have been sprinkling them everywhere like pepper in my SynthDefs and so it only started working after I evaluated alternate SynthDefs in older projects. Pretty obvious with hindsight that this might have been an obstacle... I will be able to study this more carefully (at least usage syntax) after next week-end. Seeing the code brings a up a few questions on other subjects. Happy to investigate it on my own for the time being. \detunedFreq is a bother -- I'm not sure when I would have time to improve > that. This isn't high on my priority list -- I would welcome suggestions = on > this issue. > I'm not sure I understand, is it the choice of the symbol ? If you are looking for something shorter but nevertheless corresponding i could perhaps suggest \glissando ? Kind regards, Max Le sam. 12 juin 2021 =C3=A0 12:23, <flo.huth-HaK8Zq/[email protected]> a =C3=A9crit : > Hi, > > i dont know your SynthDefs but something like that? > For a convincing "glide" effect you can use a monosynth. Just check your > "doneActions" and your gate argument. > Also im a bit confused of the thread...maybe it has been already > answered. Good luck anyway! > > ( > SynthDef(\glide,{ > arg t_trig,freq,lagTime,amp; > var lag,osc,env,mix; > > lag =3D Lag.kr(freq,lagTime); //lag UGen ramps from one freq to the > next in "lagTime" > > osc =3D Saw.ar(lag,amp); > > env =3DEnvGen.ar(Env.adsr(0.3,0.1,0.4,1),gate:t_trig,doneAction:0); > //t_trig and doneAction:0 are important > > mix =3D osc * env; //... > > Out.ar(0,mix!2) > } > ).add; > ) > > ( > a=3DPmono(\glide, //for reasons i dont get you dont need to type a key > value pair. Just synth name. > \t_trig,1, > \degree,Pwhite(-5,12), > \lagTime,Pwhite(0.01,2), > \amp,1, > \dur,Pkey(\lagTime) > ).play; > ) > > a.stop; > > > best > > flo. > > > On 12.06.21 09:23, [email protected] wrote: > > Hey everyone, > > I just looked at some of the responses again. > > > > I took Bruno Ruviaro's Experimental Sound Design course in my fall > > quarter of my senior year of college. At the end of the class, he > > recommended this mailing list to me, so my expectation when I subbed > > to it was that it'd be accessible to someone of my experience--or lack > > of it, more like. > > > > I ******* love A Gentle Intro to SC because it gives you code examples > > to run first, so you can hear the end result. Only after the text > > gives you the chance to listen to the sound does it explain--with > > varying levels of technicality--how that sound is produced. I still > > refer to it to this day. > > > > James, about the SynthDef and example you quoted? > > > > I know what I want to ask but not how to ask it so this might not make > sense. > > > > I have multiple synthDefs already made that I want to be able to make > > sliding notes. I also have Pbinds already written that I want to > > change so they have sliding notes. > > > > How would I alter my preexisting synthDefs and Pbinds to accommodate > > for what you've quoted? I read the synthDef, and I recognize most of > > it except there are a couple new variables? > > > > > > > I have a lot of material already made, so I want to be able to > > implement this with as little fuss as possible. > > > > On 6/10/21, [email protected] <[email protected]> wrote: > >> On Fri, Jun 11, 2021 at 9:33 AM James Harkins <[email protected]> > wrote: > >>> After that, you can have an Event that embeds another event, and the > >>> sub-event will automatically allocate a bus, play its synth on that > >>> bus, map the parent event control to that bus, and release the bus > >>> when finished -- arbitrary modulation signals applied to any > >>> parameter. > >> To pique interest, a quick example. > >> > >> After installing the test-tempbus.sc extension from > >> https://gist.github.com/jamshark70/7571ef65cb3aef58ff14b014b672c91b > >> then the following works: > >> > >> ( > >> p =3D Pbind( > >> \type, \notemap, > >> \dur, Pexprand(0.1, 0.8, inf), > >> \legato, Pexprand(0.5, 3.0, inf), > >> \freqEndpoints, Pexprand(200, 1200, inf).clump(2), > >> \pan, Pwhite(-1.0, 1.0, inf), > >> \detunedFreq, Pfunc { |ev| > >> var sustain =3D ev.use { ~sustain.value } / > thisThread.clock.tempo; > >> ( > >> instrument: \ctlEnv, > >> env: Env(ev[\freqEndpoints], [1], \exp), > >> time: sustain, > >> addAction: \addBefore > >> ) > >> } > >> ).play; > >> ) > >> > >> p.stop; > >> > >> So we get sliding notes, but the important thing is what is not > necessary to > >> do: > >> > >> - This example does not have to produce control-change events quickly > >> -- the time granularity of the Pbind is still per note. > >> > >> - This example does not have to make any changes to the default > >> SynthDef -- you write the note and control SynthDefs in a normal, > >> simple way, and the event connects them automatically. > >> > >> \detunedFreq is a bother -- I'm not sure when I would have time to > >> improve that. This isn't high on my priority list -- I would welcome > >> suggestions on this issue. > >> > >> hjh > >> > >> _______________________________________________ > >> 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/ > >> > > > > _______________________________________________ > 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/ > --000000000000811c5a05c48f2b9b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div dir=3D"ltr"><div>Hello<br></div><div><br></div><= div>-> James / hjh. This has definitely piqued my interest, thank you so= much !</div><div><br></div><div dir=3D"auto">It's working fine with an= y SynthDef. I struggled at first and then <i>it managed to make itself work= </i>, I had absolutely no idea how. At first it didn't... then it did..= then it didn't anymore...</div><div dir=3D"auto"> it turns out the pro= blem was VarLag haha ! since a few days ago I have been sprinkling them eve= rywhere like pepper in my SynthDefs and so it only started working after I = evaluated alternate SynthDefs in older projects. Pretty obvious with hindsi= ght that this might have been an obstacle...<br></div><div><br></div><div>I= will be able to study this more carefully (at least usage syntax) after ne= xt week-end. Seeing the code brings a up a few questions on other subjects.= Happy to investigate it on my own for the time being.<br></div><div><br><b= lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le= ft:1px solid rgb(204,204,204);padding-left:1ex"><div>\detunedFreq is a both= er -- I'm not sure when I would have time to improve that. This isn'= ;t high on my priority list -- I would welcome suggestions on this issue.</= div></blockquote><div>=C2=A0 <br></div></div></div></div><div><div>I'm = not sure I understand, is it the choice of the symbol ? If you are looking = for something shorter but nevertheless corresponding i could perhaps sugges= t \glissando ?<br></div><div><br></div><div>Kind regards,<br></div><div>Max= </div></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"= gmail_attr">Le=C2=A0sam. 12 juin 2021 =C3=A0=C2=A012:23, <<a href=3D"mai= lto:flo.huth-HaK8Zq/[email protected]">flo.huth-HaK8Zq/[email protected]</a>> a =C3=A9crit=C2=A0:<br></d= iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord= er-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br> <br> i dont know your SynthDefs but something like that?<br> For a convincing "glide" effect you can use a monosynth. Just che= ck your <br> "doneActions" and your gate argument.<br> Also im a bit confused of the thread...maybe it has been already <br> answered. Good luck anyway!<br> <br> (<br> SynthDef(\glide,{<br> =C2=A0=C2=A0=C2=A0=C2=A0 arg t_trig,freq,lagTime,amp;<br> =C2=A0=C2=A0=C2=A0=C2=A0 var lag,osc,env,mix;<br> <br> =C2=A0=C2=A0=C2=A0=C2=A0 lag =3D Lag.kr(freq,lagTime); //lag UGen ramps fro= m one freq to the <br> next in "lagTime"<br> <br> =C2=A0=C2=A0=C2=A0=C2=A0 osc =3D Saw.ar(lag,amp);<br> <br> =C2=A0=C2=A0=C2=A0=C2=A0 env =3DEnvGen.ar(Env.adsr(0.3,0.1,0.4,1),gate:t_tr= ig,doneAction:0); <br> //t_trig and doneAction:0 are important<br> <br> =C2=A0=C2=A0=C2=A0=C2=A0 mix =3D osc * env; //...<br> <br> =C2=A0=C2=A0=C2=A0=C2=A0 Out.ar(0,mix!2)<br> }<br> ).add;<br> )<br> <br> (<br> a=3DPmono(\glide, //for reasons i dont get you dont need to type a key <br> value pair. Just synth name.<br> =C2=A0=C2=A0=C2=A0=C2=A0 \t_trig,1,<br> =C2=A0=C2=A0=C2=A0=C2=A0 \degree,Pwhite(-5,12),<br> =C2=A0=C2=A0=C2=A0=C2=A0 \lagTime,Pwhite(0.01,2),<br> =C2=A0=C2=A0=C2=A0=C2=A0 \amp,1,<br> =C2=A0=C2=A0=C2=A0=C2=A0 \dur,Pkey(\lagTime)<br> ).play;<br> )<br> <br> a.stop;<br> <br> <br> best<br> <br> flo.<br> <br> <br> On 12.06.21 09:23, <a href=3D"mailto:[email protected]" target=3D"_bl= ank">[email protected]</a> wrote:<br> > Hey everyone,<br> > I just looked at some of the responses again.<br> ><br> > I took Bruno Ruviaro's Experimental Sound Design course in my fall= <br> > quarter of my senior year of college. At the end of the class, he<br> > recommended this mailing list to me, so my expectation when I subbed<b= r> > to it was that it'd be accessible to someone of my experience--or = lack<br> > of it, more like.<br> ><br> > I ******* love A Gentle Intro to SC because it gives you code examples= <br> > to run first, so you can hear the end result. Only after the text<br> > gives you the chance to listen to the sound does it explain--with<br> > varying levels of technicality--how that sound is produced. I still<br= > > refer to it to this day.<br> ><br> > James, about the SynthDef and example you quoted?<br> ><br> > I know what I want to ask but not how to ask it so this might not make= sense.<br> ><br> > I have multiple synthDefs already made that I want to be able to make<= br> > sliding notes. I also have Pbinds already written that I want to<br> > change so they have sliding notes.<br> ><br> > How would I alter my preexisting synthDefs and Pbinds to accommodate<b= r> > for what you've quoted? I read the synthDef, and I recognize most = of<br> > it except there are a couple new variables?<br> <br> <br> <br> ><br> > I have a lot of material already made, so I want to be able to<br> > implement this with as little fuss as possible.<br> ><br> > On 6/10/21, <a href=3D"mailto:[email protected]" target=3D"_blank">= [email protected]</a> <<a href=3D"mailto:[email protected]" target= =3D"_blank">[email protected]</a>> wrote:<br> >> On Fri, Jun 11, 2021 at 9:33 AM James Harkins <<a href=3D"mailt= o:[email protected]" target=3D"_blank">[email protected]</a>> wrot= e:<br> >>> After that, you can have an Event that embeds another event, a= nd the<br> >>> sub-event will automatically allocate a bus, play its synth on= that<br> >>> bus, map the parent event control to that bus, and release the= bus<br> >>> when finished -- arbitrary modulation signals applied to any<b= r> >>> parameter.<br> >> To pique interest, a quick example.<br> >><br> >> After installing the <a href=3D"http://test-tempbus.sc" rel=3D"nor= eferrer" target=3D"_blank">test-tempbus.sc</a> extension from<br> >> <a href=3D"https://gist.github.com/jamshark70/7571ef65cb3aef58ff14= b014b672c91b" rel=3D"noreferrer" target=3D"_blank">https://gist.github.com/= jamshark70/7571ef65cb3aef58ff14b014b672c91b</a><br> >> then the following works:<br> >><br> >> (<br> >> p =3D Pbind(<br> >>=C2=A0 =C2=A0 =C2=A0 \type, \notemap,<br> >>=C2=A0 =C2=A0 =C2=A0 \dur, Pexprand(0.1, 0.8, inf),<br> >>=C2=A0 =C2=A0 =C2=A0 \legato, Pexprand(0.5, 3.0, inf),<br> >>=C2=A0 =C2=A0 =C2=A0 \freqEndpoints, Pexprand(200, 1200, inf).clump= (2),<br> >>=C2=A0 =C2=A0 =C2=A0 \pan, Pwhite(-1.0, 1.0, inf),<br> >>=C2=A0 =C2=A0 =C2=A0 \detunedFreq, Pfunc { |ev|<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var sustain =3D ev.use { ~sustai= n.value } / thisThread.clock.tempo;<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 instrument: \ctlEn= v,<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 env: Env(ev[\freqE= ndpoints], [1], \exp),<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 time: sustain,<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 addAction: \addBef= ore<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )<br> >>=C2=A0 =C2=A0 =C2=A0 }<br> >> ).play;<br> >> )<br> >><br> >> p.stop;<br> >><br> >> So we get sliding notes, but the important thing is what is not ne= cessary to<br> >> do:<br> >><br> >> - This example does not have to produce control-change events quic= kly<br> >> -- the time granularity of the Pbind is still per note.<br> >><br> >> - This example does not have to make any changes to the default<br= > >> SynthDef -- you write the note and control SynthDefs in a normal,<= br> >> simple way, and the event connects them automatically.<br> >><br> >> \detunedFreq is a bother -- I'm not sure when I would have tim= e to<br> >> improve that. This isn't high on my priority list -- I would w= elcome<br> >> suggestions on this issue.<br> >><br> >> hjh<br> >><br> >> _______________________________________________<br> >> sc-users mailing list<br> >><br> >> info (subscription, etc.):<br> >> <a href=3D"http://www.birmingham.ac.uk/facilities/ea-studios/resea= rch/supercollider/mailinglist.aspx" rel=3D"noreferrer" target=3D"_blank">ht= tp://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mail= inglist.aspx</a><br> >> archive: <a href=3D"http://www.listarc.bham.ac.uk/marchives/sc-use= rs/" rel=3D"noreferrer" target=3D"_blank">http://www.listarc.bham.ac.uk/mar= chives/sc-users/</a><br> >> search: <a href=3D"http://www.listarc.bham.ac.uk/lists/sc-users/se= arch/" rel=3D"noreferrer" target=3D"_blank">http://www.listarc.bham.ac.uk/l= ists/sc-users/search/</a><br> >><br> ><br> <br> _______________________________________________<br> sc-users mailing list<br> <br> info (subscription, etc.): <a href=3D"http://www.birmingham.ac.uk/facilitie= s/ea-studios/research/supercollider/mailinglist.aspx" rel=3D"noreferrer" ta= rget=3D"_blank">http://www.birmingham.ac.uk/facilities/ea-studios/research/= supercollider/mailinglist.aspx</a><br> archive: <a href=3D"http://www.listarc.bham.ac.uk/marchives/sc-users/" rel= =3D"noreferrer" target=3D"_blank">http://www.listarc.bham.ac.uk/marchives/s= c-users/</a><br> search: <a href=3D"http://www.listarc.bham.ac.uk/lists/sc-users/search/" re= l=3D"noreferrer" target=3D"_blank">http://www.listarc.bham.ac.uk/lists/sc-u= sers/search/</a><br> </blockquote></div> --000000000000811c5a05c48f2b9b-- _______________________________________________ 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/