Terminal Tip: Rip, Normalize your CD’s from the CLI
| Monday, April 14th, 2008
I’m a geek, so as you probably suspect, I get some really odd satisfaction from watching stuff go down in the Terminal. But, being self taught, I’ve still got a lot to learn about the finer nuances of command line life on a *nix based platform. So, when I stumbled across this photo on Flickr, I was quick to inquire about how he did that voodoo magic. I decided to repost the steps I took along with some explanations.
The biggest obstacle most new Terminal users face is figuring out how to use applications, and more importantly, how and where to find these applications. As a precursor to this post, I’ll be explaining the use of macports .Â Â Â Macports is a library of applications that you can run from the Terminal that are pre-configured for the mac platform and are readily available for your download. The biggest obstacle in this whole process is getting your macports to install properly. Generally speaking, you download the package from the macports site and install it. You should be ready to run, but if you’re having some difficulties you may want to check out this article . So here are the steps used to get the Terminal applications you need:
- sudo port install cdparanoia
- sudo port install normalize
- sudo port install lame
This will install all of the necessary programs for ripping your music and making sure that the levels are the same across all of the tracks (normalizing
them). Now, these applications may need other applications and packages to work properly, so don’t get all paranoid when you see other things installing when you install cdparnoia, normalize, or lame. It’s normal. Relax. Once all that goodness is done, you can input these commands exactly as is, from anywhere in the Terminal. It’s important to note that your files will be copied and worked on in what ever directory you’re currently in.
- cdparanoia -vB
- normalize *.wav
- lame -k -h -ms -b320 –nogap *.wav
- rm *.wav
Now, one of the great things about the Terminal is you have the ability to run scripts. I’ve put this process into a bash script for you, so you can just run the script when you’re ready to rock. The script, for those of you not in the know, will run through each of the aforementioned steps automatically. It’s pretty fun to watch the script run through it’s steps. Sit back and enjoy the ride!
Here’s the script if you want it. Make sure you edit the privileges of the script so that it’s executable.Â You can do this in the Terminal using the chmod command, or you can right click on the script, click on get more info, and go to the sharing and permissions in the info window. Here you can give a user the ability to execute the script.Â You can run the script in the Terminal by navigating to the proper folder and typing, ‘sudo ./rip.sh’Â Your script should start running at that point.
Sound off in the comments if you have a better way of doing this… the geekier the better IMO.
Props goes to theshizabox for the info on this protocol.