Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Remove duplicate Soundtrack loops from GarageBand Apps
Now that iLife '04 has been released, many people have GarageBand and Jam Pack. And quite a few also have Soundtrack. Many of those that have both have dropped their Soundtrack loops into GarageBand to get an extra 4000 loops in their GarageBand collection. There's only one problem. 2000 of those are duplicates of your GarageBand and Jam Pack songs. I have compiled a list of the songs that are copies from Soundtrack. I have also created a shell script which will delete the duplicates from the Soundtrack files -- over 2 GB worth of unneeded loops!

Here are lists of the duplicates. These lists are only for informational purposes and are not needed to run the script.

Loop Duplications for GarageBand and Soundtrack - Total: 726
Loop Duplications for Jam Pack and Soundtrack - Total: 1429
Loop Duplications for GarageBand and Jam Pack - Total: 20

The script can be downloaded here.

To run this script, you will have to make sure it is executable (chmod 755 gb-deletedupes.sh) and you run the script from the Terminal. It has three options. It can delete only the loops in list one, only the loops in list two, or all the loops from both list one and list two. I will give examples of each use.

If you don't have the Jam Pack, you only need to delete the songs from list one. The ones from list two aren't duplicates for you. So you need to use the -g option:
% ./gb-deletedupes.sh -g Soundtrack\ Loops
If you do have the Jam Pack installed, then you'd want to delete all the duplicates from both lists one and two. To do that, use the -b option:
% ./gb-deletedupes.sh -b Soundtrack\ Loops
If you have already run this script to delete the loops from list one, and then installed the Jam Pack and only need to delete the loops from list two, then use the -j option:
% ./gb-deletedupes.sh -j Soundtrack\ Loops
This script has basic checking and verification built-in. It asks for confirmation before doing anything and lets you know exactly what you chose to do before you do it. It is best to run this script before you add the loops to GarageBand. To do that, simply copy the Soundtrack Loops folder off the Soundtrack Loops DVD. Then just run the script with that folder as the directory. If you have already added the Soundtrack Loops to GarageBand, simply use the Soundtrack Loops folder inside /Library -> Application Support -> GarageBand -> Apple Loops. Make sure GarageBand is not running when you remove the files. Then, you must have GarageBand reindex the loops. You can do this simply by selecting one of the deleted songs, such as "Edgy Modern Rock Bass 22." It will see the song is missing and ask to reindex.

I have tested the script many times and it has worked for me. It only deletes files from the directory you specify and only works if the directory structure has not changed from the original Soundtrack Loops layout. If you experience problems with it, please post here and let me know what you have encountered.
    •    
  • Currently 3.40 / 5
  You rated: 4 / 5 (5 votes cast)
 
[36,603 views]  

Remove duplicate Soundtrack loops from GarageBand | 17 comments | Create New Account
Click here to return to the 'Remove duplicate Soundtrack loops from GarageBand' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
The question is:
Authored by: JazzDude on Feb 03, '04 03:01:22PM

Which JamPack loops are already in Soundtrack? Which of SoundTrack's loops can be deleted when you want as many different loops as possible?



