Faust LV2 plugin

First of all I would like to thank developent crew for the amazing synth!
I’ve been using Zynthian for almost a year and I love it.
I’m an brazilian acoustic engineering student and my conclusion work it’s about Zynthian.
It will be complemented by my own plugin, so I’ve been working with Faust programming language for a while and now I’m trying to make my file run on zynthian.
Faust can export an linux lv2 64 plugin, with the .tll and .so files. I pasted it to zynthian-plugins/lv2 directory on raspi but it’s not appearing on my layer list.
Any suggestions to make it work?


Hi @jangowdavi!

Nice to meet you! And welcome to the zynthian community! :wink:

Have you tried to click “search for new plugins” button from webconf->LV2-Plugins?


1 Like

It’s true @jofemodo, when I searched for new plugins it appeared on Audio Generator List.
So I’ve restarted the system and went to New Generator Layer, selected the plugin but got stucked on MIDI Channel’s list! And I mean really stuck, can’t go anywhere and had to restart by cutting the power suply. I wonder why the plugin went to Generator List, I was expecting it goes to MIDI Synth list.


What LV2 extension are you using for MIDI? You should be using “event” extension.
Anyway, it shouldn’t get stucked. Please, take a ook to the logs and send the relevant lines.

Maybe obvious, but for a sanity check are you exporting a ARM binary or a x86 one?

Where does this extension must be? On Faust the standard for MIDI keybord usage is to put a “freq” string on frequency vector. The files extensions are .so and .ttl.
Is there another way to assign the MIDI channel?

Yes. Or at least I think it is, the only option is to export an Linux LV2-64bits. There is some variants, which are lv2-64bits-qt4 and lv2-64bits-qt5.

Zynthian runs a 32-bit version of Linux compiled for the ARM architecture. I guess you are creating a 64-bit image for Intel (x86) architecture. That won’t work!

I see. :frowning:
Maybe if I get the C++ source code it can be possible to create an 32-bit ARM code.
Is there any example codes of usable plugins which do this kind of integration?

1 Like

You need to do the compilation of your plugins in arm.
For this, you can try cross compilation, but hard to setup, or install (or compile) Faust in your Raspberry to compile your plugins directly on the rapsberry, it will make an ARM LV2 plugins

@lguyome45 Well, I’ve installed faust on raspberry with a different SD card and then I used the faust2lv2 function, which return me a .lv2 folder with .so and .ttl files, but still have the same problem. I’m using a Raspbian distro , and the machine itself is in 64 bits, so the compilation will return and 64 and not 32 bits that I need to use with zynthian. I wonder if I should install faust on the same zynthian’s SD card to get an 32 ARM plugin.

Yes, of course you can.

Allright, when I compile it from Zynthian OS it creates a valid plugin!! :slight_smile:
But it couldn’t recognize the MIDI keyboard, other knobs of the controller were assigned by midilearn. @jofemodo You comment about this ‘event’ extension, where it should be? I would like it to work as a synth and not as a generator like is now.

1 Like

The Faust export utility already use the event extension, as it’s the LV2 standard from a few years ago, so don’t worry about this too much. You should take care of how you define the MIDI input in your program and how is interpreted by Faust when generating the LV2. You need a MIDI input port in your plugin for being recognized as a synthesizer, and there are the LV2 “plugin classes”, that should be correctly set by Faust…

Anyway, it seems you are near of reaching your goal …

Regards … and good luck!

I’ve been able to use the plugin by running some terminal options to get poliphony as follows
faust2lv2 -nvoices 4 plugin.dsp
To get it as a MIDISynth, it needs to have the metadata [ declare type = “MIDI Synth”; ] on code’s scope.
Working to improve the code and enhance audio quality, when I get a reliable version it will be uploaded to github! Thanks for all :smiley: