|
|
|
03-07-2018, 03:29 PM
|
#1
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
SWS's MidiToReaControlPath Souce Code
Is same available and legally usable for enhancing it ?
Thanks,
-Michael
|
|
|
03-07-2018, 11:01 PM
|
#2
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
@ Xenakios :
What I have in mind is a plugin that features three sliders:
- Midi channel
- CC # "mute"
- CC # "unmute"
When receiving a Midi CC message with fitting Channel and CC # "mute", it will mute the track denoted in the CC val. Same with "unmute".
I did - extremely simple - workalike ReaScripts for mute and unmute, so I do know that simply two API calls need to be done for that. But using the scripts need "MidiToReaControlPath" and hooking actions, which of course is not really user friendly for the "Reaper Live" toolbox I intend to publish (of course free of charge).
As I know that you are experienced with such stuff and have all the tools in place, maybe it's really easy for you to put this together. What do you think ?
-Michael
Last edited by mschnell; 03-08-2018 at 07:24 AM.
|
|
|
03-13-2018, 04:16 AM
|
#3
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by mschnell
maybe it's really easy for you to put this together. What do you think ?
|
It's always bit of a pain to do new plugin projects, unfortunately. I am not even sure if you mean a VST plugin or a Reaper extension plugin, though...?
MidiToReaControlPath isn't a plugin by SWS, by the way, it was done by Jeffos. I don't think the source code is available.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 03-13-2018 at 04:22 AM.
|
|
|
03-13-2018, 05:56 AM
|
#4
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
|
Last edited by nofish; 03-13-2018 at 06:02 AM.
|
|
|
03-13-2018, 01:41 PM
|
#5
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Unfortunately AFAIK, Jeffos is not available at all, any more.
And MidiToReaConttrolPath is special in that it is a VST (receiving Midi Messages in the normal VST way) that additionally uses the Reaper API (Pushing Midi Messages onto the Reaper Control Path). This obviously is possible, but supposedly needs some spacial care.
-Michael
|
|
|
03-13-2018, 03:09 PM
|
#6
|
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
It probably use StuffMIDIMessage API call for commands and just bypassing otherwise.
There is no comments it should be used specially, so I guess it is safe to use it from whatever place.
|
|
|
03-13-2018, 10:39 PM
|
#7
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Yep, StuffMIDIMessage, obviously. But same is part of the Reaper API, which is accessible when you do a Reaper Extension DLL, which is dnamically linked to Reaper using the Reaper Extension specifications which provides the call location for the "StuffMIDIMessage()" function.
But MidiToReaControlPath is not a Reaper Extension DLL but a VST DLL, and hence is dynamically linked according to the VST specifications and does not know how to call "StuffMIDIMessage()".
AFAIU, the tricky part is to have a VST it access the Reaper API altogether.
-Michael
|
|
|
03-14-2018, 03:13 AM
|
#8
|
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Quote:
Originally Posted by mschnell
Yep, StuffMIDIMessage, obviously.
...
But MidiToReaControlPath is not a Reaper Extension DLL but a VST DLL, and hence is dynamically linked according to the VST specifications and does not know how to call "StuffMIDIMessage()".
AFAIU, the tricky part is to have a VST it access the Reaper API altogether.
|
What about reading the documentation? Obviously
https://www.reaper.fm/sdk/vst/vst_ext.php
Disclaimer: I have not written any release quality VSTs, so the following is IMHO. But working IMHO.
I usually check what I suggest. So I have written a test VST which send all CC to control and pass throw the rest. In my short check it was working as expected.
Mentioned documentation has no examples. More tricky is to find the RIGHT way to process MIDI in VST. The specification is a bit fussy at that place. It seems like that working way is save events in "processEvents" and "sendVstEventsToHost" in "processReplacing".
So parts of the code:
Code:
static void (*StuffMIDIMessage)(int mode, int msg1, int msg2, int msg3) = 0;
MyEffect::MyEffect(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParams){
static char StuffMIDIMessage_Name[] = "StuffMIDIMessage";
...
if(!StuffMIDIMessage)
StuffMIDIMessage = (void (*)(int, int, int, int))audioMaster(NULL,0xdeadbeef,0xdeadf00d,0,StuffMIDIMessage_Name,0.0);
// I do not use the name directly, GCC complains the parameter is not const
}
void MyEffect::processReplacing(float** inputs, float** outputs, VstInt32 sampleFrames){
...
StuffMIDIMessage(1, midiData[0], midiData[1], midiData[2]);
}
|
|
|
03-14-2018, 06:06 AM
|
#9
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
Originally Posted by azslow3
|
I did not see this yet.
Thanks for pointing me there.
-Michael
|
|
|
03-14-2018, 09:47 AM
|
#10
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by azslow3
Code:
MyEffect::MyEffect(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParams){
|
An unfortunate problem with that is that the audioMasterCallback is not available easily when using plugin frameworks like IPlug or JUCE. The framework code has to be changed in order to get access to it.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
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 12:55 AM.
|