Topic: Raspberry Pi 4: Pianoteq 6.6, 98 polyphony, zero audio dropouts
Hey everyone, I'm excited to say I was able to run Pianoteq v6.6 smoothly without audio dropouts on the latest Raspberry Pi 4!
Here are the details. This was my first time messing with audio with the Raspberry Pi, and in hindsight this test could have been a lot cheaper (more below).
-----------------------------------------------------------------------------
My actual setup:
- Computer: Raspberry Pi 4 Model B 4 GB RAM
- Running unmodified Raspbian Debian Buster Lite (desktop GUI packages installed after)
- No real time operating system patches
- No heatsinks or fans (but also no case covering)
- Not overclocked (using factory 1.5 GHz)
- Audio Card: IQaudIO Pi-DAC+
- Piano VST Software: Pianoteq v6.6.0 Linux, Trial
- MIDI Song Played: Beethoven Symphony No. 6 "Pastoral" (5th movement) arranged for Piano solo
-----------------------------------------------------------------------------
Settings had to be tweaked down from maximum to allow for smooth playback. Here are the details:
- Operating System Setup: Followed the Raspberry Pi performance tweaks guide by Edgar Bustamante: Setup Guide
- Output: IQaudIODAC: Direct hardware device without any conversions
In hindsight, this $51.33 audio card wasn't necessary. I did a test using the default 3.5mm headphone jack output on the Raspberry Pi and while the sound isn't as "open" and "deep", the sound is similar and performance is identical. I had previously read that the default audio of the Raspberry Pi was horrible and would tie up the CPU. However it works, the result is that the default audio from the Pi without the sound card was very usable and even sounds good. It's just the audio from the sound card sounds better.
"Direct hardware device without any conversions" is important for performance.
- Sample rate: 96000 Hz
- Audio buffer size: 256 samples (2.7 ms)
If the buffer size is any smaller, audio crackles and dropouts start appearing. 2.7ms should be great for live performance, though I have yet to test this. Larger buffer sizes are not necessary (the smaller the better).
- Multicore rendering: MAX (from Edgar's guide)
- Internal sample rate: 24000 Hz
24000 Hz was the highest usable internal sample rate. The next highest option (32000 Hz) caused even 10-note polyphony to peak the performance graph with scary red vertical lines and would cause audio dropouts to occasionally occur. But using 24000 Hz caused zero audio dropouts even at 98 note polyphony.
- Maximum polyphony: 256
I didn't want polyphony to be capped. This is the highest setting.
-----------------------------------------------------------------------------
Here's how I tried to stress Pianoteq, as the screenshots below show:
- Network: A 200 MB file download test is running (also separately did a 100 MB file upload test)
- Other Software Running: Chromium web browser with multiple tabs, Linux desktop (i.e. Pianoteq is not running headless), VNC server and viewer (my Raspberry Pi is not hooked up to a monitor so these screenshots were taking remotely over the VNC software)
- Song Playing:
- The most complicated section of Beethoven's symphony
- With the "Cathedral" hall for more revert effects (to stress the engine)
- With the sustain pedal depressed the entire time (to stress the engine)
- Getting up to 98 note polyphony
Basically, the computer was being lightly used, the network was being heavily used, and the piano passages being played represent some of the most complicated passages a person could would play.
And Pianoteq took it amazingly well. With the decreased internal sample rate, there were zero audio dropouts. This is incredibly exciting! While there are some red vertical lines in the performance index, there were no audible crackles, dropouts, or static. It sounded like a very good piano VST with excellent audio quality and performance.
-----------------------------------------------------------------------------
Note on Testing/Audio DAC: I haven't tried hooking this up to a MIDI keyboard yet. This test is just playing a MIDI file that is being loaded. I can give a more thorough report on performance latency delays later when I use this setup with a keyboard.