Old 05-24-2016, 05:29 PM   #1
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default Interactive ReaScript (Lua)

This script implements a REPL shell for Lua ReaScript inside of REAPER, for quickly experimenting code and API functions.



Main Features:
  • Autocompletion
  • Code history
  • Colored output
  • Copy/paste from clipboard
  • Error catching
  • Multiline input (functions, conditions...)
  • Pretty print return values
  • Run actions (!command_id, !!midi_editor_action)
  • Scrolling
  • Text selection
  • Text wrapping for long lines
Known Issues/Limitations:
Install:

iReaScript is available from ReaTeam's ReaScript repository in ReaPack.

Last edited by cfillion; 08-02-2018 at 08:34 AM.
cfillion is offline   Reply With Quote
Old 05-24-2016, 11:53 PM   #2
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

This is Amazing!
mpl is offline   Reply With Quote
Old 05-25-2016, 03:29 AM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

This is what I call an experimental script haha

Well done, it seems pretty good !
X-Raym is offline   Reply With Quote
Old 05-25-2016, 08:57 AM   #4
Claudiohbsantos
Human being with feelings
 
Join Date: Aug 2014
Location: New York
Posts: 135
Default

This is awesome, gonna have to give it a shot later tonight. I can see this becoming a very handy tool while reascripting
__________________
My Reapack Repo - Reapack Extension
Claudiohbsantos is offline   Reply With Quote
Old 06-07-2016, 08:09 PM   #5
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

iReaScript v0.2

+ enhance formatting of arrays containing nil values
+ implement Delete key
+ implement word movement keys (Shift+Left and Shift+Right)
+ imply the return statement by default
+ limit maximum depth when formatting tables
+ protect against overriding of built-in variables
cfillion is offline   Reply With Quote
Old 06-07-2016, 09:03 PM   #6
semiquaver
Human being with feelings
 
Join Date: Jun 2008
Posts: 4,923
Default

yes !!
semiquaver is offline   Reply With Quote
Old 08-02-2018, 02:42 PM   #7
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,669
Default

this seems like it'll be really helpful as i dive into scripts more.

i'm not quite getting it, though.

i want to use reaper.TrackFX_GetParam( track, fx, param ) to see the retval of "param." what syntax would i type in order to see that? i keep getting bad argument messages and can't figure out what to input.
__________________
mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
mccrabney is online now   Reply With Quote
Old 08-02-2018, 03:06 PM   #8
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by mccrabney View Post
i want to use reaper.TrackFX_GetParam( track, fx, param ) to see the retval of "param."
That API function needs a MediaTrack*, the FX number and the parameter number (counting from zero). It returns {current internal value, minimum, maximum}.

To get the first track's first FX's first parameter:

Code:
track = reaper.GetTrack(0, 0)
reaper.TrackFX_GetParam(track, 0, 0)

Last edited by cfillion; 08-02-2018 at 03:11 PM.
cfillion is offline   Reply With Quote
Old 08-02-2018, 03:19 PM   #9
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@cfillion
Ok so no prolem if it is the expected behavior :P
X-Raym is offline   Reply With Quote
Old 08-02-2018, 03:22 PM   #10
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,669
Default

got it, thanks! great tool.
__________________
mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
mccrabney is online now   Reply With Quote
Old 03-17-2020, 10:32 PM   #11
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Quote:
Originally Posted by cfillion View Post
That API function needs a MediaTrack*, the FX number and the parameter number (counting from zero). It returns {current internal value, minimum, maximum}.

To get the first track's first FX's first parameter:

Code:
track = reaper.GetTrack(0, 0)
reaper.TrackFX_GetParam(track, 0, 0)
And how to get the midi mapping of that parameter?
TonE is offline   Reply With Quote
Old 06-11-2020, 10:25 AM   #12
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Hi !


It seems that \ character become _\ on the console... I was trying to input windows path. :S


Thx !
X-Raym is offline   Reply With Quote
Old 06-11-2020, 11:00 AM   #13
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

I can't reproduce that on macOS or Windows (typing a \ inserts only a \). Maybe it's tied to a specific keyboard layout? What does gfx.getchar() and utf8.char(theReturnValueFromGetChar) returns?
cfillion 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:39 AM.


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