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

Re: [sc-users] Ppar select random array from array of arrays



you want that the pattern returned from your choice funtion is embedded in your stream. So you may want to use Plazy instead of Pfunc


> On 5. Dec 2019, at 21:37, lavaramano@xxxxxxxxx wrote:
> 
> 
> On 12/5/19, kennethflak@xxxxxxxxxxxxxx <kennethflak@xxxxxxxxxxxxxx> wrote:
>> Hi list,
>> 
>> Unexpectedly sticky little problem: how do I make a Ppar select a random
>> array from an array of arrays?
>> 
> 
> Off the top of my head, I think this might work (haven't actually tested it)
> 
> `Ppar(Pfunc{ [array, of, pbinds].reject { |x| [true, false].choose } }, inf)`
> 
> Pfunc should reject _some_ of the pbind-arrays inside of the array,
> and return them for Ppar to play them.
> 
> hope this helps :-)
> 
>> Code:
>> 
>> patterns = [bass, treeperc, lead, lead2, kick, bubbles].powerset.reject({|i|
>> i.size < 2}); // a bunch of pbinds
>> ppar = Ppar([Prand(patterns, inf)]).play; //doesn't work
>> ppar = Ppar(Prand(patterns, inf)).play; //nor does this
>> 
>> I'm stumped and it's getting late. Maybe brain will start working tomorrow,
>> but since these things are not guaranteed, I send a call for help...
>> 
>> Best,
>> Kenneth
>> 
>> --
>> Roosna & Flak - Contemporary Dance & Music
>> Web: roosnaflak.com
>> Code: {github,gitlab}.com/kflak
>> Mastodon: @kf@vis.social
>> 
>> 
>> _______________________________________________
>> sc-users mailing list
>> 
>> info (subscription, etc.):
>> http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
>> 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.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> 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.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/