Function Output Storage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Function Output Storage

geoffbaltan
Hello All,

I have been working with a function that generates an array of values.
I use it to change the scale degrees in a Pbind, every few
repetitions. There's a simplified version attached.

The thing is - sometimes I get a particular configuration that I like,
but it's seemingly impossible to refer back to it, once it's been
executed.

I'm wondering if there is a way to dump every re-execution of the
function into some type of storage file and then perhaps access the
individual iterations. Any thoughts?

~eights={Array.fill(8, {12.rand})};
Pbindef(\la,
\degree, Pn(Plazy { Pseq(~eights.(), 4) }, inf),
\dur, 1/4
).play;


Thanks,
Geoff

_______________________________________________
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
|

Re: Function Output Storage

grirgz
Yes, you can do whatever you want in ~eights, storing the result in a
persistant list of result then return it, or append it to a file.
Another approach is to write / post the seed used to generate the
random array so you can get the same values again by re-using the same
seed

2017-12-19 13:56 GMT+01:00  <[hidden email]>:

> Hello All,
>
> I have been working with a function that generates an array of values.
> I use it to change the scale degrees in a Pbind, every few
> repetitions. There's a simplified version attached.
>
> The thing is - sometimes I get a particular configuration that I like,
> but it's seemingly impossible to refer back to it, once it's been
> executed.
>
> I'm wondering if there is a way to dump every re-execution of the
> function into some type of storage file and then perhaps access the
> individual iterations. Any thoughts?
>
> ~eights={Array.fill(8, {12.rand})};
> Pbindef(\la,
> \degree, Pn(Plazy { Pseq(~eights.(), 4) }, inf),
> \dur, 1/4
> ).play;
>
>
> Thanks,
> Geoff
>
> _______________________________________________
> 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
|

Re: Function Output Storage

julian.rohrhuber
In reply to this post by geoffbaltan
something like this, perhaps?


(
~allEights = Array.new;
~eights = {
        var x = Array.fill(8, { 12.rand });
        ~allEights = ~allEights.add(x);
        x
};
)


(
Pbindef(\la,
        \degree, Pn(Plazy { Pseq(~eights.(), 4) }, inf),
        \dur, 1/4
).play;
)




> On 19.12.2017, at 13:56, [hidden email] wrote:
>
> Hello All,
>
> I have been working with a function that generates an array of values.
> I use it to change the scale degrees in a Pbind, every few
> repetitions. There's a simplified version attached.
>
> The thing is - sometimes I get a particular configuration that I like,
> but it's seemingly impossible to refer back to it, once it's been
> executed.
>
> I'm wondering if there is a way to dump every re-execution of the
> function into some type of storage file and then perhaps access the
> individual iterations. Any thoughts?
>
> ~eights={Array.fill(8, {12.rand})};
> Pbindef(\la,
> \degree, Pn(Plazy { Pseq(~eights.(), 4) }, inf),
> \dur, 1/4
> ).play;
>
>
> Thanks,
> Geoff
>
> _______________________________________________
> 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/


signature.asc (849 bytes) Download Attachment