Error "Invalid frontend configuration" while running a nam file

Hi everyone,
I’m trying to run the Neural Amp Modeler LV2 plugin on a Raspberry Pi 4 with Elk Audio OS installed and an HiFiBerry DAC+ ADC Pro as audio interface.

I followed the official documentation and several examples, but when launching Sushi with my JSON configuration (e.g. conf.json) I get these two errors:

mind@elk-pi:~$ sushi -c conf.json
Invalid frontend configuration. Reactive, or None, are not supported when standalone.

and when I try the recommended alternative form:

mind@elk-pi:~$ sushi -r -c conf.json
Error reading host config, check logs for details.

Here is the JSON file I’m using:

{
“host_config”: {
“samplerate”: 48000,
“block_size”: 128,
“playing_mode”: “playing”,
“frontend”: “raspa”
},
“tracks”: [
{
“name”: “guitar_amp”,
“type”: “audio”,
“audio_inputs”: [
{ “name”: “input_l”, “device”: “hw:0,0”, “channel”: 0 },
{ “name”: “input_r”, “device”: “hw:0,0”, “channel”: 1 }
],
“audio_outputs”: [
{ “name”: “output_l”, “device”: “hw:0,0”, “channel”: 0 },
{ “name”: “output_r”, “device”: “hw:0,0”, “channel”: 1 }
],
“plugin_instances”: [
{
“instance_id”: “nam_amp”,
“uri”: “GitHub - mikeoliphant/neural-amp-modeler-lv2: Neural Amp Modeler LV2 plugin”,
“type”: “lv2”,
“parameters”: {
“model_file”: “/home/mind/my_nam.nam”
}
}
],
“connections”: [
{ “source”: “input_l”, “target”: “nam_amp” },
{ “source”: “input_r”, “target”: “nam_amp” },
{ “source”: “nam_amp”, “target”: “output_l” },
{ “source”: “nam_amp”, “target”: “output_r” }
]
}
]
}

However Sushi immediately throws the “Invalid frontend configuration” error, and with -r it says “Error reading host config” without loading the track.

I checked the official docs and the forum, but I’m not sure whether:

my JSON structure is wrong (e.g. using audio_inputs vs inputs, or plugin_instances vs plugins),

the plugin URI is incorrect (NAM LV2 doesn’t appear in lv2ls),

the frontend “raspa” is not valid for this setup,

or if Sushi is rejecting the file for another structural reason.

Does anyone know what the correct json structure should be for loading an LV2 plugin on Elk OS?
Or what could cause Sushi to fail reading the host configuration?

Any reference to the official documentation or working examples would be very helpful.
Thanks in advance!

Hi wakko and welcome to the forums. I realize the topic is a bit old, did you get this to work?

But for anyone having similar issues, that json config file does not look right. A good place to start would be this example config for an LV2 plugin. sushi/misc/config_files/play_lv2_jx10.json at master · elk-audio/sushi · GitHub
A few things to note is that block_size is not a known parameter. Neither is type in a track member. There is only one type of track in sushi.
audio_inputs and audio_outputs should contain numerical arguments and they refer to channel or bus indexes, not audio devices.
And yes, it should be plugins not plugin_instances.
The connections list is reduntant and will not be recognized by sushi.

Hope that helps to get you on the right track.
/Gustav

Hi Gustav, and thanks for your help.
It is not too old, since I am down to solve it and I’ve already correctly modified the parameters of your example, noticing some differences in terms of sound. So yes, it is working with the standard configuration. A further curiosity:
Is there a feature / peculiarity a nam file must have to work properly? Or may I download / create any ‘feather’ nam file and it should work? Thanks

1 Like

Great to hear! Any nam file should work. Some may be too heavy to run well on a RPi4 and may cause stutter and glitches. The feather ones definitely do work though.

Are you building the lv2 plugin from the official github or from our fork here ?

Iirc the original uses an LV2 string parameter to load the nam file, which is not supported in sushi. Our fork has a feature to load nam files from an environment variable instead as a workaround. That also allows you to load multiple captures and switch between them without glitches as all are loaded in memory.

Thanks again.
Btw, the forked one. May we assume that correctly modifying the json will let the nam file work?

Since I am not using the “midi” support and neather the “program_change_connections”, may I use the json in sushi/misc/config_files/play_lv2_jx10.json at master · elk-audio/sushi · GitHub as the simpliest example?
Of course I will remove the upmentioned parts and correct the plugins info with the correct one in my erroneous part “plugin_instances”?