[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] ListPatterns: a modest proposal

On Wednesday, Jan 28, 2004, at 11:23 US/Eastern, Julian Rohrhuber wrote:


On Monday, Jan 26, 2004, at 22:17 US/Eastern, James Harkins wrote:

x = Pseq(1, inf).asStream;

Good way to hang sclang. The reason is that x.list.size is always 0, so the .embedInStream never gets called and the Pseq stream loops infinitely.

does this happen to you because of automation or because of writing code?
if the former, you could still add something like asCollection.

No, it's in the stream created by Pseq.asStream:

repeats.value.do({ arg j;
list.size.do({ arg i;
item = list @@ (i + offsetValue);
inval = item.embedInStream(inval);

translates to (if it's Pseq(1, inf).asStream):

inf.do({ |j|
0.do({ |i|
item = ...;
inval = item.embedInStream(inval);


inf.do({ nil });

EmbedInStream never gets called, the routine never yields.

No way around it but to ensure that list.size > 0


H. James Harkins /// dewdrop_world

"If attacked by a lion, thrust your arm down his throat.
This takes some practice." -- Cyril Connolly