[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] How to SynthDef a non-stop player of random samples???



I think what you need is a Pattern that encompasses a SynthDef.  Check
out Prand or Pwhite for your random values.  This way, you can store
the pattern itself as a single variable and then instantiate a number
of these patterns.  If you want it totally random (within set high-low
parameters) Pwhite is probably the way to go.  This way, each synth
can randomly select its own buffer to play and as soon as the sound is
done with the CPU is freed.  You can probably figure out how to do
this in a couple of hours if you have the SynthDef built already.
Just use the Practical Guide to Patterns tutorial.

Yeah, the basic advantage to triggering individual synths is just that
you have that extra downtime where the synth isn't eating your CPU.
Also, if you free the pattern (in case you later decide that you DO
want to fade things out) it won't click the synth off but rather will
just not instantiate a new one.

Andrew

On Thu, Jul 23, 2009 at 9:48 PM, Josh Parmenter<josh@xxxxxxxxxxxxxxxxx> wrote:
> Perhaps store your buffers to a set of continuous buffers, then use GrainBuf
> to randomly play different buffers using Dust for onset triggers?
> I only have a moment right now, but could probably do an example later if
> you need more...
>
> Best,
>
> Josh
>
> On Jul 23, 2009, at 6:32 PM, Philip Galanter wrote:
>
>> Hi folks.
>>
>> I'm new to Supercollider but not electronic music or programming.  I can't
>> figure out how to put an infinite loop into a SynthDef that would allow me
>> to use PlayBuf to play random samples, one after another.  Actually I want
>> to play a random sample, pause a random amount of time, play another random
>> sample, and so on.
>>
>> I want to do this in a self-contained SynthDef because I will need to
>> instantiate a number of these.  I want to avoid writing a single piece of
>> code that goes around triggering a number of synths.  It will be much better
>> to be able to instantiate autonomous sample playing synths.  And once
>> created there is no need to programatically turn synths on and off or
>> deallocate them.
>>
>> I'm pretty sure I know how to pass the Buffer references the synth will
>> select from, and how to do the random buffer selection.  I've read a bit
>> about patterns and understand those at least in principle.  I know PlayBuf
>> can loop a single sample.   It would be better if the samples were defined
>> as individual buffers rather than concatenated in a single buffer and then
>> selected by start and stop memory locations.
>>
>> My main problem is figuring out how to make an "outer loop" that will
>> trigger a random sample once per trip.
>>
>> Any ideas?  I'm in a bit of a jam trying to finish this project quickly.
>>
>> thanks,
>>
>> Phil
>>
>> _______________________________________________
>> sc-users mailing list
>>
>> info (subscription, etc.):
>> http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
>> archive: https://listarc.bham.ac.uk/marchives/sc-users/
>> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>
> ******************************************
> /* Joshua D. Parmenter
> http://www.realizedsound.net/josh/
>
> “Every composer – at all times and in all cases – gives his own
> interpretation of how modern society is structured: whether actively or
> passively, consciously or unconsciously, he makes choices in this regard. He
> may be conservative or he may subject himself to continual renewal; or he
> may strive for a revolutionary, historical or social palingenesis." - Luigi
> Nono
> */
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.):
> http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/