MSPbuffer and sampling rate

Sep 22, 2006 at 7:38am

MSPbuffer and sampling rate

I just got bitten trying to use Fred’s buf.Op extensions for offset copying because I didn’t realise that the offsets are samples, rather than times. Looking at the javadoc for MSPBuffer, I see getLength and getSize which would in theory give me a way of working out sampling rate, but what’s the expected behavior if you set one or other?

Do you need to set both in order to get a particular sampling rate, or is that superfluous because setting either actually changes the size of the buffer?

I thought I’d sit back and ask what was supposed to be happening rather than rely on any conincidental behavior I could discover through trial and error…

B>

#27730
Sep 27, 2006 at 5:27pm

Hi Bruce,

The “official” sampling rate of a buffer~ is tied to the sampling rate
of its containing patcher. setLength uses this sampling rate to
calculate the number of samples based on the requested length. You can
use setSize to resize it to any number of samples.

Ben

On 9/22/06, Bruce Murphy

wrote:
>
> I just got bitten trying to use Fred’s buf.Op extensions for offset copying because I didn’t realise that the offsets are samples, rather than times. Looking at the javadoc for MSPBuffer, I see getLength and getSize which would in theory give me a way of working out sampling rate, but what’s the expected behavior if you set one or other?
>
> Do you need to set both in order to get a particular sampling rate, or is that superfluous because setting either actually changes the size of the buffer?
>
> I thought I’d sit back and ask what was supposed to be happening rather than rely on any conincidental behavior I could discover through trial and error…
>
> B>
> –
> Nihil Illigitemi Carborvndvm
>

#84189

You must be logged in to reply to this topic.