|
|
|
02-23-2017, 12:56 PM
|
#1
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
JUCE VST plugin example that uses the Reaper API
edit 7th August 2018 : Use new facility in JUCE that finally allows getting access to the VST2 host callback from the plugin. The modified JUCE source files are no longer needed and were removed from the example plugin repo. Unfortunately equivalent facility was not yet added for VST3, so VST3 support has been removed for now.
edit 30th June 2018 : Updated for JUCE 5.3.2 (develop branch as always), taking into account the rather extensive changes Roli had to make to accommodate Steinberg preparing to drop VST2 completely. Note that now the VST2 and VST3 SDKs included within the JUCE repo itself must likely be used for the project to build successfully. The latest JUCE/Projucer should automatically take that change into account, but if they don't, you can try changing the global path for the VST3 SDK manually in the Projucer.
edit 10th April 2018 : Updated for JUCE 5.3.1
edit 18th December 2017 : Updated for VST SDK 3.6.8/latest JUCE changes.
edit 29th October 2017 : Updated for JUCE 5.2
edit 5th July 2017 : VST3 stuff added
Git repository at :
https://bitbucket.org/xenakios/reape...st_example/src
The plugin doesn't actually do anything that interesting but shows how to :
1) Use the Reaper API functions
2) Get access to the Reaper track or take on which the effect has been loaded. The plugin implements the following features :
-Changing volume of the track from the slider in the plugin
-Changing the name of the track or the take from the text field in the plugin
-Visualizes the media item positions on the track with a simple timeline graphic
You will likely need the latest Juce (from the Juce Github develop branch), Projucer built from the source and Visual Studio/XCode to get the plugin built. There are probably bugs, so you will likely want to watch for changes in the git repo.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 08-07-2018 at 05:48 AM.
|
|
|
02-23-2017, 02:42 PM
|
#2
|
Human being with feelings
Join Date: May 2009
Location: Brazil
Posts: 323
|
This is very nice from you, Xenakios. I'm moving my projects to Reaper and using JUCE for some stuff right now, so this is insanely helpful. I'm diving into it next days.
Thanks so much!
__________________
Ceanganb
|
|
|
02-24-2017, 11:15 AM
|
#3
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Thanks a lot for your work.
As a really functional example an open source workalike to MidiToReaControlPath would be fantastic. (But don't bother on my behalf, I suppose it will be a rather long time until I get to get started with such things).
Thanks again,
-Michael
Last edited by mschnell; 02-24-2017 at 01:26 PM.
|
|
|
02-25-2017, 12:50 PM
|
#4
|
Human being with feelings
Join Date: Dec 2014
Posts: 417
|
This could be very cool, does it allow access to the C++ API, the ReaScript API or both?
...oh by the way, don't know if you read my reply here http://forum.cockos.com/showpost.php...94&postcount=9
If you still have that script I'd like to check it out.
Thanks!
|
|
|
02-25-2017, 01:02 PM
|
#5
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by NextLevel
|
The C(++) API has almost everything the ReaScript API has. You might note in the ReaScript html documentation it lists C versions of the API functions too. The notable thing missing is support for the gfx window stuff.
Here's the parameter changing Lua script, as I found it from my hard drive now. I didn't test it or anything :
http://pastebin.com/nAqVaa5t
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
02-25-2017, 01:59 PM
|
#6
|
Human being with feelings
Join Date: Dec 2014
Posts: 417
|
Hey thank you for posting that script.
|
|
|
03-22-2017, 09:45 PM
|
#7
|
Human being with feelings
Join Date: May 2009
Location: Brazil
Posts: 323
|
Hi, Xenakios. Tried to build the project today and got this error:
Error C2061 syntax error: identifier 'VSTCallbackHandler' reaper_api_vst c:\juce\modules\juce_audio_plugin_client\VST\juce_ VST_Wrapper.cpp 1882
with JUCE 4.3.1
__________________
Ceanganb
|
|
|
03-22-2017, 10:15 PM
|
#8
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by ceanganb
Hi, Xenakios. Tried to build the project today and got this error:
Error C2061 syntax error: identifier 'VSTCallbackHandler' reaper_api_vst c:\juce\modules\juce_audio_plugin_client\VST\juce_ VST_Wrapper.cpp 1882
with JUCE 4.3.1
|
Yeah, I dunno...I can't build the plugin anymore on OS-X either, must be some change in JUCE somewhere that is conflicting with the plugin modified JUCE code. (I am not getting the same issue as you though.)
I need to take a look at this later. Issues like this were the reason why I wasn't so eager to release this in the first place. (It's messy to keep the official and modified JUCE code versions working together properly.)
edit : After cleaning up the mess I had done on the OS-X machine, I can get the plugin built. Maybe some issue has creeped in for the Windows side then...
edit2 : You are using JUCE from the "develop" branch from JUCE's git repo, right? The "master" branch most likely would not work.
edit3: I tried building on Windows now and not getting any problems. The problem for you likely is that you are not using JUCE from the "develop" branch.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 03-23-2017 at 06:22 AM.
|
|
|
03-23-2017, 09:59 AM
|
#9
|
Human being with feelings
Join Date: May 2009
Location: Brazil
Posts: 323
|
Sorry, I really missed the part of
"You will likely need the latest Juce (from the Juce Github develop branch)"
I was really on master branch. Thanks.
__________________
Ceanganb
|
|
|
04-30-2017, 01:30 AM
|
#10
|
Human being with feelings
Join Date: May 2009
Location: Brazil
Posts: 323
|
Hi, Xenakios. Have you changed anything on your JUCE modded files for JUCE 5?
Thanks.
__________________
Ceanganb
|
|
|
04-30-2017, 05:03 AM
|
#11
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by ceanganb
Hi, Xenakios. Have you changed anything on your JUCE modded files for JUCE 5?
Thanks.
|
I just updated the Git repo a bit, no drastic changes due to Juce 5. (It may be the code is now incompatible with Juce 4, but if that is a problem, in that case can go back in the Git history...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 04-30-2017 at 05:12 AM.
|
|
|
04-30-2017, 05:16 AM
|
#12
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
By the way, now that Juce 5 has the option for a free of charge license for closed source products(*), I will have to come up with some suitable license for the example code that allows both GPL and proprietary use, I don't wish to prevent either. I wonder if just making it public domain would work...?
(*) If you are going to use that licensing option, be careful to understand how it works. Your product will have to show the Juce splash logo at start up and allow sending data to Google Analytics. If you can't allow those things, you have to use either the GPL license and open source your code as GPL too or buy into a commercial Juce license.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
04-30-2017, 01:56 PM
|
#13
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Quote:
Originally Posted by Xenakios
By license for the example code that allows both GPL and proprietary use, I don't wish to prevent either.
|
LGPL ?
-Michael
|
|
|
04-30-2017, 02:25 PM
|
#14
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by mschnell
LGPL ?
-Michael
|
That would be quite unsuitable in this case. It would essentially require closed source developers to use the code from a separate DLL which is a notoriously messy thing to do from a VST or similar plugin. (This is why people often frown on using libsndfile for audio file IO in plugins.)
For now, I just added a "license" into the source file that gives permission to use the code and reminds JUCE and the Reaper SDK have their own licenses.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
04-30-2017, 11:12 PM
|
#15
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
I understand that the header files for the Linux Kernel and library API are released with LGPL and can freely be used in closed source projects to manage their access to the GPLed infrastructure software. Otherwise there could not be any non-GPLed Linux executables.
SO AFAIK, LGPL is done exactly for that purpose.
-Michael
|
|
|
05-01-2017, 04:38 AM
|
#16
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by mschnell
I understand that the header files
|
The code in the plugin example isn't just header files though.
In any case, I would expect people to just look at my code for inspiration and do their own code more or less from scratch. The plugin doesn't even do anything interesting or useful.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
05-01-2017, 09:40 AM
|
#17
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Quote:
Originally Posted by Xenakios
The code in the plugin example isn't just header files though.
|
The header files were just an example of LGPLed code.
AFAIL, LGLP is not explicitly restricted to header (or any other type of) files.
Quote:
Originally Posted by Xenakios
In any case, I would expect people to just look at my code for inspiration and do their own code more or less from scratch. The plugin doesn't even do anything interesting or useful.
|
Seems no problem to me...
-Michael
|
|
|
06-25-2017, 09:49 AM
|
#18
|
Human being with feelings
Join Date: Feb 2017
Posts: 4,820
|
thank you! i tried this today just to see how it goes.
|
|
|
07-04-2017, 03:14 PM
|
#19
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Updated the included modified Juce files and did some initial work to support VST3.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 07-04-2017 at 03:25 PM.
|
|
|
07-04-2017, 10:02 PM
|
#20
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Great ! Thanks !
I'm sure that I will be happy to use this some day soon ...
-Michael
|
|
|
07-06-2017, 08:50 AM
|
#21
|
Human being with feelings
Join Date: Mar 2016
Posts: 117
|
Great! Thank you for sharing!
|
|
|
08-09-2017, 01:28 PM
|
#22
|
Human being with feelings
Join Date: Jul 2017
Posts: 26
|
Thanks for this! Am I right in assuming that we can build .dll plugins for Reaper with this complete with Juce GUI's? (Forgive my present & future newb questions...)
|
|
|
08-09-2017, 01:32 PM
|
#23
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by InLight-Tone
Thanks for this! Am I right in assuming that we can build .dll plugins for Reaper with this complete with Juce GUI's? (Forgive my present & future newb questions...)
|
This is for VST2 and VST3 plugins that need to use the Reaper API. Note that you don't need this thing at all if you don't need to use the Reaper API, the regular JUCE without modifications will work just fine to build VST plugins that run in Reaper.
If you want to do Reaper extension plugins (which are a different thing than VST plugins), you would be interested in looking at this :
https://forum.cockos.com/showthread.php?t=187677
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
09-24-2017, 01:24 AM
|
#24
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
awesome
|
|
|
10-29-2017, 02:40 AM
|
#25
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
is there a working binary of this somewhere? having a bit of trouble building it with the latest JUCE
|
|
|
10-29-2017, 04:09 AM
|
#26
|
Human being with feelings
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,254
|
Quote:
Originally Posted by olilarkin
is there a working binary of this somewhere? having a bit of trouble building it with the latest JUCE
|
Yeah, that's one of the things that keeps me from going to Juce, it seems to be a bit of a constantly moving target...
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
|
|
|
10-29-2017, 04:22 AM
|
#27
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
never mind I managed to compile it
|
|
|
10-29-2017, 07:11 AM
|
#28
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by Geoff Waddington
Yeah, that's one of the things that keeps me from going to Juce, it seems to be a bit of a constantly moving target...
|
That's mostly a (minor) problem if you need to have a JUCE with some custom modifications included. Like what is happening with this Reaper extensions support thing...They rarely break sensible code that has been written against the original official repository.
I tried suggesting getting a way to use the VST2/3 host custom stuff with the official JUCE repo, but that unfortunately didn't get much interest at the JUCE forum. So I will just need to attempt to remember to keep my Reaper extensions examples up to date.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 10-29-2017 at 07:47 AM.
|
|
|
10-29-2017, 07:28 AM
|
#29
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Updated the modified Juce files and the Projucer project for Juce 5.2.0. (I tested building only with Visual Studio 2017 for now, I'll check with XCode 8.2 later today.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
10-29-2017, 10:11 AM
|
#30
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
you could copy the modules locally and commit them + your mods to your repo. although you would bloat your repo with the whole of juce :-(
|
|
|
10-29-2017, 10:29 AM
|
#31
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by olilarkin
you could copy the modules locally and commit them + your mods to your repo. although you would bloat your repo with the whole of juce :-(
|
Yeah I've been considering just doing that. But then I'd need to keep those copies of JUCE updated on my local drives anyway. (Unless git has some neat way of linking repos or something...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
10-29-2017, 10:31 AM
|
#32
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
i think including diff/.patch files for juce are better than including a whole .cpp/.h. then when roli modify code it's easy to see what it was you added
|
|
|
12-16-2017, 12:38 PM
|
#33
|
Human being with feelings
Join Date: May 2009
Location: Brazil
Posts: 323
|
Hi, Xen. I'm getting this error while compiling in VS2017
1>PluginProcessor.cpp
1>PluginEditor.cpp
1>h:\0 - projects\xenakios-reaper_api_vst_example-3b4b11c12ade\source\PluginProcessor.h(11): fatal error C1083: Cannot open include file: 'pluginterfaces/base/funknown.h': No such file or directory (compiling source file ..\..\Source\PluginProcessor.cpp)
1>h:\0 - projects\xenakios-reaper_api_vst_example-3b4b11c12ade\source\PluginProcessor.h(11): fatal error C1083: Cannot open include file: 'pluginterfaces/base/funknown.h': No such file or directory (compiling source file ..\..\Source\PluginEditor.cpp)
Using JUCE 5.2 both master and develop, with VST SDK 3.6.8.
__________________
Ceanganb
|
|
|
12-17-2017, 09:51 AM
|
#34
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
The project hasn't been tested/updated to work with the VST 3.6.8 SDK. I'll take a look at some point.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
12-18-2017, 11:03 AM
|
#35
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
It should be enough to open the Jucer file in Projucer, make the exporter point to the new VST3 SDK and re-export the project for Visual Studio.
edit : I updated the modified Juce files in the repo.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
12-19-2017, 03:19 PM
|
#36
|
Human being with feelings
Join Date: May 2009
Location: Brazil
Posts: 323
|
It's working with develop branch. Thanks.
__________________
Ceanganb
|
|
|
04-10-2018, 11:47 AM
|
#37
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Updated for JUCE 5.3.1.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
06-29-2018, 06:16 PM
|
#38
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by ToneCre8
When you do updates, are you doing them from the development branch
|
The develop branch of JUCE. I don't have particular problems using that...(They occasionally mess up some things but then one can just go back in the git repo or report the problem and it's likely going to be fixed in a few days.)
By the way, because of both Steinberg and ROLI changing things around, this project is probably out of date yet again even if trying to build against the develop branch of JUCE. I will try to see if some updates need to be done. But handling the stuff this way is getting quite tiresome, I may need to consider at some point just leaving the repo as it is without guarantees the project actually can be built. (In any case people should use the project only as inspiration for their own solution anyway. Ideally ROLI would add a way to use the Reaper extension API with the official JUCE version but I haven't been able to persuade them to do that.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
06-29-2018, 10:55 PM
|
#39
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Thanks a lot for keeping us informed on those issues !
But it seems once I (or whoever) might decide to start a project (e.g. doing a VST3 based JUCE enabled Reaper extension), they will need to ask for your help on then current questions.
-Michael
|
|
|
06-30-2018, 01:45 AM
|
#40
|
Human being with feelings
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,254
|
Quote:
Originally Posted by Xenakios
By the way, because of both Steinberg and ROLI changing things around, this project is probably out of date yet again even if trying to build against the develop branch of JUCE. I will try to see if some updates need to be done. But handling the stuff this way is getting quite tiresome, I may need to consider at some point just leaving the repo as it is without guarantees the project actually can be built.
|
Yeah, that's why, in the end, decided against using JUCE on the CSI project, one too many moving targets
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:46 AM.
|