B104 concert machine


CONTENTS
  1. Introduction
  2. UNIX basics
  3. B104 Audio setup

Intro

This page contains directions for getting around the B104 concert machine and its UNIX operating system. This version is tailored for the MUSIC 250 course, winter 2000.

When it's not at a concert, the "concert machine" lives in a closet with its screen, keyboard and mouse. You can log onto it from any of the SGI machines in B104. When you run programs on the concert machine their "windows" appear on the SGI machine you're typing at.

(When the concert machine is in the recital hall you have to use the concert machine's own mouse, keyboard and screen. At some point we hope to buy nice long cable extenders so that the noisy CPU needn't be right next to the screen. We haven't worked out audio and MIDI connections for concerts yet either.)

To get started you will need a concert machine account (get this from Miller or Shahrokh) as well as a standard ACS account for music graduate students. You need the ACS account to get onto the SGI machines.

The cusomary way to use UNIX is through "shells", which appear in windows. You can make a shell window on an SGI machine by selecting the "New Unix Shell" item from the menu at top left. Hit the space bar until all the ACS verbiage scrolls past and you see a prompt like "man104-8$ ". This indicates that UNIX is waiting for you to type a command to it.

On the SGI machines, keyboard input goes not to the top window but to whichever window the cursor is above. This is confusing to Macintosh and Microsoft users. You can't just click anywhere on a window to pop it to the top either; you have to click on the window border to do that.

For the purposes of this document, all you use the SGI machine for is to log onto the concert machine. This you do by typing

    ssh machine-name
where the machine-name is the name of the concert machine.

Note the font style conventions in the example above:

machine-name: anything in italics stands for something you type in.
ssh: anything in this style is what you type in exactly.

You can log into the concert machine under a different username from the one you're using on the SGI:

    ssh machine-name -l new-user-name

When you're through with your UNIX shell you can type

    exit
or sometimes a simple control-D. To log off the SGI machine you find the "log off" menu item. It's a good idea to remember to log off when you're ready to leave.

UNIX BASICS

This section describes what you should do once you're sitting at an SGI workstation and have one or more "shells" open on the concert machine.

When you issue a command to a UNIX shell, it usually responds by trying to find a program by that name and run it. Some programs are GUI-based, but the majority just do what you ask and then quit. This makes it easy to automate things, but on the other hand you have to learn what things do up front; there are no cute dialogs to lead you through operations like moving files around.

The UNIX filesystem is arranged as a hierarchy of "directories". Your shell is always in some directory or other, called the "current working directory". When you type out a "simple" filename it is assumed to be in the current directory. You can specify other directories besides the current one using slashes; so if you're in /home/fred for example (this means the subdirectory "fred" of the toplevel directory "home") you can type "tickle/salty" to refer to a file "salty" in the subdirectory "tickle". The "absolute" (full) pathname to the same file would be "/home/fred/tickle/salty". A filename starting with a slash is taken to be absolute; filenames starting with any other character are relative to the current Working Directory.

Here is a short (and incomplete) list of commands you will soon need. Some of these are generic UNIX commands but others (e.g., nc, pd, esctl) are specific to the concert machine.

  1. files and directories
    1. pwd - print the working directory
    2. cd - change the working directory
    3. ls - list files
    4. cp - copy files
    5. rm - remove files
    6. mv - move files or directories
    7. mkdir, rmdir - make or remove directories
    8. cp -r - copying entire directories
    9. chmod - change access permissions
    10. man - read the Unix manual
    11. nc - edit text files
  2. audio commands
    1. aumix, esctl - set up audio
    2. pd - computer music program
    3. record, play - record or play soundfiles
    4. sox - convert soundfile formats
    5. mxv - sound editor
  3. tips
    1. alias - shorthand for long commands
    2. history - seeing what you've done already

Files and Directories

Back to top.

Print working directory

To find out in which directory you managed to end up, type:

    pwd

to "print your working directory."

WHen you start a new shell, you will find yourself in your home directory, such as /home/bosco.

Changing directories

The cd command stands for "change directory." You can move to the class directory or your home directory with this command.

Change to another directory

  1. Type the following command where directory_name stands for the directory to which you want to go.
  2. cd directory_name

Change to your home directory

Note that the ~ has magic powers. Alone, it stands for your home directory. When it precedes a user name, it means that person's home directory.
  1. Type:

  2. cd

    OR

    cd ~

You won't see anything happen.

Change to someone else's home directory

  1. Type the following, where username stands for the other person's home directory (e.g. khagan):
  2. cd ~username

Listing the contents of a directory

Next to pwd, ls ("list") is the most useful command for determining where you are. You may either list your current directory by not providing an argument, or you may list another directory by providing its pathname.

  1. To list the current working directory, type:

  2. ls

  3. To list another directory, type:

  4. ls pathname

Copying files

To copy a file, type:
    cp existing_file new_copy

If you specify two simple filenames (without slashes) the cp program works within the current directory. You may specify pathnames for either the source and/or the destination file. If the destination is an existing directory, the new file has the same name as the old one:

  1. Copying a file from someone else's home directory to the current directory:

  2. cp ~username/old-filename new-filename

  3. Copying a pd help file to the current directory:

  4. cp /usr/local/pd/doc/3.audio.examples/17.sampler.loop.pd .

  5. Alternatively:

  6. cd /usr/local/pd/doc/3.audio.examples

    cp 17.sampler.loop.pd ~

Removing files

To remove a file, type:

    rm filename

The filename can be a simple (slashless) filename or a pathname.

Moving files or directories

The syntax for moving files is the same as for copying them:

    mv old-filename new-filename

To move many files at once:
    mv filename1 filename2... destination-directory

Making directories

The mkdir command stands for "make directory." The command creates a directory in the current working directory unless you specify a pathname to another directory.
  1. Change to the directory in which you wish to create a directory.
  2. Type:

  3. mkdir directory_name

You won't see any changes. If you know the pathname to a directory, you can skip the step where you change to the directory in which you wish to create the new directory. Then you may simply type:

    mkdir pathname/directory_name

Copying directories

The cp command stands for "copy." This command may be used for directories or files (see Copying Files below). cp will copy the given file to the current working directory or a specified directory. Since a directory often has contents, you must specify that the command must work recursively. Therefore, the option -r causes cp to copy the contents within the target directory as well.

Type:

    cp -r pathname/target_directory_name pathname_to_destination

It is important to note that one may copy a directory and change the name of the copy by specifying a name for the destination directory withing the command. For example,

    cp -r ~/my_original_directory ~/destination/my_copy

will copy the my_original_directory, which lives in my home directory, to the directory named "destination." However, it will rename it to "my_copy."

Changing access permissions

Sometimes you won't be able to read your friends' files because your account won't have the necessary permission. Ask your friend to make the relevant files "public readable". Also you will need read and "execute" permission to the directories you need to search through to get the files in question. To make a file readable by anyone (but to allow only the owner to modify it, type

    chmod 644 filename1 filename2...

    chmod 755 directory1 directory2...

You can verify the settings using ls -l which gives you a readout as in:
-rw-r--r--   1 msp      msp          5156 Jan 24  1999 1.ring-mod.pd
-rw-r--r--   1 msp      msp          5474 Jan 24  1999 2.bandpass.pd
-rw-r--r--   1 msp      msp         12805 Jan 25  1999 3.phase.vocoder.pd
-rw-r--r--   1 msp      msp           617 Jan 24  1999 README.txt

THe "-rw-r--r-" should have 3 "r"s in it if the file is public readable.

to list the current directory itself (not its contents), type ls -l -d . For a directory you should get "rwxr-xr-x".

Reading the UNIX manual

Editing text files

Audio Commands

Back to top.

Starting Pd

  1. In the winterm or console, type:
  2. /usr/local/pd/bin/pd

Tips

Back to top.

Making a convenient command for Pd

The following process must be followed exactly as described. If you are not working in the UCSD environment, and you do not understand shell startup files, then you should not mess with this.
  1. Open the file named .tcshrc in your home directory with your favorite text editor.
  2. After the last line of text, type the following command:
  3. alias pd '/usr/local/pd/bin/pd'

    Don't forget to type a carriage return after this line. (i.e., hit "Enter" after you typed the line.)

  4. Save the changes.
  5. To your shell, type the following command in order for your changes to take effect:

    source ~/.tcshrc

  6. Now, you can simply type pd in your winterm or console to start Pd.
  7. These changes will automatically be loaded the next time you log in.

THE B104 CONCERT MACHINE AUDIO SETUP

The concert machine currently has a PCI128 audio card which supports stereo audio input (mic or line level) and quadraphonic output. There are rumors that the stereo input bleeds into two of the outputs although I haven't yet noticed this. THe PCI128 has no digital audio output or input. So if you're doing any audio recording you should do it on the SGIs and use "ftp" to transfer files to and from the concert machine.

The audio outputs appear as line inputs 1 through 4 on the B104 mixer. If you're running quad the order is 3, 4, 1, 2. The usual practice for listening to quad output is to assign channels 1, 2, 3, 4 to groups 7, 8, 5, 6, respectively, and patch them to the front and rear power amplifiers using 4 patch cords.

To get line level audio signals to the concert machine from the mixer, assign the desired signal (e.g., the microphone on channel 16) to group outs 1 and 2, and patch them to "CPU 1 audio inputs" 1 and 2.

cabling the concert machine

This section describes how the concert machine is currently cabled. The following instructions are for the PCI128 audio card I installed 12/24/99.

There is a cable harness that leads to 10 1/4 inch jacks at the top of the concert machine rack. Two are for digital in and out. The middle group of 4 is outputs and the outer group of 4 is inputs. The 4 inputs have balancing transformers.

On the other end are 4 1/4 inch stereo plugs. The two grey ones are for the sound card's outputs (one dot is front stereo pair; 2 dots is rear stereo pair.)

Line input to the card is the black stereo plug with the 2 dots. (The single-dot one furnishes 2 more inputs but the sound card has only 1 line level input.)

The audio inputs and outputs on the PCI128 aren't clearly labelled and various documents give them inconsistent names. On my card there are 4 stereo mini jacks and a joystick port, in this order:

joystick    black            green       red       blue
            bidirectional    line-out    mic-in    line-in

audio settings on the concert machine

To make the card do quad you have to run the "esctl" program. You should see something like this:

[concert@man104-3 ~/demo]$ esctl
quad       0
preamp     1
5v bias    0
monitor    16448
[concert@man104-3 ~/demo]$ esctl q -m
quad       1
preamp     1
5v bias    0
monitor    0
(here I ran the program, found "quad" off and "monitor" on, and fixed them in a second invocation.)

The really tricky thing about quad is that the regular "stereo" outputs move to the black jack and the new "back" channels appear on the regular line output (green.) What's more, the back channels are normally mixed into the front ones (or is it vice versa?) so you'll have to play blind man's bluff with aumix for an hour or so to get the four channels to emerge separately. For me the mixer settings were:

aumix  ++++++++++++++++++++++++++++++O+++ Vol      ++++++++++++O+++++++++++++
      P++++++++++++++++++++++++++++++O+++ Synth    ++++++++++++O+++++++++++++
Quit  PO+++++++++++++++++++++++++++++++++ Pcm      ++++++++++++O+++++++++++++
Load  R+++++++++++++++++++O++++++++++++++ Line     ++++++++++++O+++++++++++++
Save  PO+++++++++++++++++++++++++++++++++ Mic      
Keys  PO+++++++++++++++++++++++++++++++++ CD       ++++++++++++O+++++++++++++
Mute   O+++++++++++++++++++++++++++++++++ Mix      
       O+++++++++++++++++++++++++++++++++ OGain    
      PO+++++++++++++++++++++++++++++++++ Line1    ++++++++++++O+++++++++++++
      PO+++++++++++++++++++++++++++++++++ Line2    
      PO+++++++++++++++++++++++++++++++++ Line3    
       0             Level            100          L         Balance        R

Here the "R" at left of the "line" control means that the line input has been selected for recording; the "o" indicates that the input level is medium. If you want to use the microphone input, you will have to bring "mic" up, "line" down, and select "mic" as the "recording channel."

MIDI

Midi is now working in B104!

The piano has to be put in "real time MIDI mode"... after powering the piano up, hit "midi" and then hit the RECORD button until you see that MIDI out is "kbd" and not "DELAYOUT."


Acknowledgement: the UNIX lore here is adapted from Kerry Hagan's UNIX page.