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.

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, which is on the iLife install CD in GarageBand_Loop.pkg/Scripts/Tools/ .  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.

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/ 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.

printf "Installed loops:"
ls -R /Library/Audio/Apple\ Loops/Apple | awk '
NF&&f{ print s"/"$0 }' | wc -l

ls -R /Library/Audio/Apple\ Loops/Apple | awk '
NF&&f{ print s"/"$0 }'