Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Charles Holbrow
    Does the chat work?
    I think that's a "yes."
    Manaswi Mishra
    aarΓ³n nontoya-moraga
    Drew Petersen

    A quick bash script to close the document in reaper, regen the RPP, and open it:

    set -euo pipefail
    set -x
    osascript <<EOF
    tell application "REAPER"
      -- key code 118 is F4
      tell application "System Events" to key code 118 using {command down}
    end tell
    node "$SCRIPT"
    open ${SCRIPT%.js}.RPP


    ./reload.sh SCRIPTFILE.js

    Drew Petersen
    goal with that is to avoid having to tab over, hit the keyboard shortcut, and do the terminal
    instead you just do one terminal!
    Charles Holbrow
    @kirbysayshi Wow, I'm going to try that out.
    There are several commands in there I haven't seen before, but am glad to know about. πŸ‘ŒπŸ»
    Drew Petersen
    i do not know Applescript AT ALL, this was mostly just copy/paste from the internet
    Charles Holbrow
    Drew Petersen
    -- key code 118 is F4 is a comment, fyi
    Charles Holbrow
    nice, yeah that was my guess.
    I have a few ideas for how to improve that part of the workflow, but this is an easier solution
    Drew Petersen
    i'm sure there's a way to make the flow more intuitive, but this can be a stopgap for mac users at least
    Charles Holbrow
    Charles Holbrow
    When using Drew's helpful bash/Apple Script, I found I had to save any changes I made in reaper before running the script. That way the "Save Project before Closing?" dialog box doesn't open up (preventing reaper from reloading disco.RPP via the script.
    Charles Holbrow
    Here's a two line reaper script (in lua) that can be used to reload the active project :
    project, filename = reaper.EnumProjects(-1)
    reaper.Main_openProject('noprompt:' .. filename)
    type ? to open the Action list in reaper, click new action->new ReaScript. Then paste in those lines into the enditor. You can then bind the reascript to a shortcut hotkey, same as any other action.
    Nice one!