How to use "TAB" on a Mac

For true Mac users

This page is for people who have always used a mac, and who felt really uncomfortable going from Mac OS 9 to Mac OS X. This assumes you have never used terminal, nor have you ever used a PC in DOS mode, or used Unix, Linux, VAX-VMX, or any of those other old fashioned computers that you have to type to use, that don't have a mouse. I will also assume that you are an expert with copy and paste, apple-c and apple-v, and other mac like things. There are probably some neat shortcuts that I don't know about, if you know any please tell me!

This page assumes that you are running OSX 10.3, though most of what I have to say here hasn't changed since OSX 10. The Folder names on your computer will be different from mine!

  1. Tab runs in Terminal, which is the Mac entry to its Unix underbelly. You start Terminial by clicking the "Go" tab when Finder is active. You then choose the "Utilities" menu entry, or on an older version of OSX you choosse "Applications" and find "Utilities" there. Once you are in "Utilities" you can find "Terminal" and click it to open a terminal window. There you are! You can drag the Terminal icon to the Dock so that it is easier to find next time.

  2. The first universal rule to Terminal is that you always hit the "Return" after typing in what you have to type. Now, if you have a PC keyboard you will be confused because there are two "Enter" keys, but the Mac has a "Return" key three keys to the right of the "L" key. Typing the "Return" key tells the computer that you are done and it's turn has started.
  3. First, type gcc (remember the implied "Return" afterwards!) If the computer replies gcc: no input files you are all set. If not, and the computer responds with -bash: gcc: command not found you will have to go to the Apple web site, find the developer section, and download and install the "Developer Tools" package. Since I always install "Developer Tools" from the CD. I can't tell you exactly the steps to do this. gcc is a compiler, it takes the source code that you will download real soon and compiles it into a program that you can run. Read more about getting GCC

  4. Next, you have to get the source for TAB. In your web browser (Safari) go to ftp://ftp.cs.dartmouth.edu/pub/lute and scroll down to the lute_tab icon with the biggest last number. As I write this that would be lute_tab4.3.18.tar.gz, but the number will increment as I make changes and fixes. Double click this icon. You will get a warning "Are you sure you want to open this?", and you click continue. In a while you should see a popup asking you to select a Folder, a "destination for expansion". Click "Desktop" and then "Choose" You can put it somewhere else if you like. You should end up with a lute-tab.4.3.18 folder on your desktop (or wherever else you put it.)

  5. Now, back to the Terminal window. The Terminal window usually starts off in your "home directory" - Unix speak for Folder. to get to your Desktop folder you type "cd Desktop" (and Return). The "ls" command will show you all the folders and files that you see on your desktop. (ls is short for "list".) Now go to the new folder, "cd lute-tab.4.3.18" At the same time you should click the icon of the lute-tab.4.3.18 folder on the desktop to open it.

  6. Now you need to customise the installation. In the open lute-tab.4.3.18 folder scroll down to find Makefile, and click to open it with TextEdit. In your Terminal window type "pwd" (Stands for "Present Working Directory" which should make the computer tell you something like /Users/wbc/Desktop/lute_tab4.3.18. Copy that line with your mouse. Scroll down in the TextEdit window till you find some lines that say
    # use this line if the fonts are in working directory
    #
    TLOC='"."'
    #
    # use this line if the fonts are in the TeX library
    # or your personal library.
    #
    # TLOC = '"/net/tahoe4/wbc/src/nnt"'
    # TLOC = '"/net/wbc/src/nnt"'
    # TLOC = '"/usr/aeolus1/wbc/src/nnt"'
    # TLOC = '"/home/wbc/nnt"'
    # TLOC = '"/Users/wbc/nnt"'
    
    and enter a line below then that says something like
    TLOC = '"/Users/wbc/Desktop/lute_tab4.3.18"'
    
    note the single ' and double " quotes very carefully!! The line that you got from "pwd" is wrapped in double quotes and the the whole thing is wrapped in single quotes. Save the file and quit TextEdit. You can put this off till later if it really confuses you. This exercise tells the TAB program were to look for its font files, and if you don't do it you will always have to run TAB in this dierctory. If you mess this up when you run tab you will et an error File In: Can't open /Users/wbc/Desktop/lute_tab//lute9.tfm
  7. Now, to build TAB, in Terminal window, you type "make" You will see a lot of stuff print out.
    g++ -g -DTFM_PATH='"/Users/wbc/nnt"' -UX_WIN    -c -o args.o args.cc
    g++ -g -DTFM_PATH='"/Users/wbc/nnt"' -UX_WIN    -c -o buffer.o buffer.cc
    g++ -g -DTFM_PATH='"/Users/wbc/nnt"' -UX_WIN    -c -o dbg.o dbg.cc
    
    ending with something like
    gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
     ld -arch ppc -dynamic -o tab -lcrt1.o -lcrt2.o -L/usr/lib/gcc/darwin/3.3
     -L/usr/lib/gcc/darwin -L/usr/libexec/gcc/darwin/ppc/3.3/../../.. args.o 
    buffer.o dbg.o draw.o dvi.o dvi_f.o dviprint.o file_in.o get_t.o getsys.o 
    i_buf.o incl.o main.o map.o notes.o pass1.o pass2.o pk_font.o pk_in.o print.o 
    ps_print.o score.o sizes.o tab_p.o tfm.o title.o tree.o uline.o sound.o beam.o 
    raw_snd.o midi_snd.o pdf_print.o ascii.o -lstdc++ -lm -lgcc -lSystem |
     c++filt3
    
    If you get errors (hint - look for the word Error cut and paste them into a mail message to me.

  8. If you got this far, in the lute_tab window you should see, near the bottom, a black icon labeled tab. It is possible to click this icon, but it won't do you much good. Instead, you go to the Terminal window and say:
    ./tab sample
    
    and the computer will reply with
    setting filename to sample.tab
    tab 4.3.18 copyright 1995-2003 by Wayne Cripps
    Wayne-Cripps-Computer:~/Desktop/lute_tab4.3.18 wbc$
    
    where the third line will have the name of your computer, not mine. The Finder window of lute_tab4.3.18 will now have a file labeled "out.ps" which you can open if you are running OSX 10.3. This will show you a few sample pages of TAB output! The sample is old, and some stuff on the second page will look very strange.

    If you have an older version of OSX you will have to either get a program like macghostview that displays postscript, or install ghostview using fink. Ghostview can convert PostScript to PDF. MacGhostView is easy to install, it is shareware, but ghostview is a bigger effort.

  9. Now you can try to write your own tablature. Open TextEdit again and type some tab code
    b
    2 cdc
    b
    e
    
    and save as "test.tab" in the "Where" of Desktop lute-tab4.3.18 in plain text encoding. Don't save with a .txt.extension! Run tab again specifying the new file by saying "./tab test.tab" and you should be able to open the out.ps file again in the finder window.

Well this should do it for now! I would like to hear of your problems so that I can improve this page.

Wayne, July 19 2004


Advanced Stuff

There have been 350 visitors since July 20, 2004