Julian Rohrhuber | 30 Apr 16:27 2006
Picon

Re: ArrayedCollection-interlace

>Julian, what is ArrayedCollection-interlace supposed to do? Because 
>it crashes for me.

(0..7).interlace  // boom!
ok, this should be caught. It does not make sense to intelace an unnested array
  really.

>Also buggy:
>
>FloatArray[0,1,2,3].deinterlace
>
>	FloatArray[ nan, 5.7620804531889e-36 ]
>
>
>Int8Array[0,1,2,3].deinterlace
>
>	Int8Array[ 127, -7 ]

>These methods should be in Array, not ArrayedCollection.

ok, I see.

>Also I don't think that they are sufficiently different from .lace 
>and .unlace to be worth being included. I would prefer that 
>compatible generalizations of lace/unlace be made.

so it would be:

unlace(length, numChannels)
lace(length)
(Continue reading)

James McCartney | 30 Apr 18:54 2006
Picon

Re: ArrayedCollection-interlace


my son was 3 weeks old, so I was a little busy...

On Apr 30, 2006, at 7:27 AM, Julian Rohrhuber wrote:

I'll take a look at it soon. (btw: I had asked this:)


On Jun 8, 2005, at 10:09 AM, Julian Rohrhuber wrote:


oh, I see. but there is no clumpSize in lace, so it is not entirely useless.

What would you suggest - change lace? Add a length arg to interlace ?

--


_______________________________________________
sc-dev mailing list
sc-dev@...
http://www.create.ucsb.edu/mailman/listinfo/sc-dev
Arie van Schutterhoef | 30 Apr 19:11 2006
Picon
Picon

Re: ArrayedCollection-interlace

>my son was 3 weeks old,
-Congratulations!

AvS

  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.....................................................................

  `    |Schreck Ensemble    . . . . . . . . . . . . . . . . . . . . +

    `  |# -laboratory for live electro-acoustic music- #            |
       |             http://www.schreck.nl/                         |
       |             http://www.xs4all.nl/~schreck/                 |
     ` *===========================================================++
     ` |Compositions http://www.xs4all.nl/~schreck/html/compo.html  |
     ` |Samples      http://www.xs4all.nl/~schreck/html/samp.html   |
     ` |Patches      http://www.xs4all.nl/~schreck/html/pat.html    |
     ` |Videos       http://www.xs4all.nl/~schreck/html/video.html  |

     ` |Scores       http://www.xs4all.nl/~schreck/html/scores.html |

       *===========================================================++
  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.....................................................................
Julian Rohrhuber | 30 Apr 20:34 2006
Picon

Re: ArrayedCollection-interlace

>>Julian, what is ArrayedCollection-interlace supposed to do? Because 
>>it crashes for me.
>
>(0..7).interlace  // boom!
>ok, this should be caught. It does not make sense to intelace an 
>unnested array
>  really.

I do not understand this:

int prArrayInterlace(struct VMGlobals *g, int numArgsPushed)
{
	PyrSlot *a, *b, *slot, *slots1, *slots2;
	PyrObject *obj1, *obj2, *obj3;
	PyrClass *classPtr;
	int i, j, k, clump, numLists, len, size=0, err;

	a = g->sp - 1;
	b = g->sp;
	obj1 = a->uo;
	numLists = obj1->size;
	slots1 = obj1->slots;

	err = slotIntVal(b, &clump);
	if (err) return err;
	classPtr = slots1->uo->classptr; // this call crashes.
	// why can't I look for a classptr of, say an integer?

	return errNone;
/*
....
*/
}
--

-- 

.
Sciss | 30 Apr 20:50 2006
Picon

SynthDef.recvMsg

hallo,

what about adding a recvMsg method to SynthDef ?  would be usefull in  
bundle creation without immediate send. here's a proposal with a  
modified send method :

best, -sciss-


+ SynthDef {
	send { arg server, completionMsg;
		server.sendBundle( nil, this.recvMsg( completionMsg ));
	}

	recvMsg { arg completionMsg;
		^[ "/d_recv", this.asBytes, completionMsg ];
	}
}
Scott Wilson | 30 Apr 21:24 2006

Re: SynthDef.recvMsg

I'd thought about adding this at one point, but I believe that since it's an asynchronous command it won't have the effect you want (i.e. ordered execution):

