Old 02-09-2017, 11:33 AM   #1
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default JUCE GUI example for a Reaper extension

edit 30th March 2017 : For anyone interested, I did a (relatively) simple example project that adds actions to open Juce GUI windows.

The code in action :

http://imgur.com/a/l65H1

Git repository :

https://bitbucket.org/xenakios/reape...xample2017/src

The code of most interest is in main.cpp. A fairly big portion of the code deals with adding and handling Reaper actions. It can be done in a more straight forward manner but I just reused some code here I've done for it previously to make dealing with the actions easier.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 03-30-2017 at 04:27 AM.
Xenakios is offline   Reply With Quote
Old 02-09-2017, 01:25 PM   #2
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

Wow,
Thanks for this Xen.

I'll definitely check this out as soon as I get a chance.
Many thanks for sharing.

Wyatt
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 02-09-2017, 01:33 PM   #3
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Please note that the web browser component has no special meaning or purpose, I just put it in so that there would be something relatively interesting to see in the demo screen capture.

I have no particular plans to do anything with the web browser component and I actually don't even have an idea if anything meaningful can be done with it in the context of a Reaper extension plugin, due to the limitations of the Juce web browser component.


edit : The code no longer uses the Webbrowser component.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 03-30-2017 at 04:29 AM.
Xenakios is offline   Reply With Quote
Old 02-09-2017, 01:37 PM   #4
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,030
Default

Quote:
Originally Posted by Xenakios View Post
Please note that the web browser component has no special meaning or purpose, I just put it in so that there would be something relatively interesting to see in the demo screen capture.

I have no particular plans to do anything with the web browser component and I actually don't even have an idea if anything meaningful can be done with it in the context of a Reaper extension plugin.
Maybe routing audio from a website to a Reaper track input digitally? That would be cool.
pcartwright is offline   Reply With Quote
Old 02-09-2017, 01:38 PM   #5
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by pcartwright View Post
Maybe routing audio from a website to a Reaper track input digitally? That would be cool.
Yeah exactly, that's the kind of stuff that people probably would want to do, but which likely is not going to be possible.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-10-2017, 01:51 AM   #6
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
Default

Xenakios, I'm so glad I have access to Reaper API with JUCE that I'm almost nervous. But since my knowledge of Reaper API, JUCE and C++ are all average, do you mind if I make some stupid questions?

1) About this method, ´setContentNonOwned(&m_browser, true)´, I tried to create another component but it only works with ´setContentNonOwned(new myComponent, true)´. I know it's a weakness in my C++, but I want to be sure I can use it this way.

2) Why don't I have access to FNG_ API?

Thanks.
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 02-10-2017, 07:14 AM   #7
SpiderFox
Human being with feelings
 
Join Date: Jan 2017
Posts: 29
Default

Thank you very much!

Looks good!
I hope I will find time today to have a close look.
SpiderFox is offline   Reply With Quote
Old 02-10-2017, 07:20 AM   #8
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by ceanganb View Post
Xenakios, I'm so glad I have access to Reaper API with JUCE that I'm almost nervous. But since my knowledge of Reaper API, JUCE and C++ are all average, do you mind if I make some stupid questions?

1) About this method, ´setContentNonOwned(&m_browser, true)´, I tried to create another component but it only works with ´setContentNonOwned(new myComponent, true)´. I know it's a weakness in my C++, but I want to be sure I can use it this way.

2) Why don't I have access to FNG_ API?

