This one has me baffled, maybe someone here can help diagnose what I’m seeing. I’m running my own cross compiled VST3 guitar plugin on Elk Audio OS, Raspberry Pi 4, and HiFiBerry DAC + ADC, setup shown below:
But when I run my plugin in sushi and plug in my electric guitar, I hear no sound out. If I loosen the guitar input (1/4" to stereo 1/8")) by pulling it out slightly but still allowing some connection, I hear a sound out. It sounds like what my plugin should do (overdrive), except there’s bad static sound as well. Not sure if this is from the poor physical connection or internal processing. I recorded the sound and posted to soundcloud:
I’ve tried both 1/4" inputs (using the adapter shown in setup picture), and changing the config for mono instead of stereo, and different samplerates, but I get the same result, complete silence when it’s fully plugged in, and the above sound when loose in the connector. The HiFiberry card has a jumper for changing input impedance, and I tried all these settings (0dB, 12dB, 32dB) with the same result (just louder for the higher dB).
I thought maybe the adapter cable was bad, but example mda fx guitar plugin works fine with my guitar fully plugged in, and it sounds the same when it’s loose in the connector. Here is my config file (which I copied from the mda fx config):
I cross compiled the vst3 using JUCE and the elk toolchain, as instructed in the Elk documentation (including the O3 optimization export):
https://elk-audio.github.io/elk-docs/html/documents/building_plugins_for_elk.html#cross-compiling-juce-plugin
And I also made all the required modifications to the projucer file.
If I use the exact same makefile and use just “make” on Ubuntu 18, the vst3 compiles and runs normally in my DAW (normal build, not headless) Note that this is using an intel based laptop.
When running in sushi I get no error, but I do have a high cpu usage for sushi, which might be correct (my plugin does alot of computation under the hood) but I’m not positive. I double checked and Im using the Release build, not Debug. Here is the usage printout:
As you can see, one of the sushi processes is at 99%. I did notice that increasing the buffer size from 64 to 512 helped me hear the underlying sound of my plugin better. Maybe the static sound is coming at the beginning or end of each buffer and not from the dsp in the plugin? Another thought I had was maybe I didn’t remove the GUI elements properly in my plugin source code, and it’s causing some kind of processing issue/high cpu usage there. I did use the Juce 6 build lines directly from the Elk documentation though, and that includes the headless build flag.
I’m not sure what to try next, so I wanted to ask here and see anyone has ideas. I’m using JUCE 6.08
Thanks in advance!
Update:
After reading this:
https://elk-audio.github.io/elk-docs/html/documents/building_plugins_for_elk.html#analyzing-and-resolving-xenomai-mode-switches
I’m wondering if the strange behavior and high process usage is being caused by mode switching. Is there a way to tell from my process output? My plugin uses some large c++ libraries like Boost and things for matrix computation so I’m not completely sure what’s going on in there with memory allocation.
2nd Update:
When I use a XLR to Balanced 1/4” connector I hear sound out when it’s plugged in all the way, but it still has the bad static sound. So I think I have two separate issues (one being the bad static sound and the other being the input connection issue). There’s a difference in the connector (left is Balanced from a mic, right is unbalanced guitar line in). The other difference would be the level (dynamic mic vs guitar line). Still don’t know why the mda plugin would work with the guitar fully plugged in, but mine doesn’t.