s.makeBundle(nil, {

SynthDef(\notready, {
Out.ar(0, SinOsc.ar(440, 0, 0.1))
}).send(s);
Synth(\notready)
});

[ [ /d_recv, Int8Array[ 83, 67, 103, 102, 0, 0, 0, 1, 0, 1, 8, 110, 111, 116, 114, 101, 97, 100, 121, 0, 3, 67, -36, 0, 0, 0, 0, 0, 0, 61, -52, -52, -51, 0, 0, 0, 0, 0, 3, 6, 83, 105, 110, 79, 115, 99, 2, 0, 2, 0, 1, 0, 0, -1, -1, 0, 0, -1, -1, 0, 1, 2, 12, 66, 105, 110, 97, 114, 121, 79, 112, 85, 71, 101, 110, 2, 0, 2, 0, 1, 0, 2, 0, 0, 0, 0, -1, -1, 0, 2, 2, 3, 79, 117, 116, 2, 0, 2, 0, 0, 0, 0, -1, -1, 0, 1, 0, 1, 0, 0, 0, 0 ], nil ], [ 9, notready, 1000, 0, 1, nil ] ]
FAILURE /s_new SynthDef not found

S.

On 30 Apr 2006, at 19:50, Sciss wrote:

hallo,

what about adding a recvMsg method to SynthDef ?  would be usefull in bundle creation without immediate send. here's a proposal with a modified send method :

best, -sciss-


+ SynthDef {
send { arg server, completionMsg;
server.sendBundle( nil, this.recvMsg( completionMsg ));
}

recvMsg { arg completionMsg;
^[ "/d_recv", this.asBytes, completionMsg ];
}
}

_______________________________________________
sc-dev mailing list


_______________________________________________
sc-dev mailing list
sc-dev@...
http://www.create.ucsb.edu/mailman/listinfo/sc-dev
Sciss | 30 Apr 21:38 2006
Picon

Re: SynthDef.recvMsg

but this would work for instance:

(
  	var bndl, buf, def, synth;

	bndl = List.new;
	buf  = Buffer.new( s, 1024 );
	def = SynthDef( \test, { arg bufnum;
		Out.ar( 0, PlayBuf.ar( 1, bufnum ));
	});
	synth = Synth.basicNew( \test, s );
	bndl.add( buf.allocMsg({ arg b; def.recvMsg( synth.newMsg( nil,  
[ \bufnum, b.bufnum ]))}));
	// or alternatively:
	// bndl.add( def.recvMsg( buf.allocMsg({ arg b; synth.newMsg( nil,  
[ \bufnum, b.bufnum ])})));
	s.listSendBundle( nil, bndl );
)

// this example is stupid of course because the buffer is empty,  
imagine allocMsg is replaced by allocReadMsg

Am 30.04.2006 um 21:24 schrieb Scott Wilson:

> I'd thought about adding this at one point, but I believe that  
> since it's an asynchronous command it won't have the effect you  
> want (i.e. ordered execution):
>
> s.makeBundle(nil, {
>
> 	SynthDef(\notready, {
> 		Out.ar(0, SinOsc.ar(440, 0, 0.1))
> 	}).send(s);
> 	Synth(\notready)
> });
>
> [ [ /d_recv, Int8Array[ 83, 67, 103, 102, 0, 0, 0, 1, 0, 1, 8, 110,  
> 111, 116, 114, 101, 97, 100, 121, 0, 3, 67, -36, 0, 0, 0, 0, 0, 0,  
> 61, -52, -52, -51, 0, 0, 0, 0, 0, 3, 6, 83, 105, 110, 79, 115, 99,  
> 2, 0, 2, 0, 1, 0, 0, -1, -1, 0, 0, -1, -1, 0, 1, 2, 12, 66, 105,  
> 110, 97, 114, 121, 79, 112, 85, 71, 101, 110, 2, 0, 2, 0, 1, 0, 2,  
> 0, 0, 0, 0, -1, -1, 0, 2, 2, 3, 79, 117, 116, 2, 0, 2, 0, 0, 0, 0,  
> -1, -1, 0, 1, 0, 1, 0, 0, 0, 0 ], nil ], [ 9, notready, 1000, 0, 1,  
> nil ] ]
> FAILURE /s_new SynthDef not found
>
> S.
>
> On 30 Apr 2006, at 19:50, Sciss wrote:
>
>> hallo,
>>
>> what about adding a recvMsg method to SynthDef ?  would be usefull  
>> in bundle creation without immediate send. here's a proposal with  
>> a modified send method :
>>
>> best, -sciss-
>>
>>
>> + SynthDef {
>> 	send { arg server, completionMsg;
>> 		server.sendBundle( nil, this.recvMsg( completionMsg ));
>> 	}
>>
>> 	recvMsg { arg completionMsg;
>> 		^[ "/d_recv", this.asBytes, completionMsg ];
>> 	}
>> }
>>
>> _______________________________________________
>> sc-dev mailing list
>> sc-dev@...
>> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
>>
>
> _______________________________________________
> sc-dev mailing list
> sc-dev@...
> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
Scott Wilson | 30 Apr 21:53 2006

