Re: Integrating Events and Patterns

[email protected] Wed, 9 Jun 2021 14:13:59 +0200
Newsgroups gmane.comp.audio.supercollider.user
Message-ID <[email protected]>
> Am 09.06.2021 um 08:55 schrieb [email protected]:
> 
> Thank you, that's quite close to what I'm looking for.. the only problem is that .asKeyValuePairs is unordered - is there any way to maintain the key order integrity? 

An Event is unordered – as it’s superclass Set (see the help file Collections for an overview). If you want to preserve the order too you’d have to take an ordered Collection type (a subclass of SequenceableCollection).

Greetings

Daniel





> 
> On Tue, Jun 8, 2021 at 6:01 PM <[email protected] <mailto:[email protected]>> wrote:
> Then maybe like this ?
> 
> (
> e = (
>         'sus': Pwhite(0.5, 0.8),
>         'rel': Pwhite(0.01, 0.3),
>         'degree': Pseq([ 0, 2, 3, 4 ], inf),
>         'dur': Pseq([ 0.2 ], inf),
>         'octave': Prand([ 5 ], inf),
>         'dec': Pseq([ 0, 2, 3, 4 ], inf),
>         'instrument': nil
> );
> 
> n = Pbindef(\e, *e.asKeyValuePairs);
> e = PbindefEvent(n);
> w = Window("", Rect(0, 0, 300, 300));
> PdefGui(n, parent: w, bounds: Rect(0, 0, 50, 10));
> q=EnvirGui(e, 24, parent: w, bounds: Rect(40, 0, 600, 90));
> w.front;
> );
> 
> 
> 
> _______________________________________________
> sc-users mailing list
> 
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx <http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx>
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/ <http://www.listarc.bham.ac.uk/marchives/sc-users/>
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/ <http://www.listarc.bham.ac.uk/lists/sc-users/search/>