shntool and Shorten v3.4 for Mac OS X

Last updated: September 23, 2002


Installing shntool and Shorten v3.4

Using shntool

Using Shorten v3.4

Batch processing with shnwrap

The manual pages

Tracking audio files with shntool




By Mark Domyancich mtdshn_AT_mchsi-dot-com


Why shntool and shorten v3.4 for OS X?

The version of Shorten for Mac Classic and Carbon have some limitations, such as not being able to encode to the seekable version of Shorten and no way to make sure your SHNs are cut on sector boundaries. Also, there is no app on the Mac that can split a large audio file into separate tracks that are cut on sector boundaries. Now you can with the Terminal application in OS X.



1. Your first step is to install the Developer ToolsCD that came with OS X. It's a gray disc with a white X on top. Put it in your computer and double-clickthe Developer.mpkg icon, and follow the installation directions. You will need to login as the administrator by clicking on the padlock icon at the bottom. When you get to the Customize icon,click on it. Install everything except the Developer Documentation and the Developer Examples Software (you can install the Developer Examples Software but it isn't necessary). Once you have done that, go on to the next step. NOTE: if you bought your Mac with OS X installed, let me know if it came withthe Developer Tools CD, as I bought OS X via retail and the disc came with it. It may already be installed too, so please let me know. You can also download this archive from Apple's Developer web site.

2. Next, you'll need to download some Unix files. StuffIt Expander will automatically extract the files within these archives. These files are available at Jason Jordan's site.



3. Move these folders to your Home folder. Terminal goes directly to that folder when you start it up. Keep both the shorten-3.4 folder and the shntool-1.2.0-rc1 folder in your Home folder. Your next step is to edit a file included in the shorten-3.4 folder. Open the include folder and open the binary.h file with TextEdit. If you installed the Developer Examples Software the file will open with Project Builder. No problem. Scroll down until you see include <malloc.h>. Highlight that line and hit delete twice so the whole line is gone. Save the file. Your next step is to open the Terminal application. It is located in your Utilities folder which is in your Applications folder.

4. You don't have to learn too much stuff to use shntool and Shorten v3.4 but if you follow these directions it becomes really easy. Now that the Terminal window is open, type pwd. This is the Unix command that lists where Terminal is currently accessing files that you want to work with. You might need to move some place else if your folders are in a different location other than your Home folder, for instance. To do this, type cd followed by the folder you want to access. cd means "change directory." For instance, if I want to go to my ph00-07-14.shnf, I would type cd ph00-07-14.shnf. To know what files are currently located in the directory or folder, type ls. This lists the files and folders currently in the path, or file hierarchy. When I open terminal, my default location is /local/Users/mark. Typing ls in Terminal will list all the files in my user or Home folder. My name will be replaced with your short user name which can be found in the Users control panel in the System Preferences.

5. Your next step is to tell Terminal to go to the shorten-3.4 folder. Once you have done that, enter into Terminal: ./configure. There is a period (.) before /configure. Don't forget that! However, don't enter a period after configure.

6. Terminal will then spit out a bunch of text. It is cataloging certain aspects of Mac OS X to build shorten appropriately for your system (Thanks to Jason for that last part which I practically copied verbatim from his email). :) You'll see a bunch of "yes"' and "no"'s at the end of some lines so don't worry. Once it has done that, your cursor will be at the end of another prompt.

7. Type make. (no period). Next, type make check (likewise, no period).

8. Type sudo make install and enter your administrator password. This command allows the installer to move the new files to their correct locations. This is only a temporary "administrator" command and once you've entered this command you are switched back to your own login. If you are already logged into your machine as the primary user (administrator), remember to log out by typing exit. If you leave your machine unattended after the installation process and someone sees what you're doing, they might enter in the right command and wipe out your drive. So be careful!

9. Once you're back to the prompt, shorten v3.4 will be installed. Congratulations! Finally type rehash (which will load the new commands into Terminal) and shorten is on your system.

10. Installing shntool is a slightly different process. Change directories (cd) until you reach your shntool-1.2.0-rc1 folder. Typing cd will return Terminal to it's default file path. Type ./configure config.guess, then make, then sudo make install, and rehash.

Your next step is to learn how to use Shorten v3.4 and shntool 1.1.