View Poll Results: Could this work?
|
Yes it could work and I want it
|
|
3 |
60.00% |
Yes it could work
|
|
1 |
20.00% |
No, it cannot work, because ...
|
|
1 |
20.00% |
09-10-2016, 11:01 AM
|
#1
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
"Control Surface" in a LUA script?
As I understand it, a control surface sends control messages to Reaper in some format, these are decoded by the Control Surface plug-in and passed to Reaper. And back the other way.
Now, some keyboard controllers just send MIDI messages. So (and this may be impractical / a daft idea) how about a LUA script to receive these messages, work out what to do and pass them to Reaper, interrogate Reaper and send MIDI messages back to the hardware (to turn on LEDs etc).
You could also have a pop-up GUI showing what's going on.
I think that LUA would need an API to execute any Reaper action (perhaps it already has one) and, probably some new API functions.
That way, "ordinary" MIDI controllers and those without established Control surfaces for Reaper, could be made much more powerful.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
Last edited by DarkStar; 09-11-2016 at 12:53 AM.
|
|
|
09-10-2016, 11:44 AM
|
#2
|
Human being with feelings
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,467
|
This is already possible. There is something in the API to send messages to the control path.
To get the messages, it's there - haven't really unraveled it all, but I believe it's possible - it might be necessary to use Jeffos' MIDItoReaControlPath, but I doubt it.
to send messages to the control path is pretty straightforward
Quote:
C: void StuffMIDIMessage(int mode, int msg1, int msg2, int msg3)
EEL: StuffMIDIMessage(int mode, int msg1, int msg2, int msg3)
Lua: reaper.StuffMIDIMessage(integer mode, integer msg1, integer msg2, integer msg3)
Python: RPR_StuffMIDIMessage(Int mode, Int msg1, Int msg2, Int msg3)
Stuffs a 3 byte MIDI message into either the Virtual MIDI Keyboard queue, or the MIDI-as-control input queue. mode=0 for VKB, 1 for control (actions map etc), 2 for VKB-on-current-channel.
|
(yeah, so the script just needs to be some GUI to configure and rearrange the messages and provide feedback)
I'm working on a few thing in EEL that utilize this, Because there is no API that can manipulate the MONITOR FX chain, and that's what I want to do
So yeah, it just really hasn't been done yet. I think the API that is there isn't exactly intended to be use this way, so it's a little rough, but it's possible as far as I can tell.
Last edited by James HE; 09-10-2016 at 11:57 AM.
|
|
|
09-10-2016, 02:33 PM
|
#3
|
Human being with feelings
Join Date: Jun 2008
Posts: 4,923
|
ooh... monitor controller...
|
|
|
09-10-2016, 04:24 PM
|
#4
|
Human being with feelings
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,467
|
Quote:
Originally Posted by semiquaver
ooh... monitor controller...
|
Exactly!
|
|
|
09-10-2016, 05:17 PM
|
#5
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by James HE
To get the messages, it's there - haven't really unraveled it all, but I believe it's possible - it might be necessary to use Jeffos' MIDItoReaControlPath, but I doubt it.
|
I don't think getting incoming MIDI messages is in the ReaScript API. I've been complaining a few times about how that isn't possible. And I'd rather not use an external plugin to do that unless it was explicitly designed to allow ReaScript access to the incoming MIDI messages. (Such a plugin is possible to do with the C++ extension API though.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
09-10-2016, 05:22 PM
|
#6
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by DarkStar
I think that LUA need an API to execute any Reaper action (perhaps it already has one) and, probably some new API functions.
That way, "ordinary" MIDI controllers and those without established Control surfaces for Reaper, could be made much more powerful.
|
Your proposal is very welcome and something I've been wanting to have for some time. Unfortunately at the moment the ReaScript API is not comprehensive enough to implement it. What is missing is the ability to get MIDI messages coming from the hardware MIDI inputs into ReaScript. (Running Reaper's built-in actions is certainly available, since the early days of the C extension API. API functions to control track parameters etc of course also exist.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
09-10-2016, 07:15 PM
|
#7
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
I heard some time ago devs are working on integration OSCIIbot in ReaScript. Not sure that was true.
|
|
|
09-10-2016, 08:09 PM
|
#8
|
Human being with feelings
Join Date: Jun 2012
Posts: 2,173
|
Quote:
Originally Posted by James HE
I'm working on a few thing in EEL that utilize this, Because there is no API that can manipulate the MONITOR FX chain, and that's what I want to do
|
I don't know much about this, or what you are up to. But I remembered seeing this:
Code:
C: int TrackFX_GetRecCount(MediaTrack* track)
EEL: int TrackFX_GetRecCount(MediaTrack track)
Lua: integer reaper.TrackFX_GetRecCount(MediaTrack track)
Python: Int RPR_TrackFX_GetRecCount(MediaTrack track)
returns count of record input FX. To access record input FX, use a FX indices [0x1000000..0x1000000+n). On the master track, this accesses monitoring FX rather than record input FX.
and this seems to work:
(But maybe you are asking for more? Well, just in case...)
Code:
local r = reaper
mt = r.GetMasterTrack()
retval,str = r.TrackFX_GetParamName(mt, 0x1000000+1, 1, "")
woops, remembered GetMasterTrack is supposed to have ReaProject. GetMasterTrack(0). lol, worked anyway...
Last edited by FnA; 09-10-2016 at 08:26 PM.
Reason: woops
|
|
|
09-10-2016, 08:24 PM
|
#9
|
Human being with feelings
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,467
|
Quote:
Originally Posted by FnA
I don't know much about this, or what you are up to. But I remembered seeing this:
Code:
C: int TrackFX_GetRecCount(MediaTrack* track)
EEL: int TrackFX_GetRecCount(MediaTrack track)
Lua: integer reaper.TrackFX_GetRecCount(MediaTrack track)
Python: Int RPR_TrackFX_GetRecCount(MediaTrack track)
returns count of record input FX. To access record input FX, use a FX indices [0x1000000..0x1000000+n). On the master track, this accesses monitoring FX rather than record input FX.
and this seems to work:
(But maybe you are asking for more? Well, just in case...)
Code:
local r = reaper
mt = r.GetMasterTrack()
retval,str = r.TrackFX_GetParamName(mt, 0x1000000+1, 1, "")
|
WOW! I asked justin about a year ago about this, and at the time there was no way to acces the MONITOR fx chain. not sure when it was added, totally missed it thanks!
|
|
|
09-11-2016, 02:19 AM
|
#10
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by mpl
I heard some time ago devs are working on integration OSCIIbot in ReaScript. Not sure that was true.
|
I hope they add Lua support for that if they are working on it...OsciiBot is currently scriptable only with Eel.
__________________
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 01:28 AM.
|