Oopsy : Issues getting Petal to run at 96kHz

I’m having trouble with certain [gen~] patchers working on the Daisy petal at 96kHz. Trying to whittle it down, but was wondering if anyone has had similar issues. The tl;dr is that some patchers seem to only work at 48kHz and it doesn’t seem linked to patch complexity / DSP usage, at least as benchmarked from within Max.

Possible culprits:
1 - the [codebox] object in [gen~] with multiple outlets.
2 - using both [in 1] and [in 2] on the petal (i.e. stereo inputs).
3 - the phase of the moon.

For example, the [gen~] below will only run at 48kHz. It’s a high order crossover… knob3 controls the crossover pitch - left output is the bass; right output the treble.

Any thoughts most welcome.

/Luke


----------begin_max5_patcher----------
1125.3ocwX10aaaCEF9Z6eED515Zvuo3vvPJP2ECXEX.8xgh.EaZG0IKJHQm
3rh9ee7CoD6T6ZZXwrahjNlLG9bNGc3q32lNI6N8NUWF3W.+MXxjuMcxDuIm
gI8OOIaSwtEUEc9gksPuYip1jMK7aF0Ni2985pkfFkonBTUt9dSG.+dJPuZ0
vHq2tortRY7+aP8FKW5mr9tu9dDls2P0aMCiE1asovr39x5021pVXBKYJkOG
NCPfB2EDV5tfgygfu3ly2mN08mYQhVs5Q6B4GHytT.bPkZIMVTDWLHLNwCB0
CBG44.O9bvbbPhkC7kCBUhdS.g5.AGMHxKGD2pNwf.O55G9iqeJ83q+ATClL
O0nBK9rLvWNOZ8u0HuJzNU+f+3ie5u98O9g+7yfEs5tN8Cp1n6DPxu7zEy2I
.km6uPHonSvZUM3lUkUJvtSxC9HUeviiC9jYuYmIChYz4BlEPjGWINIov6s8
wA+VzYM3EmzHTlegy7Wn3qJmcJJ9UPk9wXg3xK7vb9dLPDontaiQuJ1hMJbL
aUP3r4XagFBA83gSR+bcS2SyWXZql2sQqM2G8FTxTvJOzBAlmBVaJZK1.9mZ
8cjaaJsqAvMKUqJ1VY.XxbvMVdAbn6lhcVAMh4wtEwywrE5JcafH3bljCkRL
SP4RjPLyZRfgRrDQY4V8R44NSPFU.YVixbNk6R2Nn+og1U5ZSW4+5CrHWUw0
Dwwg2cfIo5ZcgQAvw95iPL18pQzvNRv85wk.AQDmfHTzJTIWbiNDyqARlP8P
cOZzqWWohlhQUVDB6SQbeJJHmXrA7cf3yPrDvVH4g4oqyV2inX6XI3IfPrW3
GWjBBssliFNT1aP6Swd4zjra06hVhKdT2I19MIL22dETw6e3+MzXipHCAK4j
41MH9uL9LaDbhBUm45hMdyYensrnJ67oSoemPBKUaAhh+nlROz8I5eJy9Bkr
px5WeDb9+eN6GFH5zaaWLTl0q+E7hRskpNSYcgoTWu2XbeP.3Tw5XcjSVzY8
D6vkitcoxKDEkdW65+bLWCudWiNmqGk3KOBHcxctdOwhwShwvSzX7DKI0LQ4
ZRJpYXw7NIBOBwWZTPlBFixy3SzM.+F3ZQJJpFZjd9tAnqLyRhvQxQnB5UcM
OAQjwvSvX2+.MFdBEy1EWqmPw1HEcjM8KZZdP010OZuOr5b9Z3jaxm4errN7
nWTZVq5gxgw6UjjUzZEcXrJN11FzjriG9f3rMZaEe81x9hdKcVW1Ydp50BMd
QNy1kk5OaJLa6t8Sp5sAkMY8mM0gQh6Vuprp54yYZxy+hUOVuL39SgZVu4CN
SJrjhP9ychfHBL2em8FFauDW+bPCShxnRH1MTJGKnL+c4XBi3O.qWMM7K9Bh
jAO.k4PZ3NqIzAGxkMVV6N2AWvV.GD7YKEZ0M51gbpcpxmG+VidcawxR2QNO
zPMjhCgaegTq8W8gceLoOltwFPKGlyP8fWfqKaz0TDpxxV10LespNa52m9ef
+69p.
-----------end_max5_patcher-----------

Hi Luke,

The performance response on the Daisy hardware can be quite a bit different to in Max, due to different CPU architecture, float bit depth, and so on; but one good thing is that on the Daisy it is much more predictable. E.g. if a patch works at 48kHz but not 96kHz it is almost certainly CPU load; at 96kHz the CPU load is almost exactly 2x the CPU load at 48kHz.

If you have the Patch or Field, you can see the exact CPU usage on screen. If the CPU usage at 48kHz is around or above 50%, it will almost certainly not work at 96kHz. If you don’t have Patch or Field, you can observe the flashing of the LED on the Seed. It flashes at 1Hz, and the pulse width indicates CPU load: if at 48kHz, the LED is on for more than half a second, then the CPU load is >50%, and it won’t work at 96kHz.

Increasing block size also has an impact on CPU load, but that’s more logarithmic – there’s almost no difference between BS=48 and BS=16, but below that the CPU starts ramping up quite quickly.

Some operations are more expensive on the ARM CPU – using the “FASTMATH” option might lower CPU usage, or using fast approximation gen~ operators like “fastsin”, “fastcos”, “fasttan”, “fastexp”, and “fastpow” can sometimes make a significant difference.

Using stereo input, or multiple codebox outputs, should have basically no impact whatsoever on CPU load.

The patcher above was missing subpatchers (xover, swtoggle) so I couldn’t really tell what was going on.

Graham

1 Like

Hi Graham! Apologies for the incomplete attachment. Everything I’m working on is for an open source pedal library that’s in development:

I’ll definitely take your advice and hook up a Field do see the CPU load. I’ve tracked it down some more and it looks like FASTMATH seems to help a lot as well… many thanks there.