Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Linux

Reply
 
Thread Tools Display Modes
Old 07-20-2022, 06:36 AM   #321
mike@overtonedsp
Human being with feelings
 
mike@overtonedsp's Avatar
 
Join Date: Sep 2018
Location: Oxford, England
Posts: 218
Default

Quote:
Originally Posted by mschnell View Post
Just providing it does not really help. The API definition would need do force using the dedicated (DAW driven) GUI rather than directly using the OS, in order to achieve what I have in mind.

-Michael
Wow, so in that world you get to write plug-ins and I don't because I want to provide more sophisticated UIs than the built in SDK primitives on their own permit? I'm advocating choice, which I think is always better.

(Hint, most professional plug-in developers don't use the SDK primitives and instead build their own UIs which draw into the HWND / XWindow. I don't know the details of their code, but I don't know how would you construct something like e.g. FabFilter Pro-Q style UIs with VSTGUI?)
mike@overtonedsp is offline   Reply With Quote
Old 07-20-2022, 07:45 AM   #322
mike@overtonedsp
Human being with feelings
 
mike@overtonedsp's Avatar
 
Join Date: Sep 2018
Location: Oxford, England
Posts: 218
Default

I think we're reaching the point of diminishing returns, certainly in terms of what I can contribute to this discussion. I've set out the technical reasons (and reservations) I have - and I don't expect to change anyone's mind, just give (hopefully) an informed perspective from a developer point of view.

Personally I would recommend that anyone sufficiently interested should look at the available plug-in SDK options, its entirely possible that in doing so you will come up with some radical insights, but its also possible that you will gain an understanding of why the existng APIs do things the way they do.

My personal bet is that we will see CLAP evolve (and I really hope they also change the name, please, seriously) and that quite possibly as more developers become involved and a greater understanding of different and varied use cases occurs, it may eventually just converge to something like VST3 or LV2 anyway.

There is often a lot of hype around new solutions to perceived shortcomings, new standards, SDKs, APIs etc - and that has certainly been true here - but there are (often subtle) reasons why the existing solutions are designed the way they are.

It's generally safe to assume that no experienced developer starts out with the notion of 'I'll deliberately design a bad solution to this problem', and that's worth considering for anyone who believes it to be the case with the existing plug-in APIs. It's quite possible you just haven't appreciated why it is how it is.

Last edited by mike@overtonedsp; 07-20-2022 at 07:50 AM.
mike@overtonedsp is offline   Reply With Quote
Old 07-20-2022, 10:10 AM   #323
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Quote:
Originally Posted by mike@overtonedsp View Post
I want to provide more sophisticated UIs than the built in SDK primitives
Of course such a plugin API would need to provide support for decently sophisticated UIs.

I do see that this might result in performance degradation as everything would need to be multi-platform aware. No problem with me, as this is just the GUI thread and will (at least hopefully) not affect audio performance .
-Michael
mschnell is online now   Reply With Quote
Old 07-20-2022, 10:55 AM   #324
mike@overtonedsp
Human being with feelings
 
mike@overtonedsp's Avatar
 
Join Date: Sep 2018
Location: Oxford, England
Posts: 218
Default

I'm done. VST3 works just fine for me right now.
mike@overtonedsp is offline   Reply With Quote
Old 07-20-2022, 11:44 AM   #325
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
Default

Quote:
Originally Posted by mike@overtonedsp View Post
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 07-20-2022, 05:22 PM   #326
robbert-vdh
Human being with feelings
 
Join Date: Nov 2020
Posts: 275
Default

Quote:
Originally Posted by mike@overtonedsp View Post
VST3 provides this too I believe. I found that on Linux some hosts originally elected not to call it though, which was er, interesting to put it politely (ardour I'm looking at you... ) but it is part of the SDK.
No, VST3 has InitDll and ExitDll functions on Windows that don't take any arguments, bundleEntry and bundleExit that take a library handle on macOS, and ModuleEntry and ModuleExit that take a library handle on Linux.

Quote:
Originally Posted by mike@overtonedsp View Post
You're essentially describing what my own X11 GUI framework does on Linux. It provides an abstraction from the lower level X related stuff, which can then run in its own thread, or the host's UI thread (e.g. VST3), that way my higher level plug-in UI code just has to deal with the concept of UI objects like knobs and switches, and event handling callbacks triggered from user input without caring about the thread safety issues managed by my UI framework underneath.

Beware though that thread safety is an especially tricky issue with X11 (or more correctly with XLib) and needs to be well tested. (You could put it in the general category described by the old saying about multi-threaded programming e.g. "If you write a multi-threaded program, you will f*ck it up. If you think you haven't f*cked it up, you have, but you just don't know it yet... " ) developer humility in the face of X11 / XLib is advised...
Yes, like I said, on Linux you should be able to do your GUI however you want. But the problem I pointed out is that in VST3 the GUI callback functions are not marked as thread safe, and some hosts (or well only REAPER) will punish you if you call them from the wrong thread. REAPER will run into memory corruption issues if you call IPlugFrame::resizeView() from anywhere that's not an IRunLoop callback. Similar things happen with context menus. These APIs were initially also marked as main-thread-only in CLAP, but we changed them to require hosts to implement them in a thread safe way so you don't have to emulate the Windows and macOS GUI model on Linux by integrating into the host's event loop.
robbert-vdh is offline   Reply With Quote
Old 07-20-2022, 11:03 PM   #327
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Quote:
Originally Posted by robbert-vdh View Post
These APIs were initially also marked as main-thread-only in CLAP, but we changed them to require hosts to implement them in a thread safe way so you don't have to emulate the Windows and macOS GUI model on Linux by integrating into the host's event loop.
To me its very obvious - in any OS - that any GUI related API calls need to be done on the GUI thread ? Is it really a good idea to force the host to check the thread and eventually transfer the call to another thread with any occurrence (while the plugin code supposedly already knows which thread is is currently handling) ?
-Michael (recently having played with doing VST3 with JUCE and did consider such issues )
mschnell is online now   Reply With Quote
Old 07-21-2022, 02:48 AM   #328
cern.th.skei
Human being with feelings
 
cern.th.skei's Avatar
 
Join Date: Sep 2007
Location: trondheim, norway
Posts: 363
Default

i am working on a collection of plugins, and will initially release them in clap format only, and for linux (mac/win people have enough plugins already, haven't they?).. i do have partially working vst2/3 adapters, but i'm in no hurry to work more on them.. depends on the response, maybe.. there are also other (and probably much better) wrappers in progress, so i might wait for those instead..

plus, i also ported a bunch of (20+) plugins from other formats (ladspa, jesusonic, etc) or other platforms, to clap/linux, to see if the mip2 framework was getting 'good enough' or not..

(the plugins will be released when i feel the recently added opengl gui is in a bit better shape)

the clap era has just begun.. :-)
__________________
torhelgeskei.com
cern.th.skei is offline   Reply With Quote
Old 07-21-2022, 05:11 AM   #329
fabio77
Human being with feelings
 
Join Date: Jun 2022
Posts: 374
Default

Quote:
Originally Posted by cern.th.skei View Post
i am working on a collection of plugins, and will initially release them in clap format only, and for linux (mac/win people have enough plugins already, haven't they?).. i do have partially working vst2/3 adapters, but i'm in no hurry to work more on them.. depends on the response, maybe.. there are also other (and probably much better) wrappers in progress, so i might wait for those instead..

plus, i also ported a bunch of (20+) plugins from other formats (ladspa, jesusonic, etc) or other platforms, to clap/linux, to see if the mip2 framework was getting 'good enough' or not..

(the plugins will be released when i feel the recently added opengl gui is in a bit better shape)

the clap era has just begun.. :-)
I hope reaper will get clap on board soon, because this all sounds very interesting. (I know I could install qtractor for testing)

For a beginner, what would be a good way to learn?
fabio77 is offline   Reply With Quote
Old 07-21-2022, 06:15 AM   #330
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
Default

I just hope someone will create a "Clapper" plugin. I miss that Roland Hand Clapper sound from the 80s . . .
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 07-21-2022, 08:09 AM   #331
cern.th.skei
Human being with feelings
 
cern.th.skei's Avatar
 
Join Date: Sep 2007
Location: trondheim, norway
Posts: 363
Default

Quote:
Originally Posted by fabio77 View Post
For a beginner, what would be a good way to learn?
you mean a beginner in plugin development, or clap specifically? i guess it depends on your coding preferences and stuff.. (i personally like to go as low level as i can, but most others like it a little bit more higher level, i guess).. i don't have much more advice than just jump into it.. it's easier than you think! :-) .. wade through the links on http://cleveraudio.org/, like the the examples there, and you will probably find somewhere nice to start..
__________________
torhelgeskei.com
cern.th.skei is offline   Reply With Quote
Old 07-21-2022, 08:13 AM   #332
fabio77
Human being with feelings
 
Join Date: Jun 2022
Posts: 374
Default

Quote:
Originally Posted by cern.th.skei View Post
you mean a beginner in plugin development, or clap specifically? i guess it depends on your coding preferences and stuff.. (i personally like to go as low level as i can, but most others like it a little bit more higher level, i guess).. i don't have much more advice than just jump into it.. it's easier than you think! :-) .. wade through the links on http://cleveraudio.org/, like the the examples there, and you will probably find somewhere nice to start..
Yes, an absolute beginner

