CsoundAV GUI

by Gabriel Maldonado, January 2000

This document is about using the GUI of CsoundAV (ex-DirectCsound). GUI has been introduced starting from version 4.0 of DirectCsound.
Notice that previous versions of CsoundAV were console-based, whereas present version is a true Win32 program. So something has been changed.

The usage of this version should be easier than previous console-based versions. This document takes it for granted that the reader already knows older versions of DirectCsound. See the main Csound Manual for more information.
Main Csound Manual can be downloaded at the following urls:

http://hem.passagen.se/rasmuse/Csound.htm (WinHelp format, RECOMMENDED);

http://www.lakewoodsound.com/csound (pdf format);

1. Starting CsoundAV

There are several ways to start CsoundAV program:

  1. by double clicking the executable icon or a shortcut;
  2. by dragging a .csd file to the executable icon;
  3. by typing all the command-line arguments directly into the command-line console window and by pressing <return>;
  4. by writing a batch file which contains the command-line arguments;
  5. by associating the CsoundAV executable with the .csd extension under Windows, and by double clicking an icon of a .csd file
  6. by using another program such as VMCI

Since methods 3-4-6 are also possible with older console-based versions of Csound, I treat only the methods 1 and 2 in this document.

1.1 Double clicking the executable icon

This is the standard method of starting most windows programs. However, in older versions, this way of running Csound caused an error; in fact, in order to be correctly run, older versions required additional command-line arguments (at least the orchestra and the score file names).

Now things have changed: by double-clicking the program icon a dialog box will be opened, expecting the user to fill empty text-fields:


Button "Set environment directory paths" permits to modify environment variables (see section 2.7 below).
Notice that not always all fields have to be filled. In realtime sessions "Ouput File" field must be left blank. Using realtime-oriented orchestras with .rto extension, both "Ouput File" and "Sco File" fields can be left blank. Furthermore, when using .csd file, the only field to be filled is "Orc File". This can be obtained very fastly by dragging a .csd file directly towards this dialog box, dropping it and pressing <return>. Also, dragging an .orc file to this window produces the same result. In this last case, however, the user must be sure that the command line flags are those desired.

Notice that file-related text-fields have a "Browse..." button, in order to allow the user to search the complete pathname of the corresponding file by browsing it with a common-dialog-box:


Notice that, if you leave all fields blank, this error message will occur:


indicating that some command-line arguments are needed. However this action doesn't terminate the program, i.e. even after closing this message-box you are still able to operate with CsoundAV, but the program will be in stop state, waiting the user to choose some action in order to start a realtime or deferred-time session.

1.2 Dragging a .csd file

The second way to start CsoundAV is by dragging a .csd file directly to the program icon, or to a shortcut to it.

1.3 Device selection window

When starting CsoundAV in realtime sessions, if provided flags don't specify the AUDIO and/or MIDI port number, new message-boxes can appear, listing currently installed devices and asking the user to select one of them.

For example:


In this case the user has to type the MIDI IN port number and press <Return> (or click the "OK" button). For example, to choose the "SB Live! MIDI In [B800]" port the user must type "0" and press <Return>.

1.4 Quitting CsoundAV

CsundAV can be quitted by clicking the "Quit" button, or the X button on the top right of the Main window. Also a keyboard key can be used for quit it. This is the ESC key for the GUI version, and CTRL-C for the console version.

2. The main window of CsoundAV


The main window of CsoundAV has a set of command buttons allowing several actions:

  1. starting/stopping a Csound session;
  2. opening/closing an audio file for hard-disk recording (without header);
  3. starting/pausing a hard-disk recording of current realtime session;
  4. toggling on/off the Sleep mode;
  5. enabling/disabling Csound console message display;
  6. restarting a session with new command-line arguments;
  7. changing buffer size without stopping a realtime perfomance
  8. setting paths of Csound environment variables
  9. varying the output gain during a Csound session
  10. exiting the program

2.1 Starting/Stopping a Csound session

To stop a Csound session, just click the "Stop" button. Current session will stop and the button label will be changed into "Start". To restart Csound with the same command line arguments, just click this button again.

2.2 Opening/Closing an Audio File for hard-disk recording

Version 4.0 allows to start/pause the hard-disk recording of a realtime session of Csound.

In order to enable recording, user must open a file by filling the corresponding text-field with the name of the file to be created and by clicking the "Open/Close File" check-box (notice that the check-box cannot be checked until the text-field has been filled with the file name).

Then user must start recording by clicking the "Start" button. He can pause recording without stopping realtime session by clicking the "Pause" button. Notice that the "Start" and "Pause" buttons are disabled if the audio file is not already opened (i.e. when the check-box is not checked).

You can close the file without stopping current session of Csound by clicking the "Open/Close File" check-box again.

An audio-file generated by hard-disk recording has no header, even if the extension is .wav or .aif

2.3 Toggling on/off the Sleep mode

The "Sleep" check-box allows to enable/disable the corresponding sleep-mode during a realtime session.

Sleep mode raises the priority of current CsoundAV process, in order to reduce sound-interruptions and tics due to interactions with other programs running in parallel with CsoundAV, such as, for example, VMCI. The drawback of using "Sleep" mode is that the buffer lenght must be at least 300 or more, so latency delay is bigger than normal mode.

You can try to switch on/off this feature (and to raise/lower buffer length) during a session, in order to find the best obtainable performance.

2.4 Enabling/Disabling Csound console message display

By clicking "Suppress Display" button it is possible to suppress console-text-messages of Csound. The label of this button will turn "Enable Display", and, by clicking it again, it is possible to restore console message display.

It is highly recommended to suppress console display during realtime session in order to avoid sound-flow interruptions causing clicks and noise.

2.5 Restarting a session with new command-line arguments

The "Restart with new cmd-line args..." button stops current eventually-running session of Csound and displays the command arguments dialog-box which allows the user to fill text-fields and to run Csound with new arguments.

2.6 Changing buffer size without stopping a realtime perfomance

The horizontal slider near the top of console-area allows to modify buffer length during a realtime session.
This can be used to interactively find the best obtainable buffer length. This feature should be tuned-up together with the "Sleep" check-box to find the optimal configuration for realtime performance of current orchestra .

2.7 Setting paths of Csound environment variables

By pushing the button "Set Environment paths" the following dialog-box will be displayed:


You can set all directory path in corresponding fields. Notice that new environment variables have been added with respect of canonical Csound version. Here is a list of the names of the environment variables and their meaning:

Directories are automatically saved in Windows registry at the end of a session, so user doesn't have to set them all times.

In particular, you have to include OpenGL.h file (provided together with the archives containing executables) in all orchestras using animated graphics. So, such file should be placed in a directory corresponding to INCDIR path.

2.8 Varying output gain during a session

User can vary output gain by tweaking "Overall Output Gain" slider

2.9 Special command-line flags

Realtime operations in CsoundAV need special command-line flags that are not present in canonical Csound version. You don't have to use the flags of the Canonical, but the CsoundAV ones. Read carefully the Special Command Line Flags section, for details