Old 02-23-2017, 12:56 PM   #1
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,497
Default JUCE VST plugin example that uses the Reaper API

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 ModifiedJuce folder has the Juce source code files that need to be replaced in your Juce source tree in order for the Reaper API to work.

edit : The locations of the files to be replaced within the Juce source tree :

JUCE/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
JUCE/modules/juce_audio_processors/processors/juce_AudioProcessor.h

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.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/

Last edited by Xenakios; 02-23-2017 at 06:01 PM.
Xenakios is online now   Reply With Quote
Old 02-23-2017, 02:42 PM   #2
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 270
Default

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
ceanganb is offline   Reply With Quote
Old 02-24-2017, 11:15 AM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 2,861
Default

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
__________________
www.boa-sorte.de

Last edited by mschnell; 02-24-2017 at 01:26 PM.
mschnell is online now   Reply With Quote
Old 02-25-2017, 12:50 PM   #4
NextLevel
Human being with feelings
 
Join Date: Dec 2014
Posts: 316
Default

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!
NextLevel is offline   Reply With Quote
Old 02-25-2017, 01:02 PM   #5
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,497
Default

Quote:
Originally Posted by NextLevel View Post
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!
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
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 02-25-2017, 01:59 PM   #6
NextLevel
Human being with feelings
 
Join Date: Dec 2014
Posts: 316
Default

Hey thank you for posting that script.
NextLevel is offline   Reply With Quote
Old 03-22-2017, 09:45 PM   #7
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 270
Default

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
ceanganb is offline   Reply With Quote
Old 03-22-2017, 10:15 PM   #8
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,497
Default

Quote:
Originally Posted by ceanganb View Post
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.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/

Last edited by Xenakios; 03-23-2017 at 06:22 AM.
Xenakios is online now   Reply With Quote
Old 03-23-2017, 09:59 AM   #9
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 270
Default

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
ceanganb is offline   Reply With Quote
Old 04-30-2017, 01:30 AM   #10
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 270
Default

Hi, Xenakios. Have you changed anything on your JUCE modded files for JUCE 5?

Thanks.
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 04-30-2017, 05:03 AM   #11
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,497
Default

Quote:
Originally Posted by ceanganb View Post
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...)
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/

Last edited by Xenakios; 04-30-2017 at 05:12 AM.
Xenakios is online now   Reply With Quote
Old 04-30-2017, 05:16 AM   #12
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,497
Default

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.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-30-2017, 01:56 PM   #13
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 2,861
Default

Quote:
Originally Posted by Xenakios View Post
By license for the example code that allows both GPL and proprietary use, I don't wish to prevent either.
LGPL ?

-Michael
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 04-30-2017, 02:25 PM   #14
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,497
Default

Quote:
Originally Posted by mschnell View Post
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.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-30-2017, 11:12 PM   #15
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 2,861
Default

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
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 05-01-2017, 04:38 AM   #16
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,497
Default

Quote:
Originally Posted by mschnell View Post
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.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 05-01-2017, 09:40 AM   #17
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 2,861
Default

Quote:
Originally Posted by Xenakios View Post
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 View Post
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
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old Yesterday, 09:49 AM   #18
deeb
Human being with feelings
 
Join Date: Feb 2017
Posts: 181
Default

thank you! i tried this today just to see how it goes.
deeb 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 08:39 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.