Old 08-10-2020, 01:44 PM   #1
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default JSFX and action ?

Can a JSFX run a Action/Script? Like we can on Scripts side call a reaper.Main_OnCommand?
daniellumertz is offline   Reply With Quote
Old 08-10-2020, 10:17 PM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

What I do:
- Have the JSFX send some Midi (usually CC) event
- use MidiToReaControlPath to generate a Control Path Message from that message.
- learn the message (CC channel and #) to an action that starts the script
- you can use the CC value as a parameter for the script (see ReaPack "mute/unmute track")

Another way might be to
- do a recursive (deferred) script and
- use gmem to communicate between the script and the JSFX e.g. set a flag to have the script do something.

-Michael
mschnell is offline   Reply With Quote
Old 08-10-2020, 11:47 PM   #3
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by mschnell View Post
What I do:
- Have the JSFX send some Midi (usually CC) event
- use MidiToReaControlPath to generate a Control Path Message from that message.
- learn the message (CC channel and #) to an action that starts the script
- you can use the CC value as a parameter for the script (see ReaPack "mute/unmute track")

Another way might be to
- do a recursive (deferred) script and
- use gmem to communicate between the script and the JSFX e.g. set a flag to have the script do something.

-Michael
hmm didn't know about MidiToReaControlPath I was thinking something likely doing a feedback using MIDI virtual cables, I will test it out thanks!


EDIT 2 : it worked, thanks pretty cool!
but there is the need to assign the action to a MIDI, I was thinking in something like we have in markers with SWS where you can put !action number... but in the midi piano roll

Last edited by daniellumertz; 08-10-2020 at 11:56 PM.
daniellumertz 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 05:56 AM.


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