CsoundAV FAQ

by Gabriel Maldonado

Q: I've just downloaded CsoundAV. But when trying to run it, it complained with an error message that 'dsound.dll' or 'GLUT32.dll' was missing.
A: It is normal, if you are not using Windows 2000 or you have not already installed DirectX 7 or later. You have to install DirectX. Make a web search to find location of latest version. The same for glut32.dll file or any dll that is not found by the operating system (GLUT is not part of DirectX, but can be get from the web too).

Q: What is the difference between CsoundAV and previous versions of DirectCsound?
A: Mainly, there are the following differences:
  1. CsoundAV is a superset of DirectCsound. All DirectCsound features and opcode are present in CsoundAV too. The main difference is that CsoundAV supports OpenGL graphics,
  2. CsoundAV an access video files in AVI format, and supports realtime camera cature (under Win98 only and alpha stage, for now).
  3. It supports RGB image processing.
  4. It supports widgets and valuators, slider bank etc.
  5. There are also many other differences, see the documentation for more information.

What is the difference between console version and GUI version of CsoundAV

  1. There are two types of executable, the console version and the GUI version. GUI version is more user friendly, whereas console version is more suited for batch processing. However both versions support all opcode set, including Graphics and Widgets opcodes.
  2. In GUI version, display and hard-disk recording can be suppressed/activated during the performances
  3. In GUI version audio buffer length can be modified during a realtime performance.
  4. In GUI version command line arguments can be typed directly in the corresponding dialog box when the executable is run without arguments;
  5. Performance sessions can be terminated and restarted without exiting from the main program.

Q: What computer do I need to run CsoundAV in realtime?
A: It depends on how much synthesis power do you need. If you are using deferred-time only, you can use ANY computer. Regarding real-time, if you only use audio, you need at least a Pentium 133 MHz (which can handle up to 50 oscillators in real-time at 44100 Hz). A Pentium II 400 can give you more than 200 oscillators at 44100 Hz. However actual polyphony depends by several factors such as sampling rate, computer motherboard, RAM type, cache memory size and the buffer size you set in the command line call (flag -b).

If you are using animated Graphics, I recommend at least a Pentium II 500 with a 3D accelerated video card supporting OpenGL in hardware. Notice that, up to the recent past, OpenGL was supported only by a little group of professional 3D accelerated video cards. At present time, however, it seems that OpenGL is supported by almost all new consumer video cards (but you have to be informed about it before buying the video card). However, a good (and expensive) video card is higly recommended to achieve interesting results at a decent frame rate. At present time (January 2002) probably nVidia cards are the best solution (a geForce ||| with 64 MB of video RAM would be very good, even if a professional card can provide acceleration of a more complete set of OpenGL API). However I can obtain nice results even with my cheap laptop mounting a chip S3 Savage/IX with only 8 MB of video RAM.

If you are using both animated graphics and realtime sound synthesis, even the computer speed could make sensible difference. At present time (January 2002) the optimal solution would be a 2GHz Pentium4. I've never tried Athlon processors, so I can't express judjement.

For realtime audio, also the type of audio card can increase the performance. Unfortunately, it seems that professional audio cards don't allow the minimum latency with CsoundAV, because of the limited support of DirectX, so I suggest to use a cheap SBlive! (BtW: I haven't tried SBlive Audigy yet, but the specs suggest to have a better audio quality than normal SBlive!). When ASIO support will be implemented, probably professional audio cards will give the best.

However a user feedback about this topic is encouraged...

Q: Can I render graphics output of CsoundAV to an AVI file in deferred time?
A: At present time it is not possible. I hope to implement it in the (near) future.

Q: What about the buffer size: what is the best value I have to set?
A: It depends mainly by five factors:

1. Computer speed
2. Sampling Rate of the orchestra
3. If you are using the DirectX drivers or the old MME drivers
4. The type of the soundcard
5. If a very fast response is needed in your realtime performance.

The trivial rule is: the smallest buffer size it is possible. The problem is that polyphony decreases and the risk of processing underrun increases when buffer size decreases.

A fast computer should allow you to reduce the buffer size, but it is not so intuitive, because in some cases this rule is not followed. For example I have two computer, a slow Pentium 133 and a fast Pentium II 400. So, using DirectX (-+X flag), the minimum buffer size (flag -b) I can set with my P-133 is 100 samples, whereas I have to rise this size up to 200 samples when using my faster P-II 400 with DirectX. I don’t know what is the cause, maybe it resides in the mainboard interrupt configuration of that computer or probably in the video card bus (I have a PCI video card, AGP cards should work better). I tried to play CsoundAV with another Pentium II 233 computer and I have been able to reduce the buffer length down to 50 samples. A person told me that with his Pentium II 400 he can reduce the buffer size down to -b = 16 (practically no  delay!!!).

