I have knocked together a python script that instantiates a synth, connects MIDI and audio, selects presets, plays notes and monitors jack cpu usage. It creates a CSV with the engine id, test name, minimum CPU usage for this test, index of preset that gave minimum CPU usage, maximum CPU usage for this test, index of preset that gave maximum CPU usage, average CPU usage of this test for all presets tested. The tests are:
- Quiescent CPU usage, i.e. synth loaded but not playing any notes
- Mono, i.e. playing a single note (C4) for 5s taking readings every 100ms until 1s after release and taking maximum value
- Poly, i.e. playing a 5 note chord (Cmajor7) for 5s taking readings every 100ms until 1s after release and taking maximum value
- Crescendo, i.e. playing all 88 notes of a standard keyboard (A0-C8) in fast succession without release, holding for 5s taking readings every 100ms until 1s after release and taking maximum value
I have started it running on a RPi4 with Zynthian stopped but all other supporting services running, e.g. jack, ttymidi, etc. I estimate it will take approx. 3 hours to give results for all (83) Zynthian LV2 synths testing the first 5 presets of each synth.
This script currently only checks LV2 synths so needs to be expanded to include other LV2 plugins and other engines. If this proves useful it could be extended to include all these engines.
Note: The results are the current CPU load estimated by JACK. This is a running average of the time it takes to execute a full process cycle for all clients as a percentage of the real time available per cycle determined by the buffer size and sample rate. This is the start of benchmarking which may or may not be useful… let’s see.