Quantcast

asynchronous grain scheduler

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

asynchronous grain scheduler

George Locke-3
Hi,

I'm an experienced programmer with a strong grasp of DSP fundamentals trying to learn SuperCollider. I'd like to work with granular synthesis, and I am doing fine at building SynthDef's that make grains, but I'm having trouble figuring out how to build a grain scheduler.  Basically, I want a computationally efficient loop like this: make noise, compute next wait time, wait, repeat.  (I wouldn't be surprised if this question comes up once a week, but I searched the list for grain scheduler and asynchronous grain/grainular and came up short.)

Not wanting to reinvent the wheel, I looked around for existing code that does asynchronous grain scheduling.  I found GranCloud by Terry Lee, see references http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Does-anybody-have-GranCloud-developed-by-Terry-A-Lee-td7579201.html and http://quod.lib.umich.edu/cgi/p/pod/dod-idx/grancloud-a-new-supercollider-class-for-real-time-granular.pdf?c=icmc;idno=bbp2372.2006.015 , but I couldn't figure out how the \rate parameter worked. code here https://dl.dropboxusercontent.com/u/414876/GranCloud.sc

Other ideas of where to look for working code or related documentation would be greatly appreciated.

Regards,
George
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asynchronous grain scheduler

Julian Rohrhuber-3
There are many different interesting approaches, maybe this could be a good start?

https://github.com/passivist/GRNLR_SC




> On 12.12.2016, at 22:17, George Locke <[hidden email]> wrote:
>
> Hi,
>
> I'm an experienced programmer with a strong grasp of DSP fundamentals trying to learn SuperCollider. I'd like to work with granular synthesis, and I am doing fine at building SynthDef's that make grains, but I'm having trouble figuring out how to build a grain scheduler.  Basically, I want a computationally efficient loop like this: make noise, compute next wait time, wait, repeat.  (I wouldn't be surprised if this question comes up once a week, but I searched the list for grain scheduler and asynchronous grain/grainular and came up short.)
>
> Not wanting to reinvent the wheel, I looked around for existing code that does asynchronous grain scheduling.  I found GranCloud by Terry Lee, see references http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Does-anybody-have-GranCloud-developed-by-Terry-A-Lee-td7579201.html and http://quod.lib.umich.edu/cgi/p/pod/dod-idx/grancloud-a-new-supercollider-class-for-real-time-granular.pdf?c=icmc;idno=bbp2372.2006.015 , but I couldn't figure out how the \rate parameter worked. code here https://dl.dropboxusercontent.com/u/414876/GranCloud.sc
>
> Other ideas of where to look for working code or related documentation would be greatly appreciated.
>
> Regards,
> George


signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asynchronous grain scheduler

Daniel Mayer
In reply to this post by George Locke-3

Hi,

you might have a look into miSCellaneous lib's Buffer granulation tutorial.

Basically scheduling can be done in server (granulation ugens, optionally using demand rate ugens, Tutorial chapter 1) or language (Patterns, also Tasks/Routines, Tutorial chapter 2).
Personally I tend to like the pattern approach most as it gives great flexibilty to control all kinds of sequencing. An advantage of granulation ugens though is easy control of extremely short times, we avoid heavy OSC traffic in this case. Any kind of asynchronicity can be defined with demand rate ugens, however often not as straight and clear as with patterns.

You can also have different levels of scheduling, e.g. use Pspawner to sprout clouds in language itself (Tutorial Ex. 2c). Different levels of scheduling can also be made by hybrid approaches, e.g. sprouting synths from lang that generate clouds with demand rate ugens (Tutorial Ex. 3d).

Pspawner and demand rate ugens could even be defined to produce three levels of scheduling (I didn't practically use this yet, but this could be interesting I think).

Also consider recursive phrasing as a further scheduling strategy:

http://doc.sccode.org/Tutorials/JITLib/recursive_phrasing.html

Regards

Daniel

----------------------------------------------------
http://daniel-mayer.at/software_en.htm
----------------------------------------------------






_______________________________________________
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: asynchronous grain scheduler

George Locke-3
Great ideas.  Daniel's tutorials look spot-on, thanks for your efforts!!

 - George

On Mon, Dec 12, 2016 at 5:10 PM Daniel Mayer <[hidden email]> wrote:

Hi,

you might have a look into miSCellaneous lib's Buffer granulation tutorial.

Basically scheduling can be done in server (granulation ugens, optionally using demand rate ugens, Tutorial chapter 1) or language (Patterns, also Tasks/Routines, Tutorial chapter 2).
Personally I tend to like the pattern approach most as it gives great flexibilty to control all kinds of sequencing. An advantage of granulation ugens though is easy control of extremely short times, we avoid heavy OSC traffic in this case. Any kind of asynchronicity can be defined with demand rate ugens, however often not as straight and clear as with patterns.

You can also have different levels of scheduling, e.g. use Pspawner to sprout clouds in language itself (Tutorial Ex. 2c). Different levels of scheduling can also be made by hybrid approaches, e.g. sprouting synths from lang that generate clouds with demand rate ugens (Tutorial Ex. 3d).

Pspawner and demand rate ugens could even be defined to produce three levels of scheduling (I didn't practically use this yet, but this could be interesting I think).

Also consider recursive phrasing as a further scheduling strategy:

http://doc.sccode.org/Tutorials/JITLib/recursive_phrasing.html

Regards

Daniel

----------------------------------------------------
http://daniel-mayer.at/software_en.htm
----------------------------------------------------






_______________________________________________
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: asynchronous grain scheduler

alberto.decampo
In the SC book, there is also a chapter on Microsound:
http://supercolliderbook.net

best adc

> On 12/12/2016, at 23:35 , George Locke <[hidden email]> wrote:
>
> Great ideas.  Daniel's tutorials look spot-on, thanks for your efforts!!
>
>  - George
>
> On Mon, Dec 12, 2016 at 5:10 PM Daniel Mayer <[hidden email]> wrote:
>
> Hi,
>
> you might have a look into miSCellaneous lib's Buffer granulation tutorial.
>
> Basically scheduling can be done in server (granulation ugens, optionally using demand rate ugens, Tutorial chapter 1) or language (Patterns, also Tasks/Routines, Tutorial chapter 2).
> Personally I tend to like the pattern approach most as it gives great flexibilty to control all kinds of sequencing. An advantage of granulation ugens though is easy control of extremely short times, we avoid heavy OSC traffic in this case. Any kind of asynchronicity can be defined with demand rate ugens, however often not as straight and clear as with patterns.
>
> You can also have different levels of scheduling, e.g. use Pspawner to sprout clouds in language itself (Tutorial Ex. 2c). Different levels of scheduling can also be made by hybrid approaches, e.g. sprouting synths from lang that generate clouds with demand rate ugens (Tutorial Ex. 3d).
>
> Pspawner and demand rate ugens could even be defined to produce three levels of scheduling (I didn't practically use this yet, but this could be interesting I think).
>
> Also consider recursive phrasing as a further scheduling strategy:
>
> http://doc.sccode.org/Tutorials/JITLib/recursive_phrasing.html
>
> Regards
>
> Daniel
>
> ----------------------------------------------------
> http://daniel-mayer.at/software_en.htm
> ----------------------------------------------------
>
>
>
>
>
>
> _______________________________________________
> 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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asynchronous grain scheduler

George Locke-3
TDuty sends a trigger at specified intervals where the intervals are specified by a list.  Is there a way to specify the intervals with a function?  (The function I want to use is -1*(1 - 1.0.rand).log)

Thanks,
George

On Tue, Dec 13, 2016 at 3:56 AM alberto.decampo <[hidden email]> wrote:
In the SC book, there is also a chapter on Microsound:
http://supercolliderbook.net

best adc

> On 12/12/2016, at 23:35 , George Locke <[hidden email]> wrote:
>
> Great ideas.  Daniel's tutorials look spot-on, thanks for your efforts!!
>
>  - George
>
> On Mon, Dec 12, 2016 at 5:10 PM Daniel Mayer <[hidden email]> wrote:
>
> Hi,
>
> you might have a look into miSCellaneous lib's Buffer granulation tutorial.
>
> Basically scheduling can be done in server (granulation ugens, optionally using demand rate ugens, Tutorial chapter 1) or language (Patterns, also Tasks/Routines, Tutorial chapter 2).
> Personally I tend to like the pattern approach most as it gives great flexibilty to control all kinds of sequencing. An advantage of granulation ugens though is easy control of extremely short times, we avoid heavy OSC traffic in this case. Any kind of asynchronicity can be defined with demand rate ugens, however often not as straight and clear as with patterns.
>
> You can also have different levels of scheduling, e.g. use Pspawner to sprout clouds in language itself (Tutorial Ex. 2c). Different levels of scheduling can also be made by hybrid approaches, e.g. sprouting synths from lang that generate clouds with demand rate ugens (Tutorial Ex. 3d).
>
> Pspawner and demand rate ugens could even be defined to produce three levels of scheduling (I didn't practically use this yet, but this could be interesting I think).
>
> Also consider recursive phrasing as a further scheduling strategy:
>
> http://doc.sccode.org/Tutorials/JITLib/recursive_phrasing.html
>
> Regards
>
> Daniel
>
> ----------------------------------------------------
> http://daniel-mayer.at/software_en.htm
> ----------------------------------------------------
>
>
>
>
>
>
> _______________________________________________
> 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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asynchronous grain scheduler

Eli Fieldsteel
I believe your function would look like this when translated into Demand UGens:

-1 * (1 - Dwhite(0.0,1.0,inf)).log

Here is an example where your function determines wait times between audio rate triggers (dpoll used to print values)

{TDuty.ar((-1 * (1 - Dwhite(0.0, 1.0, inf)).log).dpoll)}.play;

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

Re: asynchronous grain scheduler

George Locke-3
Thanks very much, Eli.  (PS I am subbed to ur utube channel, great vids!)

On Tue, Dec 27, 2016 at 3:41 PM Eli Fieldsteel <[hidden email]> wrote:
I believe your function would look like this when translated into Demand
UGens:

-1 * (1 - Dwhite(0.0,1.0,inf)).log

Here is an example where your function determines wait times between audio
rate triggers (dpoll used to print values)

{TDuty.ar((-1 * (1 - Dwhite(0.0, 1.0, inf)).log).dpoll)}.play;

Eli



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/asynchronous-grain-scheduler-tp7629485p7629777.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.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/
Loading...