Renoise & Apple Script

Hi. What have you guys been doing with Apple Script & Renoise? Just recently became aware of AppleScript (since was fiddling around with wanting to start a couple of programs for my gig). Ended up doing a little script which

  1. Opens Ableton Live
  2. Opens Sample Manager
  3. Opens Schism Tracker
  4. Hides Sample Manager
    4.5) Waits 25 seconds or so (so Live has loaded)
  5. Opens Renoise from commandline, with rewire-slave-mode -forced and opens a specific .xrns which is prepared in tandem with the .als.
  6. Bring Ableton Live back to the active screen.

It looks like this:

tell application "Live" to launch  
tell application "Sample Manager" to launch  
tell application "Schism Tracker" to launch  
tell application "Audio MIDI Setup" to launch  
tell application "Sample Manager" to activate  
tell application "System Events"  
 tell process "Sample Manager" to keystroke "h" using command down  
end tell  
tell application "Live" to activate  
delay 20  
tell application "Live" to activate  
do shell script "/Applications/Renoise_Reg.app/Contents/MacOS/Renoise -ForceRunningAsSlave /Users/esaruoho/Music/Modules/logicbus_renoisetemplate.xrns"  
tell application "Live" to activate  
tell application "Live" to activate  
  

It works. I’m really glad to be able to use Alfred to just type “run gig” and the applescript runs. I don’t need to stress about whether Renoise was opened in ReWire Slave mode or not anymore. Can just set up for a gig and type run gig and off we go.

The next step was to figure out how to make an applescript, which could be used as a keyboard shortcut inside Renoise, to “select the whole pattern” and then position the mouse to “Expand” or “Shrink” positions, and to click that. So far have been able to send the “select current column content” command via AppleScript ( ```
tell application “Renoise_Reg” to launch
tell application “Renoise_Reg” to activate
tell application “System Events”
tell process “Renoise” to keystroke “l” using command down
end tell
end

(Cmd-L is my Alt-L (ST3/IT2/Schism) replacement for Renoise). I'll keep carving at this until I know how to type a keystroke with both command and shift down, and then the next step is to of course learn how to align the cursor to a specific place ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)  
  
But this begs the question, does anyone else actually use AppleScript and Renoise around here? What have you guys done?

I did a really simple script for switching mouse buttons left/right to accommodate my trackball and switching mouse hands. Other than that I’ve not used it… One thing I noticed, though, is that whenever I try to do something with the ‘automator’, I fail. Or rather the automator fails. Maybe I don’t have da skillz to use it properly.

can you show the script? i’ve been trying to send mouseclicks into renoise but so far have been unable to ( have tried like this:

tell application "Renoise_Reg" to launch  
tell application "Renoise_Reg" to activate  
tell application "System Events"  
 tell process "Renoise" to keystroke "l" using {command down, shift down}  
end tell  
tell application "System Events"  
 tell process "Renoise"  
 click at {1380, 295}  
 end tell  
end tell  

But for some reason clicking doesn’t work. I got really weird results when started using click.m (), was able to send some sort of a click “at a certain position” into Renoise but Renoise would actually graphically start looping, so I was unable to have Renoise click on Expand for me :)

What kinds of things have you been trying to do with Automator?

My small script for switching the mouse buttons:

  
tell application "System Preferences"  
  
 activate  
  
 set the current pane to pane id "com.apple.preference.mouse"  
 get the name of every anchor of pane id "com.apple.preference.mouse"  
 reveal anchor "mouseTab" of the current pane  
  
end tell  
  
tell application "System Events"  
  
 tell process "System Preferences"  
  
 get value of radio button 1 of radio group of window 1  
  
 if value of radio button 1 of radio group of window 1 is {0} then  
 click radio button 1 of radio group of window 1  
 else  
 click radio button 2 of radio group of window 1  
 end if  
  
 click button 1 of window 1  
  
 end tell  
  
end tell  
  

I doubt, however, that this will help your scenario, because this relies on the native OS gui elements. With renoise you cannot reference things such as ‘radio button 1’ or ‘radio group’. And I must stress that I’m a complete novice when it comes to AppleScripting… I kinda have a faint memory (this was a long time ago…) that the ‘get’ commands were just for sniffing the gui elements, and they are not really necessary in the script anymore.