|
|
|
12-14-2017, 06:35 AM
|
#1
|
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Looking for hints concerning API (in Control Surface related part)
Hi,
I have joined the community not so long time ago, I am still learning how to use Reaper. But in parallel I try to understand what is needed to port my own project into Reaper, which new possibilities that opens, etc.
I slowly google and look at the source, but may be some experienced people can simplify my journey. Just a link (to docs or source) can be sufficient. I do not want take too much of someone's time.
1. IReaperControlSurface::Extended().
Is there any description for existing extensions? I mean 65538, 65548, 65550, etc. Is that in some recent versions of SDK?
I like "event driven" approach, so instead of parameters pooling I just can wait till Reaper informs me that the parameter is changed. That is already in the API, but only for a tiny subset of possible parameters (volume, pan, etc.). I hope there is some extension to required notifications for any (or just more) parameters (f.e. plug-in selected/GUI opened, parameter X from FX Y in the item Z of track T is modified, etc.).
2. All surface examples in SDK are for dedicated devices. So the approach to create separate IO is fine.
But there are many devices which use the same port for surface and keys/other "MIDI" controls.
2.a) what is the usual way to proceed in that case? Fe virtual internal MIDI loopers?
2.b) are there any "hooks" in the MIDI hardware input/output internal processing chains?
Ideally I would prefer to get control at the very beginning of input processing, to filter our surface related messages, transform some messages (think of Ableton Push scenario) or even inject new (f.e. to allow "MIDI Learn" from dedicated surface, injecting messages as coming from performance device). The same for output.
Instantiating explicit in FX on each track sounds like a bit ugly workaround for the purpose. So I am looking for "hidden" per hardware input "in FX" (+ hidden per hardware output "out FX").
3. Threading model. Is there is something which is thread specific? I mean surface in general can re-configure the project (add tracks, FXes, arm, try to change other parameters). Can it be that some operations has to be synchronized (f.e. performed from "Run()" method only) ?
PS. I have already clarified another important question. My original project is written in plain C and cross-compiled under Linux for Windows. So I have checked the possibility to do the same for Reaper. The comments in header files about that case are correct. I mean gcc (plain C) cross-compiling works fine, as long as MS ABI for virtual classes and calls is taken into account.
|
|
|
12-14-2017, 07:04 AM
|
#2
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
|
I can't answer specifically but here's the source of Klinke's MCU plugin for Reaper (which also has a FX control mode), in case you haven't seen it yet:
https://bitbucket.org/Klinkenstecker...klinke_mcu/src
|
|
|
12-14-2017, 07:05 AM
|
#3
|
Human being with feelings
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,184
|
Quote:
Originally Posted by azslow3
I like "event driven" approach, so instead of parameters pooling I just can wait till Reaper informs me that the parameter is changed. That is already in the API, but only for a tiny subset of possible parameters (volume, pan, etc.). I hope there is some extension to required notifications for any (or just more) parameters (f.e. plug-in selected/GUI opened, parameter X from FX Y in the item Z of track T is modified, etc.).
|
Yeah, I was originally a fan of the event driven approach, but after a long and arduous philosophical conversion on my part, I've come to realize that polling is actually superior for this task.
I'm not trying to tell you how to implement, just noting that after coding for control surfaces for 10 years now, I've come around to appreciating the subtle advantages of polling
__________________
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
|
|
|
12-14-2017, 10:24 AM
|
#4
|
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Quote:
Originally Posted by nofish
|
Thanks for the link!
Quote:
Originally Posted by Geoff Waddington
Yeah, I was originally a fan of the event driven approach, but after a long and arduous philosophical conversion on my part, I've come to realize that polling is actually superior for this task.
I'm not trying to tell you how to implement, just noting that after coding for control surfaces for 10 years now, I've come around to appreciating the subtle advantages of polling
|
I have only 3.5 years coding surfaces (with forced polling approach)...
But after education period, then 10 years comparing (mostly my own) even driven medium size (O(1k) interconnected services with O(100k) parameters) systems with some known pool based system (including binding to them) and now 10 years fighting with another pool based system ( O(100k) computers ), I still think that when pooling make no sense, it should be avoided
|
|
|
12-22-2017, 12:23 PM
|
#5
|
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Found so far:
* (for 1.) newer reaper_plugin.h in SWS repository has CS (and other) extentions definition
* (for 2.) with audio "hook", it is possible to get access to RT MIDI (API calls still exist, defined in original SDK but no longer generated by Reaper... are they going to be obsolete soon?).
But all my attempts to modify the stream has failed so far. I am first get called with "Post" then with "!Post" (for me, the opposite order could be more logical). While the second "pass" ("!Post") see the modification from the first one, original signal is delivered to the track.
That means so far it IS NOT POSSIBLE to normally configure boards with knobs/buttons as control surfaces. I hope I have not found something or that can be fixed. I repeat, that rules out a big range of devices, from MPK up to Push.
|
|
|
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 01:18 PM.
|