Thank you for the link. I will take a look on it.
fabio77 is offline   Reply With Quote
Old 07-21-2022, 10:43 AM   #333
robbert-vdh
Human being with feelings
 
Join Date: Nov 2020
Posts: 275
Default

Quote:
Originally Posted by mschnell View Post
To me its very obvious - in any OS - that any GUI related API calls need to be done on the GUI thread ? Is it really a good idea to force the host to check the thread and eventually transfer the call to another thread with any occurrence (while the plugin code supposedly already knows which thread is is currently handling) ?
-Michael (recently having played with doing VST3 with JUCE and did consider such issues )
There is no GUI thread or main event loop on Linux.
robbert-vdh is offline   Reply With Quote
Old 07-21-2022, 12:42 PM   #334
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

I know, but (AFAIR) the GUI libraries are not thread save, nonetheless.

Several years ago I worked with the Lazarus team, who provide a very versatile multi-platform GUI library (Windows, MAC, GTK, QT, ...) with a common API for the user code. Something similar might be desirable for plugins.

-Michael

Last edited by mschnell; 07-21-2022 at 12:48 PM.
mschnell is online now   Reply With Quote
Old 07-21-2022, 01:48 PM   #335
robbert-vdh
Human being with feelings
 
Join Date: Nov 2020
Posts: 275
Default

