[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re[sc-users] set Pseq's array
hello,
thank you for all your help so far.
I think I understood how to use List (to change the array in the list).
In my case I assume it is a bit more complicated (I am sure must be an
easier way to do it):
with button value 1 - I reset one of the Pseq's
with button value 0 - (now) I change all the list
My aim is to change only one List[array]. = a[1] or a[2] or a[3] so the
others can keep going in their original sequence.
How could I change only a[1]'s List (currentFade in a[1] Pseq)?
Thank you in advance
code:
(
var window = SCWindow.new("0610279_EEG16",Rect(500, 300, 300, 300)).front;
var fadeButton;
var myFade1, myFade2, myFade3, currentFade;
myFade1 = List[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0];
myFade2 = List[0.1,0.1,0,1,0.1,0.1,0.1,0.1,0.1,0.1,0.1];
myFade3 = List[0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0.0];
currentFade = myFade1;
a = Array.fill(3, {Pseq.new((currentFade), 6).asStream.postln});
fadeButton = Button(window, Rect(20, 20, 70, 20))
.states_([
["rFade", Color.black, Color.red],
["rresetPseq", Color.white, Color.black],
])
.action_({ arg butt;
case //{butt.value==0} {fade = [myFade1, myFade2, myFade3].choose}
{butt.value==0} {currentFade.array = List[1,2,3,4,5,6,7,8,9,10,]}
{butt.value==1} {(a[2.rand]).reset};
});
~f1 = Task({
(currentFade[0].size)*40.do({
~abc0 = a[0].next;
~abc1 = a[1].next;
~abc2 = a[2].next;
[~abc0, ~abc0.class].postln;
[~abc1, ~abc1.class].postln;
[~abc2, ~abc2.class].postln;
2.wait;
});
});
~f1.play;
)
--
View this message in context: http://www.nabble.com/Reset-Pseq%27s-array-tp22536448p22541431.html
Sent from the Supercollider - User mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/