< Back to IRCAM Forum

Can't set samplerate

Hi everyone!

I’ve been working with the mubu library for some time and it’s great. However, I am having issues with a fundamental problem. I cannot set the samplerate nor the sampleperiod for any object, which instead seem to depend - no matter what - on the rate of the data received by mubu.record (see example below).

Similarly but mostly important, how do I force a samplerate for a mubu.process? This seems to be tied to the samplerate of the audio track that it processes.

Thanks!
Fabio


----------begin_max5_patcher----------
1177.3ocwX0saiqBD95To9NXEctraVv4+yU88X0pHrMwgcIfEfSR6p8c+L.9
2DbZ1zt8ToZqL.yLeCeyvf+0iOLZbh7DUON5ei9VznQ+BjLxIyJYTsfQi2SN
kxIZ2DGKnGkI+X7SUiYnmLN4eMBiPSZjyxbRgo9konFohx8LAmZbpJtVZAwj
tiIx2nnoFu2fQKlfdJBuXl80z01mwwSPQeuipjklZcgqE6kYdof5Uz3sbIAT
52ci+6Gev9Fd8z6FvJhHSt2h5PfFu79A8zo1WKmd+flI9q.48TiRFgCh2Y2O
d8ul8N1jSHh72Cf2S0ZRN8RDmxoDEgyCA434+4Pd5ZjCkXGhWd+H98fViLOm
2B1B.gvNKUsgJHIbmEPgvabX7huBdimE2h23Y0O+zYzr8kIkMteZoRKUaRYJ
X+8HKyryNIa9Vq4KJMGXziBHzzKf3GRS4.FYRQuwf5ADlPUxgXYofY5M3UCy
cWYtxGzaFDpzjS8icfoYUqE2es5TkjySHgmSolVvIozcRdFU0OVWCQf0qMMw
HEUS1WvoaYb+QDMtitfyLaRkboxu43nzsOvc2eMRoyoJjZVc7B2ZibPTPG1P
RzazrWcRiQmuy0Zb7UL9VEk9JMfy2n3yzqU9EabUi0EAeA2xURJ2tkpR2IkZ
XCZa9MFXRxOGD8dzNwtTiadQcnLWPm56vgB9dNtgAkECxyIkFYhrTjoGjDOr
Z+I8k9KitOglMnh5F1aWxIHORP3MjSb+82PV+HSjAjZ1qgx7Zydtw.bMutVe
SCUwb8aTvzQxC4qUIFsw3VtTqKHULpvPtH3TwWCoWsfTnHFuPDBMA81mUM2U
0d1J+AWnUccg5zlcDegZ3fX03v7rfE.5tQWGIwyOS6agcF4Q3XBMcnxhWtKb
91Zi1QAODXGkkuyb1o.GnpDoNDG9.gWdVUw9nsSDARjjB839J3RzTSnt4T7g
N4rfjxLu3z8jfYT2bIJN4EvBA8xPjKaUAEEp4p2Uyw5sNW3flwLCvPt8ha9r
idnXEx8GFuNFsNdsENKV69a0Jzx0nk3fh5mSaSGCVuwG9tLer2xs3urHqN8J
FMzYDCxzanwMpjyxE11PBTssZitPIygPtlcfFpJf.pRHxka2poly6i4iqixA
uv.z00Dihj9yHayEQJQVzy99JrTDHaL5Y6wLFRdNMK5EpN5YPw13fs9D7qBE
Mit0NRnVvW8m2QJFilrbNbmxEt6aLaA5sZBe5vgrmp9ucoZxAZ1Fv2.CtgXL
JFT.vWpXTazqesEurp39G68W.bKUYQ+Sv6rcGWQste9ktWyW++yEXtJcqBx0
7sP.e9ceQlo3Ut7d7ah73qyZt.8d8LlyDW7EYbticfyhIZYoJsVq0eokntsN
Bw.lnoCgu0fd6jFN5ey1ydiv21d1OMPTu9VfqfzR7+LbgkC3AnO.OX4mbLe9
sXu0eX1CeS3ql48QXvY2DoZYPCVkEQJJfBr5pk3sETB4G99EV8j+2Lg+297d
nVosqF+RplBANylYfh.kJe2bmVT8ctFuWBbHQIqlHaQq0ztpT1qTqgymqZAD
pl83CvD9OAVGEqA
-----------end_max5_patcher-----------

Hi Fabio,

well, the patch records events into a time-tagged track, so the sampling rate is only used to calculate the max size from the hint in seconds. Mubu does not do the resampling for event data, that’s up to you.

Can you clarify please?

I thought that sample rate was also responsible for the timing of mubu process. Now I see that it is done through sample size attributes (i.e. window size), which are specific to the features to extract.

Thank you. I imagine samplerate works the same way in non time-tagged tracks?