Quote:
Originally Posted by mschnell View Post
I know, but (AFAIR) the GUI libraries are not thread save, nonetheless.

Several years ago I worked with the Lazarus team, who provide a very versatile multi-platform GUI library (Windows, MAC, GTK, QT, ...) with a common API for the user code. Something similar might be desirable for plugins.

-Michael
They are not (and I never claimed that), but CLAP's GUI callbacks being thread safe means that you can just do GUI's 'the normal Linux way' by spinning up your own GUI thread or doing whatever your GUI framework is doing, instead of being forced to hook into the host's event loop using callbacks and trying to hack your GUI framework into working with that. Aka, you can do GUIs the Linux way on Linux, instead of being forced to do them the Windows or macOS way. (or spooling specific events to the host's event loop, like what I'm doing with yabridge)
robbert-vdh is offline   Reply With Quote
Old 08-02-2022, 03:57 AM   #336
mike@overtonedsp
Human being with feelings
 
mike@overtonedsp's Avatar
 
Join Date: Sep 2018
Location: Oxford, England
Posts: 218
Default

So I mentioned in another thread, just for fun I decided to see what all the fuss is really about - and there is now a CLAP compatible version of the ACM-3SA plugin available to download:

https://www.acmt.co.uk/products/download-acm-3sa/

Only tested in Bitwig so far (which seems a bit odd to be mentioning on the Reaper forum) so YMMV - but Bitwig seems to be the 'reference' (only?) host at the moment
mike@overtonedsp is offline   Reply With Quote
Old 08-02-2022, 04:00 AM   #337
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Quote:
Originally Posted by mike@overtonedsp View Post
Only tested in Bitwig so far (which seems a bit odd to be mentioning on the Reaper forum) so YMMV - but Bitwig seems to be the 'reference' (only?) host at the moment
Check the pre-release forum
vitalker is offline   Reply With Quote
Old 08-02-2022, 04:09 AM   #338
mike@overtonedsp
Human being with feelings
 
mike@overtonedsp's Avatar
 
Join Date: Sep 2018
Location: Oxford, England
Posts: 218
Default

Quote:
Originally Posted by vitalker View Post
Check the pre-release forum
Thanks - that's interesting - we can only really test with official releases at the moment (you can imagine that trying to test a new build of a new plug-in format against a host that might also have issues would be something of a challenge - especially when the SDK documentation and / or examples are not exactly complete, so there's some educated guesswork involved)

Last edited by mike@overtonedsp; 08-02-2022 at 04:24 AM.
mike@overtonedsp is offline   Reply With Quote
Old 08-02-2022, 04:36 AM   #339
fabio77
Human being with feelings
 
Join Date: Jun 2022
Posts: 374
Default

