Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LV2 port #12

Closed
KottV opened this issue Sep 7, 2020 · 15 comments
Closed

LV2 port #12

KottV opened this issue Sep 7, 2020 · 15 comments

Comments

@KottV
Copy link

KottV commented Sep 7, 2020

Hi,

There is active work on JUCE LV2 in Camomile sourcetree: https://github.com/pierreguillot/Camomile/tree/dev/imp-lv2-support/Dependencies/juce_audio_plugin_client_LV2

Could You look at that and maybe better to join yours code?

@falkTX
Copy link

falkTX commented Sep 7, 2020

I backported some of their changes when they started. but now I see they made some non-backwards-compatible ones. I cannot import that as it would break the existing plugins.
From what I understood in another thread, there was no interest at all on their side to work together on this :(

@KottV
Copy link
Author

KottV commented Sep 7, 2020

You mean that thread pierreguillot/Camomile#70 ?
At least I know why wrapper was split in two parts.

I'll try to use their code in my builds. Just to see if it work at all for general plugins.

@falkTX
Copy link

falkTX commented Sep 7, 2020

No, that is an old conversation. There was something newer, in yet another LV2 wrapper fork.
But anyway, I will keep the current version and just adapt a bit where needed. The MIDI Buffer usage needs to be updated to latest version, but the rest already works well.
Some of the code can be simplified to use new lv2 utils that did not exist back when it started, but it does not mean it does not work already, it is just that we can make it nicer looking.

One potential task/change to do is stop using control ports and use new lv2 parameter API, so that DSP side can change their own parameters. But usually this ends up being abused by plugins, so I am not sure this would have a good impact long-term.

@KottV
Copy link
Author

KottV commented Sep 7, 2020

I see. I have look a little more and think that Camomile's code won't work in common case. It's heavy modified for their needs (?).

One potential task/change to do is stop using control ports and use new lv2 parameter API, so that DSP side can change their own parameters. But usually this ends up being abused by plugins, so I am not sure this would have a good impact long-term.

Cannot say I understand that. But I trust You :)

On my side I've managed to build lv2 versions of some plugins with JUCE's cmake paradigm (pretty rough yet). At least these "new" plugins can be build automatically now.

@falkTX
Copy link

falkTX commented Sep 7, 2020

I see. I have look a little more and think that Camomile's code won't work in common case. It's heavy modified for their needs (?).

It just breaks the DISTRHO-Ports plugins that want state as a string (so it is understandable by humans, and editable too), also always enables latency port (most plugins do not have a need for this) among other similar things.
In order to keep the existing plugins working, I cannot use their version, as it would change how hosts see the plugin and break sessions/projects.

On my side I've managed to build lv2 versions of some plugins with JUCE's cmake paradigm (pretty rough yet). At least these "new" plugins can be build automatically now.

Would be nice to push these changes here at some point.
I know this juce version is a tiny bit out of date (check juce6 branch for latest stuff) but having a way to officially build lv2 versions would be amazing for most devs - they no longer would have to manually fiddle with makefiles, which is the biggest pain at the moment.
Might need tweaking of ProJucer to accept LV2 target, unless the cmake side can do that without ever touching ProJucer?
(I pretty much never use that tool myself, so I dont know the workflow for it)

@KottV
Copy link
Author

KottV commented Sep 7, 2020

Yes, it's possible to build plugins without Projucer(cmake, make, that's all), though for complex project may still better to use PJ.

https://github.com/jatinchowdhury18/ChowPhaser (worth to check :))
or
https://github.com/witte/Eq

@KottV KottV changed the title LV2 port by Pierre Guillot LV2 port Sep 7, 2020
@falkTX
Copy link

falkTX commented Sep 7, 2020

I mean, can you add lv2 support to a project by using an alternative juce version, without opening ProJucer?

@KottV
Copy link
Author

KottV commented Sep 7, 2020

Exactly. It needs your's LV2 Wrapper and modified https://github.com/juce-framework/JUCE/blob/master/extras/Build/CMake/JUCEUtils.cmake

But the project has to be in cmake already, like two mentioned above.
Another thing - Projucer from JUCE6 can generate Makefiles without X11.

@falkTX
Copy link

falkTX commented Sep 7, 2020

Alright that is great to know!

Sadly I do not have time to do much about this right now, finishing other projects first. But near the end of the year I will resume work on DISTRHO/LV2 and DPF as well.

@KottV
Copy link
Author

KottV commented Sep 7, 2020

I understand. And yes, LV2 port is working well)

I'd like to ask your thought about two things:

  1. In Camomile's fork wrapper is defined in AppConfig.h as #define wrapperType_LV2 wrapperType_Undefined
    and there is now declaration of getStateInformationString in juce_AudioProcessor.h

and it seems to work

Potentially it allows use wrapper as fetchable module without modifying juce_AudioProcessor.h

  1. In JUCE6 when use cmake there is no AppConfig.h by default (though it can be added by hands) and LV2 params (URI for examples) are defined in CmakeLists.txt directly.
    So I try to figure out how to deal with "classic" AppConfig.h and new cmake's behavior.

@mxmilkiib
Copy link

@atsushieno
Copy link

@mxmilkiib Hey. I'm seeing various LV2 ports in the world and I know this is one of those. A fact that might be interesting for you is that my aap-juce and aap-lv2 are quite separate. In aap-juceI have my own JUCE wrapper and plugin client for my own and the current version uses the original juce-framework/JUCE without any changes. aap-lv2 has nothing to do with JUCE either - it is more like a repo that depends on the Android ports of LV2 dev toolkits.

Therefore there is not actually things that my repos can be of any help, or anything that our codebase benefits from LV2 ports. When I created the plugin wrapper in aap-juce I learned from another LV2 port on how to generate metadata (for our own) in the past though.

@falkTX
Copy link

falkTX commented Nov 16, 2020

To those listening, I just updated this fork against latest JUCE master branch.

There is still no direct LV2 support in ProJucer, so we are basically in the same situation as before.
But at least everything in updated now.

I have cleaned up all the patches, feel free to grab at
https://github.com/DISTRHO/DISTRHO-Ports/tree/master/libs/juce-current/patches

@KottV
Copy link
Author

KottV commented Nov 17, 2020

Good news.

@falkTX
Copy link

falkTX commented Jun 22, 2022

another ticket to close, juce7 has official lv2 support now, no need for this ticket here

@falkTX falkTX closed this as completed Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants