Managing GarageBand Loops At the Command Line

GarageBand has a lot of royalty-free loops and additional content that’s not installed by default.  If you are a Mac admin and need to deploy GarageBand and/or Logic, you don’t want every client to have to download the additional content when it is first opened.  It is much better to deploy the content during imaging.

gb-new-sounds

Downloading And Deploying Additional GarageBand Content

The script below will download all of the additional content in deployable-friendly .pkg format.  According to some folks on JAMF Nation, these packages need to be installed in a certain order.

Indexing The Loops

Sometimes GarageBand just stops seeing the loops, or they never get recognized in the first place.  Apple won’t tell you why this happens, just that it does.  Whatever the reason, I needed a much easier method than manually stepping through 15+ steps provided by Apple on hundreds of computers.  So I wrote a script that does this for you for any version prior to 10.

Get The Indexer

You first need to install ALPIndex.app, which is on the iLife install CD in GarageBand_Loop.pkg/Scripts/Tools/ALPIndex.app .  It needs to be version 1.6.0 (219.11).  There was a slightly earlier version that I could never get to work properly.  Since this is Apple’s software, I can’t really make it available to download, but you know where to find it. Once that is installed, you can use this script to index the loops:

Why Doesn’t The Indexing Work In Version 10?

In version 10, Apple has changed how the loops are indexed by using an in-app button.  I’m still trying to determine if there is a command line utility like ALPIndex, but I haven’t found one yet.

re-index-loops-10

The loops are now stored in a database instead of text files, so that could be part of the reason for the change.  The database is found in ~Library/Containers/com.apple.garageband10/Data/Library/Application Support/Logic/LoopsDatabaseV09.db .  

Ensuring Each Computer Has The Correct Loops

Another issue I ran into was that some computers did not get all of the loops in the first place.  If you know how many loops should be installed, you can run this script, which will tell you.

#!/bin/bash
# http://stackoverflow.com/questions/1767384/ls-command-how-can-i-get-a-recursive-full-path-listing-one-line-per-file
printf "Installed loops:"
ls -R /Library/Audio/Apple\ Loops/Apple | awk '
/:$/&&f{s=$0;f=0}
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}
NF&&f{ print s"/"$0 }' | wc -l

ls -R /Library/Audio/Apple\ Loops/Apple | awk '
/:$/&&f{s=$0;f=0}
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}
NF&&f{ print s"/"$0 }'

s

Leave a Reply