[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] Re: Routing bug?
Paul Jones wrote
> So how do I go through the array only as many times as is necessary to
> clear the first of the duplicate notes?
I see in the other message that you found indicesOfEqual -- though, if you
want only the first index, then you don't need plural indices, so take a
look at indexOfEqual.
> Also, what is the alternative to 1.do, I deleted it n then it just didn't
> get evaluated.
I guess I wrote it a bit imprecisely. I meant that it is redundant to write
a looping structure where the number of repetitions is a hard-coded constant
1. The general form is "n.do { body }" but if n is 1, then you need only
"body" --
(0+1).postln;
vs
1.do { (0+1).postln };
So, when you delete "1.do" you should also delete the function braces
belonging to 1.do.
I'm unclear why it's there in the first place -- maybe at one time it was
looping, but a later revision made the loop unnecessary?
> Ah and in answer to your question, yes rel time is the longest release
> time in the array done thus.
> reltime =
> 8.collect{|i|(~envtimes[i][3]-~envtimes[i][2])*~times[i]};
> reltime = reltime.maxItem;
>
> Probably not the most slick way to do it.. but it works.
Ok, that makes sense.
hjh
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Routing-bug-tp7629814p7629854.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.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/