CVARs:Audio

From ZDoom Wiki
Jump to: navigation, search

These CVARs control various aspects of the game's sound and music configurations, including the MIDI synthesizers and module replayers.

See the CVARs article for general information on how to access and edit variables.

General settings

Most of these variables can be set from the sound options menu.

Default: ""
This is the drive letter of the CD drive that the CD commands will affect. If you only have one CD drive, you can leave it blank. Doing so will cause the game to use the default CD drive.
Since drive letters only exist in Windows file systems, this variable is ignored on Unix and Mac OS systems.
Default: true
Set this to false if you don't want CD audio support.
Default: 1.0
This is a multiplier for snd_musicvolume when a Strife-style conversation starts. This can be used to reduce music volume so as to make it easier to listen to the voice acting.
Default: 0
If non-zero, allows to choose how many buffer are used by FMOD Ex. Note that with any snd_samplerate below about 44kHz, you will need to set snd_buffersize to avoid long latencies.
Default: 0
This is the length of the sound buffer in milliseconds. Leaving this at 0 will let FMOD Ex choose the value. If that is unacceptable, you can try setting the buffer size manually. Buffer sizes can be any multiple of 20. Sizes that are not will be rounded up to the nearest multiple of 20. Smaller buffers produce less latency but are more prone to "breaking up" or "stuttering". You want the buffer size to be as low as possible without stuttering. Each time you change the buffer size, you should use snd_reset to test the new buffer size.
Default: 32
This cvar determines the number of channels used for mixing sound effects. Larger values generally sound better but also require a faster processor; though if you have a multicore processor you can safely use the maximum value of 256. Older versions of ZDoom (up to 2.2.0) used a lower default value of 12.
Default: 0
Selects a machine-specific sound driver. The available drivers depends both on the setting of snd_output and on the hardware installed. The snd_listdrivers command will list the drivers available for the current output device.
Default: false
Setting this to true causes sounds to the left of the listener to play on the right channel and vice-versa. Use this if your sound setup is screwy and has stereo reversed.
Default: false
If true, the MiniWikipediaLogoIcon.pnghead-related transfer function filter is applied.
Default: 0.6
This is the volume at which menu sounds are played and can range from 0 to 1.
Default: -1
This cvar determines which MIDI device ZDoom uses for MIDI and MUS music. A value of -1 indicates to use the FMOD synthesizer, while other values select specific MIDI devices. A complete list of MIDI devices available can be obtained with the snd_listmididevices command.
Default: false
Works around a bug in the MiniWikipediaLogoIcon.pngGUS PnP drivers by precaching every instrument in a song just before playback begins. If you do not have one of these cards, you can leave this to false to speed up music transitions (even if using the GUS emulator).
Default: 0.5
This is the volume at which music is played and can range from 0 to 1.
Default: "Default"
Selects how sound is sent to the operating system. Possible values other than "default" and "no sound" are system-dependent:
  • Windows: "DirectSound", "WASAPI", "ASIO", "WaveOut", "OpenAL"
  • Unix: "OSS", "ALSA", "SDL", "ESD", "PulseAudio"
  • Mac OS: "Sound Manager", "Core Audio
Default: "PCM-16"
The format in which ZDoom's audio output is sent to the system. Valid values are "PCM-8", "PCM-16", "PCM-24", "PCM-32", and "PCM-Float".
Default: false
When set to true, the random pitch effect found in early versions of Doom will be simulated.
Default: false
Default: "Linear"
Valid values include "NoInterp", "Linear", "Cubic", and "Spline".
Default: 0
This is the sampling rate (in Hz) at which sounds are mixed in the game. This affects the sound quality for everything except MIDI music. Most Doom sounds are only 11025 Hz, but some are 22050 Hz, and music sounds better with higher sampling rates. A value of 0 lets FMOD Ex use the system default, with a fallback to 48000 Hz if the system does not provide a valid answer.
Default: 0.5
This is the volume at which sound effects are played and can range from 0 to 1. This does not set the volume for your sound card's wave playback.
Default: "Auto"
Adapts sound output to your speaker configuration. Valid values include "Auto", "Mono", "Stereo", "Prologic", "Quad", "Surround", "5.1", and "7.1".
Default: 250.0
Underwater low-pass filter cutoff frequency. Set to 0 to disable the filter.
Default: true
Controls the use of reverb in underwater areas. False disables the reverb, and true enables it.
Default: false

FluidSynth settings

These variables are specific to the FluidSynth synthesizer. (Need more info)

Default: true
  • fluid_chorus_depth (float)
Default: 8.0
Valid values range from 0.0 to 21.0.
  • fluid_chorus_level (float)
Default: 1.2
Valid values range from 0.0 to 1.0. The FluidSynth default value is 2.0.
  • fluid_chorus_speed (float)
Default: 0.3
Valid values range from 0.29 to 5.0.
Default: 0
Valid values are 0 (sine) and 1 (triangle).
Default: 3
Valid values range from 0 to 99.
Default: 0.5
Default: 1
MiniWikipediaLogoIcon.pngInterpolation type. Valid values are 0 (no interpolation), 1 (MiniWikipediaLogoIcon.pnglinear interpolation), 4 (fourth order MiniWikipediaLogoIcon.pngpolynomial interpolation) and 7 (seventh order polynomial).
Default: ""
Defines the paths to the sound fonts used by the FluidSynth MIDI synthesizer.
Default: true
  • fluid_reverb_damping (float)
Default: 0.23
Valid values range from 0.0 to 1.0. The FluidSynth default is 0.0.
  • fluid_reverb_level (float)
