DirectCsound GUI

by Gabriel Maldonado, January 2000
g.maldonado@agora.stm.it

This document treats about using the GUI of DirectCsound. GUI has been introduced starting from version 4.0 of DirectCsound.
Notice that previous versions of DirectCsound 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 versions. This document takes it for granted that the reader already knows older versions of Csound. 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 DirectCsound

There are several ways to start DirectCsound program:

  1. by double clicking the executable icon or a shortcut;
  2. by dragging a .csd file to the executable icon;
  3. by typing the command-line arguments directly into a DOS console window and by pressing <return>;
  4. by writing a batch file which contains the command-line arguments;
  5. by using another program such as VMCI

Since methods 3-4-5 could also be possible with older 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 the empty text-fields:

[Image]

Notice that not always all fields have to be filled. In realtime session "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 case 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:

[Image]

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

[Image]

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 DirectCsound, 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 DirectCsound is by dragging a .csd file directly to the program icon, or to a shortcut to it.

Notice that, in realtime sessions, if the flags don't specify the audio and midi port number, new message boxes can appear, listing currently installed devices and asking the user to select one of them.

For example:

[Image]

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

2. The main window of DirectCsound

[Image]

The main window of DirectCsound 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. 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 DirectCsound process, in order to reduce sound-interruptions and tics due to interactions with other programs running in parallel with DirectCsound, 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 .