Thread: Presonus Atom?
View Single Post
Old 09-07-2019, 05:32 PM   #18
kenm
Human being with feelings
 
Join Date: Dec 2011
Location: San Jose, CA, USA
Posts: 115
Default

So far I've been able to enable and disable NC mode from within Reaper as well as a very simple script to turn the Shift button LED On when the button is pressed and turn it Off when the button is released. This script will also be used to set a "global" shift mode to tell other scripts the shift button is pressed. I also found out how to automatically run a script at Reaper startup to Enable NC mode. Unfortunately, I can't find a way to run a script at shutdown to Disable it.

ATOM_enableNC.lua - Searches the MIDI Output devices until it finds an ATOM and sends the appropriate MIDI message to enable Native Control Mode.

ATOM_disableNC.lua - Same as able but it disables NC Mode.

__startup.lua - Runs ATOM_enableNC.lua every time Reaper is started.

ATOM_shift_test.lua - Bound to MIDI CH01 CC32, this script turns on the shift button LED when the button is pressed and turns if off when the button is released. You'll need to add the binding to the script action trigger manually.

Thanks to @airon for the example of how to search for a MIDI output device, @mespotine for the tip on creating a startup script, and @heda for the example of how to run a lua script from another lua script.

More to come.
Ken
Attached Files
File Type: lua ATOM_enableNC.lua (783 Bytes, 342 views)
File Type: lua ATOM_disableNC.lua (783 Bytes, 307 views)
File Type: lua __startup.lua (189 Bytes, 341 views)
File Type: lua ATOM_shift_test.lua (382 Bytes, 321 views)
kenm is offline   Reply With Quote