[sc-users] Buffer: Getter method using direct messaging
Reyort, Nav
tennen_funk at hotmail.com
Mon Apr 28 03:18:30 PDT 2008
OSCResponder class is very cool!
Thank you for the respond.
Akito
________________________________
> Date: Sun, 27 Apr 2008 15:25:54 -0400
> To: sc-users at create.ucsb.edu
> From: jamshark70 at gmail.com
> Subject: Re: [sc-users] Buffer: Getter method using direct messaging
>
> The command b_query sends back an OSC /b_info message as the reply. The buffer class has methods to listen for this message and set the variables in the buffer object automatically. If you are setting up the buffer on the server using OSC messages directly, then it will be necessary to create an OSC responder object explicitly.
>
> Lately I've been using OSCpathResponders more and more because it automatically filters the incoming message to the right responder.
>
> s.sendMsg("/b_allocRead", 0, "sounds/a11wlk01.wav");
>
> // ['/b_info', 0] --> 0 is the buffer number you just allocated
>
> OSCpathResponder(s.addr, ['/b_info', 0], { |time, thisResponderObject, message|
> ... in here, message[2] == numFrames, message[3] == numChannels,
> ... and message[4] == sampleRate
> }).add.removeWhenDone;
>
> // ^^ removeWhenDone is used because you don't need this responder again after receiving the info
>
> See the help files for OSCresponderNode and OSCpathResponder.
>
> hjh
>
> On Apr 27, 2008, at 3:13 PM, Reyort Nav wrote:
>
> Hi,
>
> I am wondering if any one know direct messaging equivalent of
> following getter method.
>
> b = Buffer.read(s, "sounds/a11wlk01.wav");
> b.bufnum;
> b.numFrames;
> b.numChannels;
> b.sampleRate;
>
> If I allocate buffer using
> s.sendMsg("/b_allocRead", 0, "sounds/a11wlk01.wav");
> How do I access a number of frames in buffer and so forth?
> /b_query or /b_info commands seem to come close to this but
> I am not sure how to use this command effectively.
> Thank you for your help in advance.
>
>
>
> : H. James Harkins
>
> : jamshark70 at dewdrop-world.net
>
> : http://www.dewdrop-world.net
>
> .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
>
>
> "Come said the Muse,
>
> Sing me a song no poet has yet chanted,
>
> Sing me the universal." -- Whitman
_________________________________________________________________
マイクロソフトの最新次世代ブラウザIE7にMSN版ならではの便利な機能をプラス
http://promotion.msn.co.jp/ie7/
More information about the sc-users
mailing list