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
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
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/
|