Quote:
Originally Posted by mike@overtonedsp View Post
Thanks - that's interesting - we can only really test with official releases at the moment (you can imagine that trying to test a new build of a new plug-in format against a host that might also have issues would be something of a challenge - especially when the SDK documentation and / or examples are not exactly complete, so there's some educated guesswork involved)
Just because I'm curious and want to understand all that I'm actual only am speculating from outside. But was it less work than for example migrate a plugin from vst2 to vst3?
fabio77 is offline   Reply With Quote
Old 08-02-2022, 05:04 AM   #340
mike@overtonedsp
Human being with feelings
 
mike@overtonedsp's Avatar
 
Join Date: Sep 2018
Location: Oxford, England
Posts: 218
Default

Quote:
Just because I'm curious and want to understand all that I'm actual only am speculating from outside. But was it less work than for example migrate a plugin from vst2 to vst3?
It's about the same - the VST3 documentation and SDK is more complete which helps - whereas CLAP appears to be just a github. Proper documentation is 'the other 90%' which you really need if you want widespread adoption.

Fundamentally it's just putting the same stuff into a different bucket.
mike@overtonedsp is offline   Reply With Quote
Old 08-02-2022, 07:50 AM   #341
fabio77
Human being with feelings
 
Join Date: Jun 2022
Posts: 374
Default

Quote:
Originally Posted by mike@overtonedsp View Post
It's about the same - the VST3 documentation and SDK is more complete which helps - whereas CLAP appears to be just a github. Proper documentation is 'the other 90%' which you really need if you want widespread adoption.

Fundamentally it's just putting the same stuff into a different bucket.
Ok, thank you. In the announcement of clap there was told of one case a vst was migrated to clap in one day. So I thought it would be easier maybe. But ok, as long as it isn't more work, although good news in my opinion

Again, thank you! For your Plugins, for your work and for your informations.
fabio77 is offline   Reply With Quote
Old 08-02-2022, 11:14 AM   #342
mike@overtonedsp
Human being with feelings
 
mike@overtonedsp's Avatar
 
Join Date: Sep 2018
Location: Oxford, England
Posts: 218
Default

Quote:
Originally Posted by fabio77 View Post
Ok, thank you. In the announcement of clap there was told of one case a vst was migrated to clap in one day...
That probably depends on the plug-in and the toolkit originally used to implement it.

It took me longer than a day to get something ported to CLAP, but that includes tracking down the SDK and other related resources from various KVR forums and githubs around the internet, building a C++ interface from the CLAP C API to my existing (C++) toolkit(s), a proof of concept plug-in, and then finally a port of an existing one.

(I realise there is a C++ 'glue' layer provided, but it worked out more efficient to build my own, rather than a glue layer for the glue layer etc)

I figured I'd done enough talking about it - and the best way to get a further insight was to port a plug-in. (I should caution at this point that it has come to light that there appears an issue when removing the CLAP plug-in from a Reaper session, in Reaper +dev0801 however I believe this will be fixed in the next Reaper pre-release - I used Bitwig as a kind of 'reference' host during development and that seems fine)

Last edited by mike@overtonedsp; 08-02-2022 at 11:24 AM.
mike@overtonedsp is offline   Reply With Quote
Old 08-02-2022, 11:44 AM   #343
fabio77
Human being with feelings
 
Join Date: Jun 2022
Posts: 374
Default

Quote:
Originally Posted by mike@overtonedsp View Post
I figured I'd done enough talking about it - and the best way to get a further insight was to port a plug-in. (I should caution at this point that it has come to light that there appears an issue when removing the CLAP plug-in from a Reaper session, in Reaper +dev0801 however I believe this will be fixed in the next Reaper pre-release).
This is really great! Thank you for this also. I hope this will pay off for you in future in some way. And maybe inspire other plugin developers too.
fabio77 is offline   Reply With Quote
Old 08-02-2022, 12:49 PM   #344
audiojunkie
Human being with feelings
 
audiojunkie's Avatar
 
Join Date: Nov 2011
Posts: 971
Default

Quote:
Originally Posted by mike@overtonedsp View Post
So I mentioned in another thread, just for fun I decided to see what all the fuss is really about - and there is now a CLAP compatible version of the ACM-3SA plugin available to download:

https://www.acmt.co.uk/products/download-acm-3sa/

Only tested in Bitwig so far (which seems a bit odd to be mentioning on the Reaper forum) so YMMV - but Bitwig seems to be the 'reference' (only?) host at the moment
Very cool!
audiojunkie is offline   Reply With Quote
Old 08-02-2022, 12:51 PM   #345
audiojunkie
Human being with feelings
 
audiojunkie's Avatar
 
Join Date: Nov 2011
Posts: 971
Default

