Topic: raspberry pi 4 analog sound high volume creating touble

Inspired by the recently upgraded pianoteq and talks about raspberry pi here, I got myself a RPI4 as well. Running a newest RPI OS desktop version. I think it runs okay after some tweaks, like enable multicore rendering MAX etc...

Yesterday I swithed my USB speakers to a presonus E3.5, and did quite some other mess-arounds with the small box. Then all the sudden I cannot get the smoothness back, whatever I tried (like run in headless mode, stop xwindow, etc). Thing is that I got some broken sound in keys like Bb5 easily, also when driving polyphony a little bit high, they can be different broken sound though, but hard to tell.

Today when casually tweaking things the wife and kid ask me to turn down the volume for being too loud, I did do in the mixer (down from 100%/+4db to 82%/-1.0xdb), and the problem mostly was gone. Then I switched back and forth a little, to make sure it is the high volume.

Could be some bug in ALSA or something, and I think it is worth mentioning in case others run into this too.

-------

Also previously on some much more powerful windows machines (Still I use cheap CPU, like ryzen3 or intel i3), I got slight broken sound playing Bb5 chord occacially too, mostly with steinway B preset. Perhaps these keys take more CPU power for have 3 strings? Now a day I mostly use Bechstein DG and it is better.

-------

Also when testing, I found If I play a key repeatedly with damper pressed, the polyphony go up in a linear manner. While to my best knowledge it should be keep using one "channel" only I think? Because when a key is pressed down one more time, the effect of late strik should be overriden. Perhaps the late "sessions" are still used to keep calculating the other effects like reverb? But don't think they should last that long to keep the overall polyphone growing steadily.

Re: raspberry pi 4 analog sound high volume creating touble

zhenlw wrote:

-------

Also when testing, I found If I play a key repeatedly with damper pressed, the polyphony go up in a linear manner. While to my best knowledge it should be keep using one "channel" only I think? Because when a key is pressed down one more time, the effect of late strik should be overriden. Perhaps the late "sessions" are still used to keep calculating the other effects like reverb? But don't think they should last that long to keep the overall polyphone growing steadily.

It does replace the original sound. The n+1 behavior you see is the added complexity of harmonics and resonances.

For crackling, it could be preamp distortion. I would also check the CPI (cpu performance indicator in the settings) while you reproduce the issue to see if it is buffer xruns. If so it may be struggling to render more complex notes and chords.

Re: raspberry pi 4 analog sound high volume creating touble

Thanks ethanay. I understand the resonances, but the behavior still does not looking very correct to me: if I leave the pedal up, the plyphony usage dies out very soon. While with pedal down and repeat of a note, the plyphonys last very long (it die out soon after 10 repeats, this is unnatural too).

We can understand when repeating, the string won't be viberating for the first strike, but for the second one. If the resonances of the first strike are still there, why don't it keep going if I release the pedal? Don't feel consistent here.


The crackling are likely about the Broadcom sound driver, because when that happens, the CPU usage are higher and I get quite some more red lines in the CPU history, while normally it doesn't happen.

These days I switched back to the USB speaker (KEF egg duo), now there is no CPU overload issue at all.

I also tried several different raspberry pi linux distributions. ubuntu 20.10 arm64 doesn't work fine at all with the built-in audio, at any volume level, but very good with the KEF egg. Archlinux armhf looks good with KEF too, didn't really try built-in audio, but the kernel looks the very much similar to raspberry os. Manjaro arm64, good too with KEF.

Note I used multiarch on 64-bit ubuntu, and an "archlinux-32-bit-rootfs + chroot" setup on 64-bit Manjaro (rather hard to setup), to run the 32-bit arm program. It was an interesting journay, also because I experienced quite some different kernel/GPU drivers and desktop systems. Overall pianoteq 7 runs very good on these platforms---I feel the GUI overhead is very low.

Re: raspberry pi 4 analog sound high volume creating touble

zhenlw wrote:

Thanks ethanay. I understand the resonances, but the behavior still does not looking very correct to me: if I leave the pedal up, the plyphony usage dies out very soon. While with pedal down and repeat of a note, the plyphonys last very long (it die out soon after 10 repeats, this is unnatural too).

We can understand when repeating, the string won't be viberating for the first strike, but for the second one. If the resonances of the first strike are still there, why don't it keep going if I release the pedal? Don't feel consistent here.

My explanation for this (which may or may not be accurate!): most of the complex resonances occur with pedal and key down. Much less sound processing needs to occur with either key or especially pedal up. This also relates to polyphony: it is not necessarily 1 polyphony unit per key, but several due to complex modeling layers. eg the note itself, cabinet resonance, aliquot resonance, sympathetic resonance, damper resonance, reverb, microphone(s) can all each take up one polyphony unit to process, which is really a unit of allocation for CPU. Each note gets more "expensive" with more of these polyphony units being modeled, and polyphony units get generally more expensive with higher vs lower internal sample rates. So in CPU limited systems, it is best to explore what combination of reduced polyphony, reduced modeling or reduced sample rate produces better sound and feel for live performance.

That is why it lasts long: even though you might not hear it, it is still doing complex modeling of subtle nuances. And 10 repeats may get you to max polyphony at which point the engine consolidates polyphony.

As I said, this is an explanation...it may not be the correct explanation.