[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] synchronizing two random value pattern generators (e.g. Prand)
hi Jonathan,
like this perhaps?
Pdef(\samplePlayer, Pbind(*[
delta: 0.5,
index: Prand([0, 1, 2, 3, 4], inf), //random index
startFrame: Pindex([ 267431, 5760, 50194, 94629, 137418], Pkey(\index), inf),
endFrame: Pindex([ 277306, 20634, 59246, 106149, 144824 ], Pkey(\index), inf),
amp: Pwhite(0.1,0.5)
]).trace).play;
there's a similar example in Pindex helpfile.
another technique is...
(
Pdef(\samplePlayer, Pbind(
\delta, 0.5,
#[\startFrame, \endFrame], Prand(
[
[ 267431, 5760, 50194, 94629, 137418],
[ 277306, 20634, 59246, 106149, 144824 ]
].flop,
inf
),
\amp, Pwhite(0.1,0.5)
).trace).play;
)
good luck,
_f
> 6 jan. 2019 kl. 20:21 skrev info@xxxxxxxxxxxxxxxx:
>
> Hey all,
> I was just curious if there is a way anyone could figure to synchronize two random value pattern generators. I've got pairs of values to an instrument that I need to have aligned, but would like to produce randomly.
>
> For example, in the following snippet:
> Pdef(\samplePlayer, Pbind(*[
> delta: 0.5,
> startFrame: Pseq([ 267431, 5760, 50194, 94629, 137418],inf),
> endFrame: Pseq([ 277306, 20634, 59246, 106149, 144824 ],inf),
> amp: Pwhite(0.1,0.5)
> ])).play;
> Here I'm playing segments of a larger buffer. I would like to randomize buffer playback segments. In other words, replace the Pseqs with something like Prand that would keep the start and end points synchronized (a startFrame of 5760 is always paired with an endFrame of 20634).
> Any thoughts?
>
> best,
>
> Jonathan
> --
> JC Reus
>
> WEB:
> jonathanreus.com
>
>
>
#|
fredrikolofsson.com musicalfieldsforever.com
|#
_______________________________________________
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/