Quote:
Originally Posted by mike@overtonedsp View Post
Thanks - that's interesting - we can only really test with official releases at the moment (you can imagine that trying to test a new build of a new plug-in format against a host that might also have issues would be something of a challenge - especially when the SDK documentation and / or examples are not exactly complete, so there's some educated guesswork involved)
The same growing pains have always existed when starting a new format for both the host and a plugin. It gets sorted in time. I'm just glad to see that you're on board with things, even if you started with misgivings.
audiojunkie is offline   Reply With Quote
Old 08-02-2022, 04:35 PM   #346
mike@overtonedsp
Human being with feelings
 
mike@overtonedsp's Avatar
 
Join Date: Sep 2018
Location: Oxford, England
Posts: 218
Default

Quote:
Originally Posted by audiojunkie View Post
The same growing pains have always existed when starting a new format for both the host and a plugin. It gets sorted in time. I'm just glad to see that you're on board with things, even if you started with misgivings.
It is what it is - I thought since I'd been discussing it here - and there has been a lot of hype about it, I ought to actually try using it. Interesting technical diversion. Same old stuff in a different bucket basically
mike@overtonedsp is offline   Reply With Quote
Old 08-03-2022, 12:14 AM   #347
fabio77
Human being with feelings
 
Join Date: Jun 2022
Posts: 374
Default

Quote:
Originally Posted by mike@overtonedsp View Post
Same old stuff in a different bucket basically
But finally not owned

Last edited by fabio77; 08-03-2022 at 03:55 AM.
fabio77 is offline   Reply With Quote
Old 08-03-2022, 12:34 AM   #348
fabio77
Human being with feelings
 
Join Date: Jun 2022
Posts: 374
Default

This video has been posted by someone in the KVR Forum (about minute 33:28):

https://www.youtube.com/watch?v=MhGDCNxZP9s&t=1942sa
fabio77 is offline   Reply With Quote
Old 08-03-2022, 01:19 AM   #349
mike@overtonedsp
Human being with feelings
 
mike@overtonedsp's Avatar
 
Join Date: Sep 2018
Location: Oxford, England
Posts: 218
Default

Just as well that they plan to use the graphics card to process the audio, because with HTML GUIs running in a browser there probably won't be any CPU left
mike@overtonedsp is offline   Reply With Quote
Old 08-03-2022, 01:33 PM   #350
fabio77
Human being with feelings
 
Join Date: Jun 2022
Posts: 374
Default

@mike

You can add your plugin to the CLAP database I guess. There are listed even beta versions. https://clapdb.tech/

Don't know if you want to. But if, tell it to this thread: https://www.kvraudio.com/forum/viewt...ac391#p8486220

or here, and I will post it.
fabio77 is offline   Reply With Quote
Old 08-23-2022, 04:33 PM   #351
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

New plugin in Clap format : Fluctus (FM synth)


Looks good !


https://bedroomproducersblog.com/202...nakst-fluctus/
X-Raym is offline   Reply With Quote
Old 08-23-2022, 07:15 PM   #352
audiojunkie
Human being with feelings
 
audiojunkie's Avatar
 
Join Date: Nov 2011
Posts: 971
Default

Quote:
Originally Posted by X-Raym View Post
New plugin in Clap format : Fluctus (FM synth)


Looks good !


https://bedroomproducersblog.com/202...nakst-fluctus/
It does indeed look good. And it is in fact a CLAP plugin. However, this particular forum is full of Linux users and the plugin notes state:

“The software is compatible with 32-bit and 64-bit Windows-based plugin hosts that are compatible with the CLAP plugin format. It is also available in the native FL Studio format.“

I suppose there’s always WINE and yabridge. We’ll find a way to make everything fit!
audiojunkie is offline   Reply With Quote
Old 08-23-2022, 07:27 PM   #353
fabio77
Human being with feelings
 
Join Date: Jun 2022
Posts: 374
Default

Quote:
Originally Posted by audiojunkie View Post
I suppose there’s always WINE and yabridge. We’ll find a way to make everything fit!
I don't know. Is there just clap-support with yabrigde? I mean I hope it will be.

EDIT: And I think it will be, if I understand it right and this is meant for windows-clap-plugins on linux

Quote:
Oh and on a completely unrelated note, I've been working on a CLAP and VST3 plugin framework
https://github.com/robbert-vdh/yabridge/releases
fabio77 is offline   Reply With Quote
Old 08-24-2022, 01:17 AM   #354
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@audiojunkie
I think such project could really benefit on hearing some linux users to consider a port to linux, that is why even if it is win only for know, this might be a good CLAP project to know :P
X-Raym is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.