This section briefly describes basic MIDAS concepts and terminology.
A sample in MIDAS Sound System includes the sample data for a sound sample, plus information on its data type, the sample length and looping information. It does not contain other attributes such as volume or panning -- these are instrument properties. In MIDAS, samples are managed and stored by by Sound Devices. A sample is identified by a sample handle, and this sample handle can be used to play the sample or remove it from Sound Device storage.
In MIDAS Sound System, channels are used to play the sound. Each channel can play one sample or stream at a time, either mono or stereo. When a new sound is played on a channel, the old one is removed. A channel is identified by a channel number, which range from zero upwards.
Before any sound can be played, a number of channels must be opened from the Sound Device. MIDAS supports an unlimited number of channels on all platforms, unless hardware mixing is used. Although the number of open channels has some impact on CPU usage, the amount of CPU power used depends mostly on the channels that actually play sound. Therefore it is much more important to ensure that no unnecessary sounds are left playing than it is to minimize the number of open channels.
Panning in MIDAS Sound System affects the apparent position of the sound in stereo environments. Sound panned to ``left'' will be played from the left speaker, ``right'' from the right one and ``middle'' from both. 64 different panning positions are available between ``left'' and ``middle'' plus ``right'' and ``middle'', to give smooth control on the sound position.
In addition, surround sound is also considered a separate panning position. Sounds played with their panning position set to ``surround'' are played from the surround speakers if the computer is connected to a surround decoder. Even if surround equipment is not available, the sound appears to come from around the listener's head, not from inside it as in ``middle'' panning position.
Note that not all Sound Devices necessarily support surround sound. Furthermore, if the computer is playing in stereo mode, but connected to mono equipment, all sounds played in ``surround'' will disappear!
Most sound cards supported by MIDAS Sound System are only capable of playing one digital sound channel at a time, but still MIDAS supports an unlimited number of channels with them. This is accomplished through software mixing of the sound -- the sound channels are mixed digitally together before passing the sound to the sound card.
Mixing the sound in software is a complicated process, and, although MIDAS mixing routines are carefully optimized, can still take a considerable amount of CPU time. The CPU time used is determined by four factors: The number of channels active, the mixing rate, the output mode and the type of the samples played. The time used depends almost linearly on the mixing rate and the number of channels, and stereo output can take up to 50% more CPU time than mono. The sample type effect is almost the same - stereo samples can take up to 50% more CPU than mono ones, and 16-bit samples 50% more than 8-bit.
The opposite of software mixing is hardware mixing. Hardware mixing sound cards are capable of playing multiple digital sounds in hardware, and thus there is no need to mix the sound in software. This often uses much less CPU power, depending on the sound card, but as a tradeoff some flexibility is lost. One problem with hardware mixing cards is, that samples have to be placed in on-card memory. Very often the cards come with as little as 512kb of memory, and thus can store only a few samples. The second problem is, that playing streams with hardware mixing cards is usually impossible. This severely limits the usability of hardware mixing cards with MIDAS.