When you are using the old MME (Multi Media Extension) drivers, the buffer should be set at least 4 times bigger than when using DirectX, in the best case. Notice that, differently than when you are using DirectX, you have to set two values: the number of buffers (flag -+p) and the size of buffers (flag -b). These two values depend also by the type of soundcard you use. I noticed that with some rounded sr values such as 40000, the MME buffer can be reduced a lot. When using sr=44100 I have to set the buffer size to about 3000 and the buffer numbers to 8, giving a medium latency time greater than half a second.

I highly recommend to use DirectX for best performance (-+X flag). If your card driver doesn't allow to access hardware buffer directly, try with -+S flag (instead of -+X flag).

Be aware that CsoundAV does not operate with DirectX in emulation mode, so you need a soundcard certified by Microsoft in order to use DirectX.

Q: Why some new opcodes which are implemented in standard version are not present in CsoundAV?
A: Mainly because synchronizing CsoundAV with standard version requires a lot of time. So, I prefer to wait a major release of standard Csound before doing that.

Q: Will a fusion of both standard executuable and CsoundAV be available in the future?
A: I hope so. Until now each of these versions has its own features. The problem is that John Fitch, the administrator of standard version, moves Csound towards objectives different from those of mine. My main objective and need is to use Csound with realtime controllers (by means of MIDI or other more advanced devices) together with animated Graphics. So my efforts are mainly directed toward transforming Csound into a fast, powerful, interactive and easily controllable performance tool. Part of my code is device dependent, so porting it in other platforms it is not a trivial job. Actually, the efforts of John Fitch are mainly directed towards compatibility in different platform.

Q: Does it exist a version of CsoundAV for Linux? Does it exist a version for MAC?
CsoundAV will probably be ported to Linux soon. A version for MAC OS-X is possible, when OpenGL will be supported by this OS.

Q: What are the main features of CsoundAV in comparison with standard version of Csound?
A: There are two kind of features, operating-system-related features, or ‘core features’, and new opcodes.

The core features are:

  • DirectX low-latency realtime audio support for input and output.
  • Real-time animated Graphics support
  • Widget supports
  • Real-time audio input and output in parallel.
  • Hard-disk recording of a realtime session of Csound
  • Support of more file output in parallel in multichannel format, when using it in deferred time (opcode fout).

Maybe that some of these features may be implemented also in standard version at present time or in the future.

Q: Is DirectX audio input supported by CsoundAV?
A: Yes it is.  At present time (version 3.0 and later)  the DSoundCapture routines are supported (-+C flag). However, at present time, most audio card drivers don't support DirectSoundCaputure API in native mode, supporting it only in emulation mode, so using DirectX routines for input don’t completely eliminate latency. I was told that Windows 2000 drivers will support DirectSoundCapture in native mode.

Q: What is the difference in score language between Canonical Csound and CsoundAV?
A: CsoundAV has a superset of score language of Csound. In particular nested loops and score tables are the most important features that are not implemented in canonical version yet.

Q: What is VMCI?
A: VMCI is an acronym of Virtual Midi Control Interface. It is a set of virtual sliders, joysticks, and a virtual keyboard. It implements also a launcher for Csound, and it is designed with the idea to be a CsoundAV companion. The most important features is that all positions and configurations can be saved and restored in a later time from the hard-disk. It is very handful to control CsoundAV in realtime, but it can also be used together with other virtual or real midi instruments. Also, VMCI Plus supports a complex interaction of a lot of controls by means of a single mouse movement, accrding to a configuration previously set by the user. It also supports MIDI IN, allowing an hardware MIDI device to control very complex MIDI configurations. It will be also more programmable. There are several versions of VMCI:

VMCI 1.22 Lite (freeware, no HVS)

VMCI 1.22 Pro (donationware, no HVS)

VMCI 2.0 Plus (shareware) implements many advanced features such as HVS (Hyper Vectorial Synthesis).

Q: Where can I get CsoundAV and VMCI
A: Check my site:


Q: Is CsoundAV compatible with Windows98?
A: Yes, it is.

Q: Is CsoundAV compatible with Windows NT, what about Windows 2000 and Windowx XP?
A: CsoundAV doesn't seem to operate correcty in realtime with Windows NT. However it works OK in deferred time. I can't test it as I haven't Win NT installed on my computer.
Recent tests done by beta testers, confirm that CsoundAV is fully realtime compatible with Windows2000 using DirectX 7.0. I havent tried Windows XP yet, but I can suppose it supports CsoundAV.