Old 03-04-2019, 09:05 AM   #1
jamesd256
Human being with feelings
 
jamesd256's Avatar
 
Join Date: Dec 2015
Location: Folkestone
Posts: 160
Default Re-implement JSFX as ReaScript (Megababy)

Been spending time looking into the code and feature set of Megababy.

Like some others, my interest is exposing MB to hardware control, but also I would like to see MB be able to work with scenes across multiple tracks, a bit like Playtime.

Being that MB currently exists as a plugin, and can ordinarily control only one track per instance, the solution could be to have an external 'thing' orchestrating MB instances, but this feels like a terribly disjointed approach.

I'm aware Playtime sits in a VST and writes to tracks via the Reaper extension API, which although will work, seems to also be compromised by complexity (and obscurity?).

Having recently discovered the actual differences between ReaScript and JSFX programming, I'm wondering about the feasibility of re-doing MB as a Reascript

As far as I can tell, the API stuff used by MB seems to revolve mostly around gfx functions for drawing the interface and midisend/midirecv covering all the I/O.

Is it still the case that it's not easy to receive midi messages in ReaScript? If I understand correctly from this thread:

https://forum.cockos.com/showthread.php?t=155860

It's possible but clunky to do it with get_action_context()? I presume this is how actions read the midi values when assigned midi CC or note inputs.

For sending midi, can midisend be simply ported to StuffMIDIMessage?

Thanks

Edit: I forgot about the slider stuff. Is there a way to roll your own slider inputs?

Edit: Thinking about other examples of scripts with sliders, I remembered this (it is Lua not Eel of course):

https://forum.cockos.com/showthread.php?t=204972

Last edited by jamesd256; 03-04-2019 at 09:29 AM.
jamesd256 is offline   Reply With Quote
Old 03-04-2019, 09:13 AM   #2
jamesd256
Human being with feelings
 
jamesd256's Avatar
 
Join Date: Dec 2015
Location: Folkestone
Posts: 160
Default

Further discussion about hardware control.

If anyone hasn't seen, there is a rather good update of MB to support the Akai APC mini.

https://stash.reaper.fm/v/30965/Mega...ai_support.zip

It's a bit hardcoded, but quite feature rich, and could easily be re-purposed to support other controllers, perhaps via some externalised mapping files.

Going back to the JSFX/ReaScript question, an interesting solution is offered by this plugin to handling messages intended for the controller, and not for the sound source; they are mapped on input to CC messages on channels 15/16 by a very lightweight separate JSFX plugin, then on output (so after the MB plugin) mapped back to the messages the controller understands.

What this shows again is the limitations of JSFX imposed on MB in separating out midi I/O for note output and controller I/O. I am not surprised it doesn't seem well known, it needs 3 plugins to work, and is not straightforward to set up (plus it only supports one controller for now)

Porting MB to ReaScript might also simplify this kind of issue, not to mention being able to change pattern/transpose without needing notes mapped on the (single) available midi input.
jamesd256 is offline   Reply With Quote
Old 03-04-2019, 01:18 PM   #3
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,580
Default

ReaScript has very limited features to deal with realtime MIDI messages. Converting a JSFX that deals heavily with realtime MIDI messages into a ReaScript doesn't seem feasible to do.
__________________
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, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 03-05-2019, 03:59 AM   #4
jamesd256
Human being with feelings
 
jamesd256's Avatar
 
Join Date: Dec 2015
Location: Folkestone
Posts: 160
Default

Quote:
Originally Posted by Xenakios View Post
ReaScript has very limited features to deal with realtime MIDI messages. Converting a JSFX that deals heavily with realtime MIDI messages into a ReaScript doesn't seem feasible to do.
Makes sense, thank you.
jamesd256 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 06:38 AM.


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