Benches Uncategorized

10

Mainstage Garage Band control scripts

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hi folks, Has anyone here had any success with these automator scripts, which are in the Apple Script showcase and promise control of GarageBand as a sequencer from within MainStage?
http://www.apple.com/applescript/mainstage/index.html

I've installed the MainStage controller song template & scripts and moved my songs into the required path Macintosh:HD:Users:Keith:Music:GarageBand, as stated in the tutorial. However, there seems to be an error in the script 'GB Open chosen song' that sits behind the button that attempts to open a GB song list.

On my machine, this script fails, expecting the path Macintosh:HD:Users:musicman:Music:GarageBand, rather than accepting my home directory. The scripts are installed inside the HD-wide Library, so should be available to all users. I have never done any apple script editing but opening the file in Script Editor, I can't find an obvious 'hard-coding' to correct.

Can any scripting experts shed some light here, as the idea of a Mainstage rig with integrated GarageBand sequencer control would be a killer application for me.

Best

Keith..

Message was edited by: Number 6

10 replies

Sign in or join Beachball Help to reply.

  1. 0

    Thor Stevens

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    O.K.

    I found the answer to the file directory issue. In Script editor, open the script "GB open chosen song" (in the mainstage scripts folder where the installer placed it), and in the 2nd line that starts with "property master
    sourcedirectory :" replace "(path to music folder)" with your path to your music folder. (who would've thunk).

    For example, if your user name is SteveJobs and your boot drive was Macintosh HD, this line would read exactly

    property master
    sourcedirectory : (("Macintosh HD:Users:stevejobs:Music:" as string) &"GarageBand:")

    I originally tried forward slashes but the colons seem to be the way to go. Also, don't forget the quote marks!

    You can now save it or save as back in the Mainstage scripts folder and you're good to go.

    It isn't necessary to place your .band file in a garageband folder, Just delete the first "(" and the "as string) &"GarageBand:")" It just makes it more organized. If your folder has other files in it, the files will show up in your selection box, so make sure you're final folder has only .band files in it.

    Good Luck,

    Thor Stevens

  2. 0

    Thor Stevens

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    By the way,

    If you are Steve Jobs...Rock On!

  3. 0

    Number 6

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Thor,

    That's great, well done and thanks for solving this - even though you guessed the wrong user account 😉

    I saw the 'property' statements but with no Apple Script knowledge, I thought this was documentation of variables that the next section of the script would set - not prerequisite variables, that needed to be defined for the script to run! There is no mention of this in the tutorial video - in that, it states that if you place your Garage Band files in the correct folder, they will show up in the pick-list.

    So, for future reference for others, here are the full instructions on personalising the basic installation achieved by downloading, installing and configuring the AppleScripts and GarageBand controller template components following the set-up in the MainStage AppleScript page
    http://www.apple.com/applescript/mainstage/index.html:

    1. The MainStage scripts sit in the shared level 'above' individual users, in the folder 'Macintosh HD/Library/Application Support/Logic/MainStage Scripts', so you need temporary read/write permissions on this folder to be able to edit & save the scripts. So, use Finder, control-click this folder, chose 'Get info', then under Sharing & Permissions, add your own account and set red/write permissions (you will need the Administrator password to unlock this settings area by clicking the padlock).

    2. Open the file 'GB • Open Chosen Song.scpt' in Script Editor (it should be the default) and edit the second line 'property master
    sourcedirectory' so that the path to your user account's GarageBand folder. Here is what worked for me (my user account is 'Keith'):

    property master
    sourcedirectory : ((("Macintosh HD:Users:Keith:Music:") as string) & "GarageBand:")

    3. Use 'Save As' to save your personalised script back to the MainStage Scripts folder (keep the original, just in case you need to set up other users)

    4. In MainStage, go into Edit mode, select the 'Open GB Doc' button in your GB controller and set Parameter Mapping to your revised file, via Actions>AppleScript>'your personalised open song file'.

    Best

    Keith..

  4. 0

    Thor Stevens

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hey Keith,

    Glad we got this thing working.

    On my second line, I didn't put the innermost parentheses but I see that it works either way.

    It's nice to run GB from Mainstage.

    I tried to put in a slider in my mainstage layout to "slide down the list of GB files but I couldn't find a action to make the slider send "down and up arrow" and "return"hotkey events.

    Being a sax player, I'm not able to be right next to my Axiom 61 or computer keyboard to change GB files from that window, I have a device called Alien Apparatus Show Control that is a footswitch with software that is able to send hotkeys for any application. So I just use 3 of the 5 foot switches to send arrow up, arrow down, and return key presses.

    Thanks again for bringing this GB controller to my attention.

    Regards,

    Thor Stevens

  5. 0

    Number 6

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Thor,

    Yes it's good to have a sequencer available within MainStage, though it's a shame that the current set of scripts and controls do not provide a full integration of the two applications for the performing musician.

    I'm a singer & multi-instrumentalist and tend to use a single MainStage patch per song with channel strips for vocal, guitar, keyboards (generally some kind of piano & a Hammond from within MainStage, using the expression pedal to blend/switch) and any other song-specific mic channels for harmonica or sax. I was rather hoping that once I'd got this integration working I'd be able to save the Garage Band song list within my MainStage patches and have GarageBand slave to MainStage as I run through my set. However, there are two areas that could be improved to support my way of working:

    1. GarageBand song selection is independent of patch change. I can see this being useful when a player wants to use multiple MainStage patches over a single GarageBand song backing track (without the latter re-loading) but for me it adds to the delay & room for error between songs. It would be nice to have a controller button that can sets specific patches to be 'song masters' to force the loading of a patch-specific, song in GarageBand. That way, a song could be associated with one or the first of a group of patches (until the next 'master' patch is reached in the list). Creating a MainStage button to set the song master state would be easy enough, but I suspect this would need additional AppleScript work in the GB Open Selected Song AppleScript - to enable the saving of the song and the forced load of the saved song - which is currently beyond me.

    2. Song parameters: It seems that whilst the GarageBand controllers sit inside a patch, the volume and tempo parameters aren't sent when a patch is opened or when a controller is selected. I can't see a way to force a MainStage knob or slider to send its current value, so this means turning a controller knob away from the desired value & back, which isn't so good for fast, efficient live work. It would be nice to be able to associate a button with each of these two knobs, to send their current value. I can't see how to do this from within MainStage but it may be possible to use AppleScript to get the knob controller's value & assign it to the button

    BTW I like the up/down/return foot-switch idea - though as I have my Mac to hand when playing, the arrow keys will suffice for now (until I can assign a song to patches in advance)!

    I wonder if the developer of the original AppleScript controller code might one day read this thread 😉

    Best

    Keith..

  6. 0

    pwohlfah

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    hi,

    where can i find a tiger compatible installer for these scripts?

    Peter

  7. 0

    Thor Stevens

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Peter,

    Check on google for a shareware app called Pacifist.

    Open those packages in Pacifist and let it install it to their default location. If you have a problem I can just email you the scripts and template files and you can place them in their locations

    scripts into

    /Library/Application Support/Logic/Mainstage Scripts/

    (This is on your boot drive, not your home folder),

    and the template into

    /Users/"username"/Music/Mainstage/

    I haven't tested it in Tiger so I don't know if it will work!

    Regards,

    Thor Stevens

  8. 0

    pwohlfah

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Thor

    thank you,

    I will try and report if the scripts work in tiger,

    regards, peter

  9. 0

    pwohlfah

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Thor,

    I just tried the scripts and they also work in tiger.

    I tried to add scripts to record enable track and record,

    but unfortunately garageband actions were not recorded by the script editor.

    is the actual version of garageband recordable in the scripteditor or does that work in leopard?

    regards,

    Peter

  10. 0

    Thor Stevens

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Peter,

    I'm not well versed in applescript. I wish I were, because the things you can do are really sweet! I do know that in the script editor you can open an applications' dictionary to see what commands it responds to. As for garageband being recordable in the script editor, I don't think it is. If it were, your actions would show up in the editor as you perform them in Garageband.

    Regards,

    Thor Stevens

    Tampa Bay