Default: 0.57
Valid values range from 0.0 to 1.0. The FluidSynth default value is 0.9.
  • fluid_reverb_roomsize (float)
Default: 0.61
Valid values range from 0.0 to 1.2. The FluidSynth default value is 0.2.
  • fluid_reverb_width (float)
Default: 0.76
Valid values range from 0.0 to 100.0. The FluidSynth default value is 0.5.
Default: 0
The sample rate at which FluidSynth should work. Leaving it to 0 means that it uses its own default.
Default: 1
Number of threads that FluidSynth can use. Valid values range from 1 to 256.
Default: 128
Number of simultaneous voices. Valid values range from 16 to 4096.

FMOD settings

These variables only affect the FMOD MIDI synthesizer and module replayer.

Default: ""
Defines the path to the DLS soundfont used by the MIDI synthesizer. If left empty, FMOD will use its own default value. (On Windows systems, it looks for gm.dls which is located in Windows\System32\drivers.)

GUS settings

These variables are specific to ZDoom's TiMidity-based GUS emulator.

Default: true
Selects whether DMXGUS lumps ought to be parsed and read. If false, the GUS emulator will only read the midi_config.
Default: "timidity.cfg"
Defines the path to the fallback configuration file.
Default: false
This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity.
Default: 32
The maximum amount of voices available to the GUS emulator. Valid values range from 16 to 256.
Default: 0
Chooses the amount of memory available to the GUS emulator. Valid values are 0 for unlimited, 1 for 256K, 2 for 512K, 3 for 768K, and 4 for 1024K. A non-zero value only affects how patches are remapped; ZDoom's internal TiMidity will actually use as much memory as needed to load the patches in any case.
  • gus_patchdir (string)
  • Default: ""
Defines the path in which to search for GUS patches. This is in addition to the system default of %ULTRADIR%/midi.

Module settings

Most of these variables can be set from the module replayer options menu.

Default: false
Disables interpolation for short samples that meet criteria set by the associated CVARs for scan threshold, size force, and size scan.
  • mod_autochip_scan_threshold (integer)
Default: 12
Default: 100
Default: 500
Default: true
Selects whether the foo_DUMB replayer should be used. If false, the FMOD replayer is used instead.
Default: 1
Sets the interpolation type. Valid values are 0 for no interpolation, 1 for linear, and 2 for cubic.
Default: 0
The sample rate at which the replayer works. Leaving the value to 0 means to use the same rate as the rest of the sound system.
Default: 0
Sets the mode used for volume ramping. Valid values are 0 (no ramping), 1 (logarithmic), 2 (linear), 3 (linear for XM, no ramping otherwise) and 4 (linear for XM, logarithmic otherwise).

OPL emulator settings

These variables are specific to ZDoom's OPL synth emulation.

Default: 0
Choose which OPL emulator core to use. Possible values are:
  • 0: Use MAME-derived OPL2 core
  • 1: Use DOSBox-derived OPL3 core
  • 2: Use Java-ported OPL3 core
  • 3: Use Nuked.YKT's OPL3 core (development version 4a3427 only)
Default: true
If true, the OPL emulator will be able to use full stereo on MIDI playback, even though the emulated hardware only supported mono output (OPL2) or stereo limited to three panning position (OPL3).
Default: 2
This allows to choose the number of virtual OPL chips used in the OPL emulator when rendering MIDI songs. (Raw OPL is still limited to two chips at most.) Using only one chip can make the emulation up to twice as fast, but it is not really enough to play Doom's music, and most old sound cards had either two OPL2 chips or one OPL3 chip (which acts like two OPL2 chips).
Default: false
Setting this to true will cause all double voice instruments to use only one voice. Many Doom instruments use two voices, so this is not recommended.

TiMidity++ settings

These variables are specific to the external TiMidity++ synthesizer.

Default: false
Set this to true to make TiMidity++ output 8-bit instead of 16-bit.
Default: false
Set this to true to make Timidity swap the upper 8 bits and the lower 8 bits of audio data when it is outputting 16-bits. Probably nobody needs this.
Default: "0"
The contents of this CVAR are supplied to TiMidity's -EFchorus option.
Default: "timidity.exe" (on Windows systems) or "timidity" (on Unix and Mac OS X)
Defines the path to the executable.
Default: ""
This CVAR is used to supply any extra arguments to TiMidity++. Its contents are appended to the command line that ZDoom generates using the other timidity CVARs.
Default: 22050
This is the sample rate that at which TiMidity++ will play the music.
  • timidity_mastervolume (float)
Default: 1.0
This scales the external TiMidity++'s output volume. It was added because TiMidity tends to be louder than other MIDI synthesizers. Valid values are in the range from 0.0 to 4.0.
Default: 90
This is the approximate size, in milliseconds, of the stream buffer the game uses to mix TiMidity's output with the rest of the game audio. Setting the buffer size to 0 will cause TiMidity++ to send its output directly to the sound card instead of through the game. Most, if not all, PCI sound cards should be fine with this set to 0. Older sound cards will require this to be non-zero so that ZDoom can mix the music with the rest of its sounds.
Default: "0"
The contents of this cvar are supplied to TiMidity's -EFreverb option.
Default: true
Set this to false to force Timidity's output to be monaural instead of stereo.

Miscellaneous

Default: true
When true, the EAX environment currently shown in the editor called by the reverbedit console command will be used for all areas of the map. This allows for interactive tweaking of different environments.
Default: 0
When non-zero, shows various oscilloscopes and spectrums for debugging purposes.

See also