[ Reply to This | # ]
The answer is:
Authored by: Xeo on Feb 03, '04 09:22:52PM

In the hint there are 3 links to text files. These text files are lists of the duplicate files. It is a complete list of file names. Each pair consists of one file from GarageBand and one file from Soundtrack and they are identical to each other. You can delete either without losing any unique loops. My script automates this process by deleting the Soundtrack half of the unique loops.



[ Reply to This | # ]
Remove duplicate Soundtrack loops from GarageBand
Authored by: ehgoodwin on Feb 03, '04 08:09:20PM

What abou the other direction. I have my Soundtrack loops on a dedicated media volume, GarageBand Loops on my System volume, I'd like to remove loops from the GarageBand folder and rely on the loops on the media drive instead



[ Reply to This | # ]
Remove duplicate Soundtrack loops from GarageBand
Authored by: bluehz on Feb 03, '04 11:40:17PM

I am running both Garageband and Soundtrack. Could you give us a few more detail on combining the two libraries in the first place... creating one unified library from scratch.



[ Reply to This | # ]
Updating GB Index & Omitted Files
Authored by: thunderjug on Feb 04, '04 08:52:10AM

Xeo, this is an amazing piece of work. Thanks for posting! I'm having a problem getting GB to recognize the new Soundtrack files, however.

(I have GB, GB Jam Pack and Soundtrack.)

I saw your detail about selecting "Edgy Modern Rock Bass 2", which should cause GB to re-index - but I'm not able to find any sound files that cause this to happen. I can't even locate "Edgy Modern Rock Bass 2" in GB!

Then I realized something else: There are a number of sound files that don't appear in the GB sound browser that ARE in the "/Library/Application Support/GarageBand/Apple Loops" directory. (This is completely regardless of adding the Soundtrack files.)

For example, if I search for "Edgy" in GB sound browser, my first results are "Edgy Rock Bass 05" and "Edgy Rock Bass 08" - but there are files in that directory, beginning with "01", that should appear.

At first I assumed that the file time signature may have restricted them out, but nope, they're all 4/4.

Any idea what would prevent these files from appearing?



[ Reply to This | # ]
Updating GB Index & Omitted Files
Authored by: jgallagher on Feb 04, '04 10:15:18AM

Check what key they're in; unless you've changed it in your GarageBand preferences, GB only shows you loops within a certain range of the key you've chosen.



[ Reply to This | # ]
re: Omitted Files
Authored by: thunderjug on Feb 04, '04 10:52:01AM

That nailed it. I saw that multiple keys appeared in the results, so I assumed that ALL keys were appearing. I didn't notice that there was a preference to only display results within a limited range of keys. Unchecking this preference made all of 'em available.

Thanks!



[ Reply to This | # ]
Updating GB Index & Omitted Files
Authored by: MacPower on Jun 13, '04 03:10:01PM

Yep, you're right. This is unbelievable, hm... useless.
No, worse, it seems a bit "Microsoft" to me.
Just like automaticly making capitals of al first letters in ... Word (barhf)



[ Reply to This | # ]
Updating GB Index & Omitted Files
Authored by: MacPower on Jun 13, '04 03:00:10PM

Yes, why is it dat edgy modern rock bass 02 and others... don't show up in Garageband!!!



[ Reply to This | # ]
Remove duplicate Soundtrack loops from GarageBand
Authored by: douche on Feb 16, '04 02:34:43PM

Great work! I have been mystified at why these loops would be distributed twice with different names...very annoying. I was resigned to the process of manually weeding them out, until you came along. Thanks!

A couple of caveats for users, though. When you open existing projects, you may get "file not found" errors for tracks you've created (if the script removes a duplicate that you happened to use). You'll have to locate the corresponding loop names. Xeo's lists of which loops are which comes in VERY handy here. If you edited the loop, or otherwise messed with it within your song, you may lose some of those changes. Just be careful.

Also, Garageband acted very funny after I used the script, but after a restart, it was fine again.

All in all though, great job!!!



[ Reply to This | # ]
Remove duplicate Soundtrack loops from GarageBand
Authored by: deadjoe on Feb 24, '04 01:58:30PM

i need to delete my duplicate loops as described above BUT i dont understand how to use the terminal!
could anyone explain step by step how to do it?
thanks a lot
ron



[ Reply to This | # ]
Remove duplicate Soundtrack loops from GarageBand
Authored by: erraticninja on Feb 28, '04 01:11:53PM

whenever i try to run the script i get

./gb-deletedupes.sh: line 72: [: =: unary operator expected
Action cancelled. No changes have been made.

any clue how to fix this??



[ Reply to This | # ]
HOW TO ADD EXTRA LOOPS
Authored by: brodie on Mar 04, '04 03:01:42PM

to add loops just drag them onto the loop browser. garageband will then update its library accordingly. you dont have to move them either!



[ Reply to This | # ]
HOW TO ADD EXTRA LOOPS
Authored by: JigShaun on May 09, '04 10:17:35PM

I don't understand how to execute the command. I know you can't just type -g. What do I put in the next line? HELP? Also, I tried to just drag all the loops from the Soundtrack folder into the Garage Band loop browser. It seems to import the loops fine, but it wants to COPY them all. I don't have the room for that. What do I do so Garage Band just indexes the loops without copying them all into the Garage Band loops folder?

---
Shaun



[ Reply to This | # ]
HOW TO ADD EXTRA LOOPS
Authored by: JigShaun on May 13, '04 02:20:22AM

I'm not that concerned that there are duplicate loops between GB and ST. I mean, I'd rather there weren't, but so be it. But is nobody else having the problem that when they try to add the soundtrack loops to the Garage Band browser, the MacOS wants to COPY all the files, rather than just index them? Is there some way around this?

---
Shaun



[ Reply to This | # ]
Step by Step
Authored by: Xeo on Nov 19, '04 02:13:28PM

Every couple of months I get a new e-mail in my box from someone who is stuck somewhere along the way. Here is my stock reply to these people and in almost every case, it has been enough to get it working for them. I hope this can help others in the future.

1) Download the script to your home directory
2) Unzip it (with Stuffit Expander)
3) Open Terminal
4) Make sure the script is executable by running "chmod 755 gb-deletedupes.sh"
5) Type "./gb-deletedupes.sh" and hit enter. If it is set up correctly, it will show you the various options and what they mean. If it is not working, you will get an error like "file not found" or "command not found" or something similar.
6) Now type "./gb-deletedupes.sh -b " but don't hit return, and note the space at the end, and the space between the command and the -b. I used -b in this example, but use whatever option is appropriate. The choices are -b -g and -j.
7) In the Finder, open the folder that contains the Soundtrack Loops folder, so if Soundtrack Loops is in your home directory, open your home directory, or if soundtrack loops is in /Library/Application Support/whatever then open that folder.
8) Drag the Soundtrack Loops folder onto Terminal, it will fill in the rest of the command for you.
9) Now just hit return in terminal and it will execute. If everything looks OK, it will prompt you to say yes or no to continue, and just type Y (that is a capital Y... it matters) then return to continue. It should delete the files at that point.

Also, I have been considering updating the script and lists with the new Jam Packs but have not gotten around to doing it yet.



[ Reply to This | # ]
finding duplicates
Authored by: hayne on Jan 19, '06 10:46:20PM

The above script has a hard-coded list of duplicates.
But if you want to find other duplicates (e.g. in newly released packs) you might be interested in the Perl script I wrote. It is actually a very general script for finding duplicates of any type of file (based on comparing the MD5 digests that are computed from the content of the files).

You can get this Perl script (which I call "findDupeFiles") from the following thread on the macosxhints forums (post #7 of that thread):
http://forums.macosxhints.com/showthread.php?p=264200



[ Reply to This | # ]