The csound.ppc homepage
 |
What is csound.ppc
|
 |
- Csound.ppc is a version of Csound designed specifically for Power Macintoshes.
It is presently being developed at Mills College by Matt Ingalls, Dave
Madole, and Mike Berry. The lineage includes Dan Ellis, Bill Gardner, and
Eric Dahl. For information on Csound in general, visit the Csound
Homepage.
- Csound.ppc is a collection of applications that run Csound. The primary
application is called csound.ppc (known by us as "the front end").
The front end lets you choose your orchestra and score files, set all of
the csound options, and start generating your sound. The actual generation
occurs in perf.ppc ("the perfer"), which contains all of the
canonical unix code.
- We have several helper apps also included in the csound.ppc package.
csRef is an online reference which gives the opcode definitions for all
of the opcodes included in csound.ppc. The Csound Manual is included in
an online format, created by DOCMaker, which can be indexed directly from
csRef.
- We are committed to continuing to support and upgrade the csound.ppc
package. We are averaging a new release every three months.
How to report bugs or request features
- We may be reached collectively at csound-dev@eartha.mills.edu.
How to download csound.ppc
These are the different packages that can be downloaded:
- csound.ppc
complete This is the complete csound.ppc package, including csound,
perf, csRef, the online Csound Manual, and some supporting documentation.
It does not include a text version of the manual.
- MS
Word manuals This package includes MS Word versions of the Csound manual,
several opcode addendums, and the csound.ppc manual. All of the info in
this package is included in the online manual.
- Mr. Tweaky
This is an applet which allows you to edit in ascii form any of the analysis
files generated by Csound, and then re-encode them for use in csound.
The csound.ppc specific manual
- Csound for Power Macintosh consists of two separate applications:
csound and perf
- csound is the "front end" application, in which you can choose
files, settings, and options(flags) through a graphic interface. perf,
which is launched from the front end, generates sound, lets you hear it,
and displays graphical and text data. These two applications function as
one program, sending messages to each other through apple events.
Memory Requirements:
- csound usually requires less than 256k to function. perf.ppc can run
with less than 1M allotted, but will probably require more, depending on
the project you are running. If memory errors are being displayed in perf's
output window, try increasing the amount of memory allocated for perf by
clicking on the perf icon from the desktop then choosing Get Info from
the File menu.
STARTING CSOUND
- You can launch csound from the finder by double-clicking on the csound
or perf icon, by double-clicking on a project file icon, or by dragging
an orchestra (*.orc), score (*.sco) , MIDI (*.mf), batch (*.bat) and/or
project file - "dropping" it into the csound icon. The drag&drop
method will cause csound to open with the chosen file(s).
THE MAIN WINDOW
- This is the primary window that is opened when csound is launched.
It can also be opened by choosing New Project... from the File menu.
- Orchestra, Score, MIDI, Listing, and Batch files are chosen by clicking
on the corresponding Select... button. The MIDI file check box, when enabled,
signifies that data is to be read from the selected MIDI file. The Listing
file check box, when enabled, will redirect the text messages of generation
to the specified text file. The Batch file check box and the Add Current
Settings button deal with batch processing(see below). To view a file in
your chosen text editor, double-click on the window displaying the file's
name.
- The Output file is the name of the sound file to be generated, and
can be typed in the window. The Default Directories... button opens the
Default Directories dialog box (see below).
- The real-time Audio out check box sends the generated samples to the
Sound Manager for playing rather than to a file. Performance of this option
may be optimized for your particular system by tweaking the buffer sizes
in the Preferences menu (see below). Real-time MIDI in is enabled with
the appropriate check box (see the 'MIDI' section of this manual for details).
- The Format and Header pop-up menus allow you to select the proper format
of your sound file. The 32-bit float->16-bit int option in the Format
menu will cause perf to automatically generate 32-bit sound file, rescaling
to 16-bit shorts with a peak amplitude of 32767.
- The Generate button forms a UNIX-style command line from the current
settings and files, then launches the perf application.
DEFAULT DIRECTORIES
- This dialog box is opened from the File menu or from corresponding
buttons in other windows. Use it to set your Sound File Directory (SFDIR
- the folder where the sound will be written), Sound Sample Directory (SSDIR
- the folder where soundin samples will be contained), and Analysis Directory
(SADIR - the folder where Utility analysis files will be contained). If
a directory is not defined, perf will substitute SFDIR. If SFDIR is not
defined, perf will look/write in the folder in which it is contained.
PERF
- perf is the application that is launched by csound to do the actual
generation of sound. It consists of a graphics window that displays function
tables, an output window that displays UNIX-style text messages, and a
transport to start/pause/kill the generation as well as to play/pause the
generated sound. You can quit perf by clicking the transport's close button.
GRAPHICS
- The graphics window displays a given number of tables (specified in
the Set Buffers... dialog box opened in csound's Preferences menu) and
scroll through them. These can be viewed either "solid"/"line"
(-F) and with/without (-G) grid lines.
- You can choose three different sizes for the graphics window: 128x64,
256x128, or 512x256 pixels. To switch among the sizes, drag the grow box
corner of the window. When you let up the mouse button, the graphics window
will snap to the closest available size. Minimal information about the
table is printed across the bottom of the larger windows, whereas only
the ftable name is displayed in the smallest window. Scrolling among the
tables is circular. Holding the mouse button down on either the up or down
arrow of the scroll bar will "wraparound page" through the tables.
Hitting the Go Away box will make the window go away, but it will come
back if perf generates another table.
- The graphics window uses memory of about 600 bytes per table.
TRANSPORT
- A transport mechanism is provided to pause perf's generation routine
and allow you to hear what has been generated so far, for either floating
point or 16 bit integer sound format. You also may at any time kill the
generation.
Transport During Generation:
- While perf is generating sound, the pause and kill buttons are available.
- The pause button will pause the generation and allow you to play the
generated file (so far) by presenting a play/stop button. If you choose
play (the "arrow"), floating point files will be automatically
rescaled to a maximum short value of 32767 for playing (note, however,
that the file itself will not be changed). You may stop playing at any
time by clicking on the stop button (the "square"). After playing,
the transport will return to the pause state. The play button is disabled
during real-time generation.
- To resume generation and move from the pause state, click on the transport's
cont button.
- If you choose kill while either generating or in pause, the generation
will be immediately terminated. Remember, however, if you kill a generation,
information in the sound file header will not be correct unless the Continually
Rewrite Header option in csound's Options menu had been selected.
Rescaling:
- If you had chosen the 32-bit float->16-bit int format option in
the front end before generation, perf will permanently rescale the generated
32-bit sound file to 16-bit shorts with a peak amplitude of 32767. It is
possible to kill during rescaling, making the partially rescaled sound
file unusable.
Transport After Generation:
- When the generation has either completed or has been killed, perf is
allowed to close the output file. It is then reopened for reading so that
the user may play it and review it. Again, floats are automatically rescaled.
Clicking on the close button will automatically terminate the perf application,
leaving the file unmolested.
PROJECTS
- Projects are small files that save all settings, options, directories,
and file names. Saving and opening project files are done from the File
menu. Presently, you can only have one project open at a time.
- When the icon of a project file is double-clicked in the finder, csound
will launch with the project's settings, options, directories, and files.
If the Direct Generation option is enabled, then csound will attempt to
launch perf with the project's files and options.
- The current settings, options, and directories are automatically saved
(without having to generate a project file) when quitting csound.
- You can reset all settings, options, and directories to their defaults
by selecting Reset All Options/Settings in the Preferences menu.
BATCH FILES
- Batch Files contain lists of command lines to be generated in sequence.
You can select a batch file by clicking on the appropriate Select... button
in the Main Window. To run the batch file, first click on the Batch file
check box in the Main Window. When this check box is enabled, the Generate
button will change to "Batch". Then click on the "Batch"
generate button. perf will then sequentially run every command line in
your batch file.
- To add command lines to your batch file, click on the Add Current Settings
button in the Main Window or the Add Settings to Batch File button in the
various Utility windows. This will open the currently select batch file,
and add a command line to the end.
OPTIONS
- This menu allows you to set options for before, during, and after generation.
A check mark next to an item means that option is enabled.
- These 17 options correspond directly to the UNIX csound flags. See
the 1993 Csound Manual for more details. Some options, when selected, will
display a dialog box requesting more information.
PREFERENCES
- This menu allows you to set the "mac only" options.
Play Sound File When Done
- This option will make perf automatically play the sound file after
generation. It is disabled with real-time audio output.
Direct Generation
- Direct Generation will cause csound to launch perf immediately upon
startup. To use Direct Generation, enable the option in the Preferences
menu, then quit csound. From the finder, either double-click a saved project
file (with the Direct Generation option enabled) or drag an orchestra and
score into the csound icon. csound will then be launched, which will in
turn begin perf with the selected files.
Post Processor
- You can select an application to be launched with your sound file after
generation. Ideally, this would be a sound player, sound editor, or effects
processor, but it can be any application. To enable the post processor
option, choose the Output to Post Processor... dialog box in the Preferences
menu. A dialog box will then appear allowing you to select an application.
The OK - Open Now button will launch the specified application immediately.
- If real time Audio out is selected, launching of the post processor
will be disabled.
Text Editor
- You can specify a text editor to view and edit your project's files.
To choose a text editor, select Auto Open Files in Text Editor in the Preferences
menu. A dialog box will then appear allowing you to select an application.
The OK - Open Now button will launch the specified application immediately
with the current orchestra and score.
- If Auto Open Files in Text Editor is enabled (a check mark next to
this item in the menu), any file you select will be opened automatically
in the text editor. You can also open a file in the text editor by double-clicking
on the file name in the Main Window.
- If Auto Open Files in Text Editor was enabled the last time csound
was quit, the text editor will be launched immediately upon startup. If
Direct Generation is enabled, launching of the text editor at startup will
be disabled.
Buffers
- You can specify buffer sizes in the dialog box opened from Set Buffers
in the Preferences menu. The Blocksize is the number of sample frames per
software sound buffer, which is the number of samples that perf generates
before dumping to the output location, either the Macintosh Sound Manager
(for real-time generation) or a disk. The Audio Output Buffer is the maximum
number of samples in the Sound Manager's real-time playback buffer. This
is an upper limit. For efficiency, perf will automatically use smaller
buffers if it can.
- The following formula will tell you the maximum lag time in real-time
playback:
- maximum lag (milliseconds) = (Blocksize * nchnls + Audio Output Buffer)
* 1000 / sr
- For the shortest lag possible, you will have to experiment with your
particular machine. To limit the possibility of dropouts, set Blocksize
to 16384 in mono or 8192 in stereo. (Blocksize * nchnls) should never be
more than half of Audio Output Buffer.
- Since you most likely will want small buffers for real-time playback
and large buffers when writing to a sound file, csound lets you set your
preference for both types. Toggle between the two settings with the pop-up
menu in the upper left corner of the Set Buffers dialog box. Both settings
will be remembered and used appropriately depending on your mode of generation.
- The output window can only print at a certain speed, and may sometimes
slow things down, such as when you use the verbose option or have a score
with many events over a short period of time. The Screen Buffer can be
set to avoid this problem. Usually, you want the buffer set to the default
value (50 characters), but when you are getting continuous printing to
the output window you should increase this size.
- In this dialog box, you can also specify the maximum number of graphs
perf's graphics window can save.
- The Revert to Defaults button will set the Blocksize and Audio Output
Buffer to 8192 for file creation, 256 for real-time generation. It will
also set the Screen Buffer and the maximum tables in the Graphics Wind