< Back to IRCAM Forum

Mubu maxsize attribute

Hello,

I have not been able to figure out the effect of the @maxsize attribute for mubu tracks. I expected that it would limit the size of what I am able to record and playback in a buffer, but it does not; with a maxsize of 5s specified at track creation, I am still able to record 50 seconds of motion tracking in my buffers.

What is the purpose of this attribute, and its effect?

Thanks

Hello,
the meaning of the maxsize attribute is what you said: define a maximum track size in order to instantiate the necessary memory when creating the track and not at runtime.
It seems to work well for me.
If the behavior is different for you it means that you have found a bug!
Could you send us an example to reproduce it?
Thanks for your help.

Giving a time for maxsize is just a shortcut that calculates the #frames based on the given sampling rate. With the default sr of 1000Hz that’s 5000 frames, if your data is arriving only at 100Hz, that makes 50s. I will clarify that in the mubu help.

Thanks, indeed, I have a lower sampling rate (around 10 FPS), hence it could probably store much more than 5s then. I suggest not to assume a sampling rate in the memory allocation, but rather give a direct setting of the maxsize in terms of number of elements.

1 Like