Re: SynthDef.recvMsg

Sure. I don't see any reason not to add it.

S.

On 30 Apr 2006, at 20:38, Sciss wrote:

> but this would work for instance:
>
> (
>  	var bndl, buf, def, synth;
>
> 	bndl = List.new;
> 	buf  = Buffer.new( s, 1024 );
> 	def = SynthDef( \test, { arg bufnum;
> 		Out.ar( 0, PlayBuf.ar( 1, bufnum ));
> 	});
> 	synth = Synth.basicNew( \test, s );
> 	bndl.add( buf.allocMsg({ arg b; def.recvMsg( synth.newMsg( nil,  
> [ \bufnum, b.bufnum ]))}));
> 	// or alternatively:
> 	// bndl.add( def.recvMsg( buf.allocMsg({ arg b; synth.newMsg( nil,  
> [ \bufnum, b.bufnum ])})));
> 	s.listSendBundle( nil, bndl );
> )
>
> // this example is stupid of course because the buffer is empty,  
> imagine allocMsg is replaced by allocReadMsg
>
> Am 30.04.2006 um 21:24 schrieb Scott Wilson:
>
>> I'd thought about adding this at one point, but I believe that  
>> since it's an asynchronous command it won't have the effect you  
>> want (i.e. ordered execution):
>>
>> s.makeBundle(nil, {
>>
>> 	SynthDef(\notready, {
>> 		Out.ar(0, SinOsc.ar(440, 0, 0.1))
>> 	}).send(s);
>> 	Synth(\notready)
>> });
>>
>> [ [ /d_recv, Int8Array[ 83, 67, 103, 102, 0, 0, 0, 1, 0, 1, 8,  
>> 110, 111, 116, 114, 101, 97, 100, 121, 0, 3, 67, -36, 0, 0, 0, 0,  
>> 0, 0, 61, -52, -52, -51, 0, 0, 0, 0, 0, 3, 6, 83, 105, 110, 79,  
>> 115, 99, 2, 0, 2, 0, 1, 0, 0, -1, -1, 0, 0, -1, -1, 0, 1, 2, 12,  
>> 66, 105, 110, 97, 114, 121, 79, 112, 85, 71, 101, 110, 2, 0, 2, 0,  
>> 1, 0, 2, 0, 0, 0, 0, -1, -1, 0, 2, 2, 3, 79, 117, 116, 2, 0, 2, 0,  
>> 0, 0, 0, -1, -1, 0, 1, 0, 1, 0, 0, 0, 0 ], nil ], [ 9, notready,  
>> 1000, 0, 1, nil ] ]
>> FAILURE /s_new SynthDef not found
>>
>> S.
>>
>> On 30 Apr 2006, at 19:50, Sciss wrote:
>>
>>> hallo,
>>>
>>> what about adding a recvMsg method to SynthDef ?  would be  
>>> usefull in bundle creation without immediate send. here's a  
>>> proposal with a modified send method :
>>>
>>> best, -sciss-
>>>
>>>
>>> + SynthDef {
>>> 	send { arg server, completionMsg;
>>> 		server.sendBundle( nil, this.recvMsg( completionMsg ));
>>> 	}
>>>
>>> 	recvMsg { arg completionMsg;
>>> 		^[ "/d_recv", this.asBytes, completionMsg ];
>>> 	}
>>> }
>>>
>>> _______________________________________________
>>> sc-dev mailing list
>>> sc-dev@...
>>> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
>>>
>>
>> _______________________________________________
>> sc-dev mailing list
>> sc-dev@...
>> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
>
> _______________________________________________
> sc-dev mailing list
> sc-dev@...
> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
>

Gmane