Can we run Gen patches on linux with lv2? (i.e. way Mod Duo does?)

Iain Duncan's icon

Hi folks, I only just read about the Mod Duo today, and I see it runs internally as a little linux box running LV2. Is there a way for us to export Gen patches to run on linux machines outside of the mod duo scenario? I used to do live electronic stuff many years ago in Csound on linux and was able to get latencies that were massively better than on my current macbook pro, so this would be really nice to be able to do for at least parts of my rig.

Graham Wakefield's icon

gen~ code can be exported using the "exportcode" message to the gen~ object. The code exported is C++ and includes all the relevant headers etc. The task would be to map this generated code into the routines provided by the LV2 host/plugin system -- mostly about tying together the input/output audio vectors, any param/history objects, and optionally as needed providing an alternative routine to implement any [buffer] usage in a gen~ patcher, but optionally also replacing memory allocation routines etc (most of this is in the genlib.cpp file).

Iain Duncan's icon

Ah, thanks for the explanation Graham. Do you (or anyone) know whether folks have managed to use the mod duo exporting tool chain to export to other targets? Because (I think?) doesn't Mod Duo really just use LV2 under the hood?

johannes's icon

You're right, it's about LV2. From here:
https://wiki.moddevices.com/wiki/Max_gen~#Compiling_the_plugin

"To get your gen~ object working on the MOD Duo, you'll need to design one using only Gen's internal objects, without referring to objects outside the gen~ object. Only the objects inside will make it to the final LV2-plugin."

The shiro plugin Shiroverb e.g. is working as a LV2 plugin inside Carla/Ardour with a standard GUI.

https://github.com/ninodewit/SHIRO-Plugins

I was able to use falkTX "starting point" (with the little correction from sub26nico) from here:

https://github.com/ninodewit/SHIRO-Plugins/issues/5

With the current status of Max on Linux/wine it should be possible to develop LV2 plugins with Max on Linux/wine without booting windows or os x.

Sam Madden's icon

Sorry, did this go anywhere? I'd love to make some stomp style effects and use a LV2 loader type device for my Linux Bitwig install

D1rty Duck's icon

I would recomand to have a look on this forum https://cycling74.com/forums/gen~-juce
It's about how to use Gen-Code in Juce to make VST/AU Plugins, however JUCE can also be used to make LV2 Plugins.