On Sep 24, 2005, at 1:10 PM, Ricardo Guerreiro wrote:
I was already following on that way. In this case, i'm driving the
centerPos control rate bus with a "line" object in Max/Msp. How
can I read the Buffer dur (in order to send it to Max)?
Something like (this doesn't work):
v = BufDur.kr(bufnum);
v.value.postIn;
There is a client vs server help file which, if I recall correctly,
explains why you can't use server-side UGens on the client.
Anything with .ar, .kr or .ir is calculated in the server and is
not directly available on the client.
The buffer object has a method to get its vital statistics from the
server: if b is a Buffer,
b.updateInfo;
It takes a fraction of a second for the information to come back.
Then you can do b.numFrames / b.sampleRate to get the duration in
seconds.
If you read a file into the buffer using Buffer.read, the info
should already be updated.
hjh
: H. James Harkins
: jamshark70@xxxxxxxxxxxxxxxxx
: http://www.dewdrop-world.net
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman
_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users