Thanks.
1) If you use "new" to create your component, you should use setContentOwned so that the top level window deletes your content component at an appropriate time. (In this case nothing else could delete it anyway since you don't store the pointer coming from "new" anywhere.)

2) If you mean the function pointers can't be properly populated, I think you hit the problem I predicted some time ago could exist : the loading order of the Reaper extension plugins prevents you from doing that directly. They are probably loaded in alphabetical order of the dll file names and your plugin binary might be loaded before reaper_sws. The solution probably involves something like loading the API functions from the SWS plugin later than in your plugin's entry point function. (Maybe you could do it in your GUI window's constructor or something...) If you mean the compiler doesn't allow you to use them due to missing declarations and such, I don't really have a solution, maybe you need to ask the SWS team about it? (I haven't actually myself used functions provided by other extension plugins...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 02-10-2017 at 07:27 AM.
Xenakios is offline   Reply With Quote
Old 02-10-2017, 07:38 AM   #9
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

When you run the Reaper and the plugin with the JUCE GUI in Visual Studio's debugger, you may see memory leaks detected by the Microsoft runtime and/or asserts from JUCE. Apparently the first one is a known harmless problem in JUCE which Jules has decided to ignore. The latter is a tricky one to solve and I have so far been unsuccessful in preventing that from happening.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-10-2017, 07:48 AM   #10
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

I didn't yet do a build on macOS, the code will need some tweaks to work there...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-10-2017, 02:26 PM   #11
SpiderFox
Human being with feelings
 
Join Date: Jan 2017
Posts: 29
Default

What license is the example under?
SpiderFox is offline   Reply With Quote
Old 02-10-2017, 03:45 PM   #12
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
Default

Quote:
Originally Posted by Xenakios View Post
1) If you use "new" to create your component, you should use setContentOwned so that the top level window deletes your content component at an appropriate time. (In this case nothing else could delete it anyway since you don't store the pointer coming from "new" anywhere.)
I see. Any particular or technical reason to use ´setContentNonOwned´, any benefit or just a programming style? This is a beginner's question, I know, but will help me to develop a better sense on how the integration goes, and what errors I might avoid in the future.

Quote:
2) If you mean the compiler doesn't allow you to use them due to missing declarations and such, I don't really have a solution, maybe you need to ask the SWS team about it? (I haven't actually myself used functions provided by other extension plugins...)
Yes, that's what I meant. I will try to include some of the SWS Fingers source in the project. Kind of logical path, but I was excited and sleepy :P

Any special recommendations to walk on the mild side?

Thanks so much!
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 02-10-2017, 03:56 PM   #13
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
Default

Quote:
Originally Posted by Xenakios View Post
When you run the Reaper and the plugin with the JUCE GUI in Visual Studio's debugger, you may see memory leaks detected by the Microsoft runtime and/or asserts from JUCE. Apparently the first one is a known harmless problem in JUCE which Jules has decided to ignore. The latter is a tricky one to solve and I have so far been unsuccessful in preventing that from happening.
So far, no problems with VS2015 and JUCE 4.3.1 (latest versions.
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 02-10-2017, 05:55 PM   #14
SpiderFox
Human being with feelings
 
Join Date: Jan 2017
Posts: 29
Default

For me too, really nice!
SpiderFox is offline   Reply With Quote
Old 02-10-2017, 06:46 PM   #15
SpiderFox
Human being with feelings
 
Join Date: Jan 2017
Posts: 29
Default

I tried to add another window, it seems to be working in general. I also tried to set the background color globally to grey.

But issue 1: the browser window opening causes the whole application to crash now.

Sometimes it starts to show up (but not showing a page), sometimes the whole app instantly crashes.

Issue2: Opening the "Login" window works quite good. However, closing this window also minimizes the Reaper window into the task bar.

Could you please help me finding out what causes these issues?

The code is at:
https://github.com/CodingSpiderFox/R...ree/playground
SpiderFox is offline   Reply With Quote
Old 02-11-2017, 12:13 AM   #16
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

Quote:
Originally Posted by SpiderFox View Post
Sometimes it starts to show up (but not showing a page), sometimes the whole app instantly crashes.
Pardon me for jumping in. In a completely different context I saw a similar behavior. The problem was trying to do some GUI actions in another thread than the main (GUI) thread of the application.

-Michael
mschnell is online now   Reply With Quote
Old 02-11-2017, 02:57 PM   #17
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by SpiderFox View Post
What license is the example under?
Well that's a tricky one...I suppose I should put it under the GPL license since it uses JUCE. I have to think about this and probably ask about it in the JUCE forum.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-11-2017, 03:01 PM   #18
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by SpiderFox View Post
I tried to add another window, it seems to be working in general. I also tried to set the background color globally to grey.

But issue 1: the browser window opening causes the whole application to crash now.

Sometimes it starts to show up (but not showing a page), sometimes the whole app instantly crashes.

Issue2: Opening the "Login" window works quite good. However, closing this window also minimizes the Reaper window into the task bar.

Could you please help me finding out what causes these issues?

The code is at:
https://github.com/CodingSpiderFox/R...ree/playground
For 1 I don't have any ideas at the moment.

2 is a problem I forgot to add a workaround for. (In userTriedToCloseWindow it needs to call BringWindowToTop(GetMainHwnd()); after setting the plugin window hidden which should solve the Reaper window minimizing.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-11-2017, 04:34 PM   #19
SpiderFox
Human being with feelings
 
Join Date: Jan 2017
Posts: 29
Default

Quote:
Originally Posted by Xenakios View Post
Well that's a tricky one...I suppose I should put it under the GPL license since it uses JUCE. I have to think about this and probably ask about it in the JUCE forum.
I think there is no alternative to put it under GPL, I will put mine under GPL too
SpiderFox is offline   Reply With Quote
Old 02-11-2017, 05:05 PM   #20
SpiderFox
Human being with feelings
 
Join Date: Jan 2017
Posts: 29
Default

Quote:
Originally Posted by Xenakios View Post
For 1 I don't have any ideas at the moment.

2 is a problem I forgot to add a workaround for. (In userTriedToCloseWindow it needs to call BringWindowToTop(GetMainHwnd()); after setting the plugin window hidden which should solve the Reaper window minimizing.)
I now moved a step back and put all the code just in the Main.cpp file. rev. 42fe408dabcbf83802b31798589d6987136007da is working. Actually, I think I was using a wrong reference to a GUI component (I think I defined the class "BrowserComponent" both in Main.cpp and LoginWindow.cpp which is wrong, however I don't know how this was even possible)
SpiderFox is offline   Reply With Quote
Old 02-12-2017, 07:59 AM   #21
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by ceanganb View Post
I see. Any particular or technical reason to use ´setContentNonOwned´, any benefit or just a programming style? This is a beginner's question, I know, but will help me to develop a better sense on how the integration goes, and what errors I might avoid in the future.
setContentNonOwned can be used when you have instantiated your content component as a value (like the web browser is instantiated in the example) or as a pointer that you want to manage yourself for some reason. (For example, maybe you want to be able to move the component to a different parent component.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-12-2017, 03:45 PM   #22
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
Default

Quote:
Originally Posted by Xenakios View Post
setContentNonOwned can be used when you have instantiated your content component as a value (like the web browser is instantiated in the example) or as a pointer that you want to manage yourself for some reason. (For example, maybe you want to be able to move the component to a different parent component.)
Thanks for the into, Xenakios. C++ is still making sense to me, as I come from a procedural background. This OOP model is a struggle to a 43er
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 02-12-2017, 04:56 PM   #23
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by ceanganb View Post
Thanks for the into, Xenakios. C++ is still making sense to me, as I come from a procedural background. This OOP model is a struggle to a 43er
Well, to be honest, it is a mess in C++, since objects can be instantiated as values, as heap allocated objects stored in raw pointers, unique pointers or shared pointers etc...Every library/framework of course also has its own rules on what they prefer to use. However, the ability to do it in so many ways also gives flexibility that isn't necessarily available in other languages.

By the way, try to avoid doing manual "delete" calls on heap allocated objects. Manual deletes only leads to misery like double deletions and memory leaks. The example plugin breaks that rule because it would have been a bit contrived to use a smart pointer for the single Window object involved. Proper production code that uses multiple Window instances and creates/destroys them more dynamically should use some other solution. For example the Window instances could be stored in something like :

std::vector<std::shared_ptr<Window>> g_windows;

And then at plugin shutdown they could be destroyed by calling g_windows.clear();

I think I will change the example to do something like that... edit : I changed the window instance to use std::unique_ptr.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 02-12-2017 at 05:32 PM.
Xenakios is offline   Reply With Quote
Old 02-20-2017, 02:19 PM   #24
SpiderFox
Human being with feelings
 
Join Date: Jan 2017
Posts: 29
Default

Meanwhile I got a bit further with JUCE and I really like it.

Because I don't like to load the whole REAPER application everytime I change a little thing in the UI, I created a GUIDemo project inside my solution which I can start separately. This demo project instantiates the component and shows it in a simple window.

I took me some time to get it working (for those who are interested what didn't work in the beginning, see the thread at JUCE forums:
https://forum.juce.com/t/gui-does-no...ing-text/21021

However, in commit f1f794185be913aa599001a2951a7baaf7f691d9 it works.
SpiderFox is offline   Reply With Quote
Old 02-20-2017, 02:51 PM   #25
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by SpiderFox View Post
Meanwhile I got a bit further with JUCE and I really like it.

Because I don't like to load the whole REAPER application everytime I change a little thing in the UI, I created a GUIDemo project inside my solution which I can start separately. This demo project instantiates the component and shows it in a simple window.

I took me some time to get it working (for those who are interested what didn't work in the beginning, see the thread at JUCE forums:
https://forum.juce.com/t/gui-does-no...ing-text/21021

However, in commit f1f794185be913aa599001a2951a7baaf7f691d9 it works.
There may have been an error in my original code where Juce's Process singleton was not set to refer to the DLL instance handed over from Reaper, which I've fixed a few days ago. However, in the context of running the DLL within Reaper, I didn't notice any behavior changes for better or for worse. But I suppose it's a good idea to have that in the code anyway since Juce's VST2/VST3/AAX plugin implementations do that too.

https://bitbucket.org/xenakios/reape...t#main.cpp-178
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-20-2017, 11:15 PM   #26
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

Thanks for keeping us up to date !

On the long run I might be inclined (or forced) to create a workalike for SWS LiveConfigs. I suppose this will need to be a Reaper extension and it might be a good idea to do in abed on JUICE.

Moreover, in my textbook, LiveConfigs is to be used together with MidiToReaContrlPath to allow for JSFXes for for pre-processing the Midi Events that are used to switch the LiveConfigs "Configs".

Now, a new LiveConfigs could either include the functionality of MidiToReaContrlPath or in some other way (directly) fetch the midi events from a Track's FX chain. I suppose it should be a VST (plus a Reaper Extension) on that behalf...

That is why I continue lurking here....

Thanks again,
-Michael
mschnell is online now   Reply With Quote
Old 02-21-2017, 07:44 AM   #27
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by mschnell View Post
fetch the midi events from a Track's FX chain. I suppose it should be a VST (plus a Reaper Extension) on that behalf...
That's going to be the easiest and cleanest to do if you need the MIDI events going through a track's FX chain first. Making a VST plugin that uses the Reaper API is however a different topic really. (And if JUCE is going to be used for that, it will involve changing the JUCE source code, which is a potential hassle.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-21-2017, 02:01 PM   #28
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

Quote:
Originally Posted by Xenakios View Post
That's going to be the easiest and cleanest to do if you need the MIDI events going through a track's FX chain first.
I do need JSFX pre-processing and Midi routing from multiple Midi devices. Enabling using other plugins would be advantageous.

If having the thingy be a VST - obviously the best solution for the users - is too hard to do, the additional use of MidiToReaControlPath (as I do right now) would need to be continued.

In the end I would love to make Reaper even more attractive for Live musicians, by providing the most easy to use solution.

Thanks a lot for your thoughts,
-Michael
mschnell is online now   Reply With Quote
Old 02-21-2017, 10:47 PM   #29
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

In my live setup, I configured a bidirectional communication between the Tracks and LiveConfigs.

As an input I get Program Change messages coming in from two different Midi interfaces on two different midi channels (one of the interface channel 1 and the other one interface channel 1 and 2). From that I use a simple JSFX to construct distinguishable Midi CC messages and send them to LiveConfigs via MidiToReaControlPath.

Now, I set LiveConfigs to switch the setups for (multiple instances of) another simple JSFX that on such en event send out an appropriate Program Change message that is routed to (e.g.) a Kontakt VSTi and here switches the patch.

Regarding Input preprocessing, for a friend (and for any fellow Reaper user interested) I did a (rather decently documented) system of multiple JSFXes that read PC key presses and/or midi events to (e.g., in a rather sophisticated way) step through songs and song positions to switch LiveConfigs patches.

All this does work well, but setting it up is not exactly simple. On the long run it would be useful to do a LiveCoinfigs workalike with additional features that allow for bidirectional communication with the tracks (FX chains) in a more straight forward way, making Reaper an easy to use extremely versatile Live VST playing system.

Unfortunately there is no API (e.g. a "pipe" or a shared memory) for JSFX, that would allow for (direct) communication with ReaScripts (we already discussed that issue several months ago). (I did a Feature Request on that, but did not get an answer yet.)

Maybe there is an API for ReaScript to read from and send to the Midi Buses of the tracks ? (I never tried to do any ReaScript, yet.)

Maybe there is an API for a binary Reaper Extension to read from and send to the Midi Buses of the tracks ? (I never tried to do a binary Reaper Extension, yet.)

Thanks for listening,
-Michael

Last edited by mschnell; 02-21-2017 at 10:54 PM.
mschnell is online now   Reply With Quote
Old 02-22-2017, 02:24 AM   #30
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

Quote:
Originally Posted by Xenakios View Post
Making a VST plugin that uses the Reaper API is however a different topic really. (And if JUCE is going to be used for that, it will involve changing the JUCE source code, which is a potential hassle.)
That is rather bad news, in fact I had hoped that doing a VST with Juce might be rather easy as there is a tutorial by Juce themselves:
-> https://www.juce.com/doc/tutorial_cr...r_basic_plugin .
But obviously doing a "dual issue" dll (adhering to both the "VST" and the "Reaper binary Extension" API specifications will call for more care to be taken (including threading issues). Is there or will there be a kind of "Tutorial" for this ?

OTOH I am still interested in other ways (without using an additional VST) of bidirectional communication between Track FX and Reaper binary Extensions or Scripts (see previous message). Regarding sending midi to a thread, this rather obviously is possible as the Virtual Keyboard does exactly this. Regarding receiving from a thread there should be an API (for ReaScript and/or a binary extension) that reads midi from a Reaper Midi Bus. I don't know if such exists.

If this can be done, it maybe could be possible to do a Script (preferably Python) instead of a binary extension.

-Michael

Last edited by mschnell; 02-22-2017 at 05:40 AM.
mschnell is online now   Reply With Quote
Old 02-22-2017, 08:10 AM   #31
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by mschnell View Post
That is rather bad news, in fact I had hoped that doing a VST with Juce might be rather easy as there is a tutorial by Juce themselves:
-> https://www.juce.com/doc/tutorial_cr...r_basic_plugin .
But obviously doing a "dual issue" dll (adhering to both the "VST" and the "Reaper binary Extension" API specifications will call for more care to be taken (including threading issues). Is there or will there be a kind of "Tutorial" for this ?

OTOH I am still interested in other ways (without using an additional VST) of bidirectional communication between Track FX and Reaper binary Extensions or Scripts (see previous message). Regarding sending midi to a thread, this rather obviously is possible as the Virtual Keyboard does exactly this. Regarding receiving from a thread there should be an API (for ReaScript and/or a binary extension) that reads midi from a Reaper Midi Bus. I don't know if such exists.

If this can be done, it maybe could be possible to do a Script (preferably Python) instead of a binary extension.

-Michael
VST plugins that use the Reaper API are normal VST plugin DLLs. That is, they won't be DLLs that are both a VST plugin and a Reaper extension plugin. Reaper will see and load them as VST plugins and they can also be made compatible with other hosts, provided the plugin doesn't entirely depend on having access to the Reaper API.

Doing a tutorial/guide for VST plugins based on JUCE would be a pain, because I'd need to include the changed JUCE source code etc...If using the plain VST SDK would be enough, it'd probably be easier to show how the Reaper API can be accessed.

I don't think there's much API support for communicating (realtime) audio or MIDI between Reaper's tracks and the extension plugins or ReaScript. There's the StuffMIDIMessage function but I think that just for doing some limited sending of MIDI messages into Reaper's MIDI system.

Anyway this is getting way off topic for this thread.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-22-2017, 02:26 PM   #32
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

Quote:
Originally Posted by Xenakios View Post
Anyway this is getting way off topic for this thread.
Agreed !
Let's re-open such issue once I will want or need to re-implement the functionality of LiveConfigs. Hoping for future improvements that may come handy...
-Michael
mschnell is online now   Reply With Quote
Old 02-23-2017, 09:23 AM   #33
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
Default

Quote:
Originally Posted by Xenakios View Post
Doing a tutorial/guide for VST plugins based on JUCE would be a pain, because I'd need to include the changed JUCE source code etc...If using the plain VST SDK would be enough, it'd probably be easier to show how the Reaper API can be accessed.
I managed to make my own MIDI ´interface´ with JUCE Audio plugin that makes it easier for me to handle MIDI messages in realtime, but it's not really JUCE dependent. So I wonder, is VST SDK + VST GUI harder to learn than JUCE? First time I tried I thought it was greek, but my C++ knowledge was much smaller as well. I'd still love to access REAPER API from a VST instead of an action, do you think it's worth the move? Sorry for distracting from topic, Xenakios. Last question I post here.
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 02-23-2017, 09:31 AM   #34
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

Does the Juce VST tutorial (-> https://www.juce.com/doc/tutorial_cr...r_basic_plugin ) not work for you ? I suppose with "hard to do Xen meant a tutorial that also handles reaper specific stuff. But straight forward VSTs / VSTIs (v2 and v3) should be covered by the tutorial by Juce.

-Michael
mschnell is online now   Reply With Quote
Old 02-23-2017, 09:43 AM   #35
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by ceanganb View Post
So I wonder, is VST SDK + VST GUI harder to learn than JUCE? First time I tried I thought it was greek, but my C++ knowledge was much smaller as well. I'd still love to access REAPER API from a VST instead of an action, do you think it's worth the move?
If you already know JUCE and like it, it isn't worth it switching over to VST SDK and VSTGUI, IMHO. The changes needed for JUCE to allow using the Reaper API are not that big really. I can post my changed JUCE source files later today. (Sources for an example plugin should probably be posted too, though...Sigh...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 02-23-2017, 11:27 AM   #36
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
Default

Quote:
Originally Posted by mschnell View Post
Does the Juce VST tutorial (-> https://www.juce.com/doc/tutorial_cr...r_basic_plugin ) not work for you ? I suppose with "hard to do Xen meant a tutorial that also handles reaper specific stuff. But straight forward VSTs / VSTIs (v2 and v3) should be covered by the tutorial by Juce.

-Michael
Nope, I already know how to make a VST in JUCE, the new would be accessing APIs from it.
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 02-23-2017, 11:29 AM   #37
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
Default

Quote:
Originally Posted by Xenakios View Post
If you already know JUCE and like it, it isn't worth it switching over to VST SDK and VSTGUI, IMHO. The changes needed for JUCE to allow using the Reaper API are not that big really. I can post my changed JUCE source files later today. (Sources for an example plugin should probably be posted too, though...Sigh...)
I can't help saying I would love to, but I already abused your patience and goodwill. Whatever and whenever you can, Xenakios, thanks for your help.
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 02-23-2017, 12:55 PM   #38
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

Quote:
Originally Posted by ceanganb View Post
Nope, I already know how to make a VST in JUCE, the new would be accessing APIs from it.
Silly me still has no idea how to access Reaper the API from a VST instead of from a Reaper extension dll. But in fact I don't need to know right now, as I only intend to work on that issue in rather far future. So don't bother: I can happily wait for what kind of SDK you both finally will come up with, and take advantage of that when time might come.

Great thanks for your effort !
-Michael
mschnell is online now   Reply With Quote
Old 02-23-2017, 02:47 PM   #39
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
Default

Quote:
Originally Posted by mschnell View Post
Silly me still has no idea how to access Reaper the API from a VST instead of from a Reaper extension dll. But in fact I don't need to know right now, as I only intend to work on that issue in rather far future. So don't bother: I can happily wait for what kind of SDK you both finally will come up with, and take advantage of that when time might come.

Great thanks for your effort !
-Michael
It's up in the forum now! Just to make clear, all this amazing work is done by Xenakios alone, my only contributions were hope and happiness
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 02-23-2017, 03:23 PM   #40
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

GREAT !!!!

While I do ANSI C every day, I never took a decent look at C++, so I rather reluctant giving it a try .

-Michael
mschnell is online now   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 03:22 PM.


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