QcSoundLayer Struct
One synthesized voice of a sound: a source with a pitch sweep, an envelope and simple filters. More...
| Header: | #include <common/content/registry/QcSoundDefinition.h> |
Public Variables
| double | attack |
| double | bandpass |
| double | curve |
| double | density |
| double | duration |
| double | endFrequency |
| double | frequency |
| double | gain |
| double | highpass |
| double | lowpass |
| double | resonance |
| double | start |
| double | tremoloDepth |
| double | tremoloRate |
| QcSoundWave | wave |
Related Non-Members
| enum class | QcSoundBus { Effects, Ambient, Music } |
| enum class | QcSoundWave { Sine, Square, Triangle, Saw, Noise, Crackle } |
| const int | qcSoundBusCount |
Detailed Description
Times are in seconds, frequencies in Hz.
Member Variable Documentation
double QcSoundLayer::attack
The linear fade-in at the start of the layer, at most duration.
double QcSoundLayer::bandpass
Resonant band-pass around this centre frequency (a two-pole state-variable filter, unity gain at the centre); 0 switches it off. Noise through it rings like a struck body (a plank's knock, a stone's click) without a pitched tone (decision E-879).
double QcSoundLayer::curve
Decay after the attack: amplitude (1 - t)^curve over the rest of the layer; 0 holds the level.
double QcSoundLayer::density
Impulses per second of the Crackle wave.
double QcSoundLayer::duration
How long the layer lasts.
double QcSoundLayer::endFrequency
Frequency at the end of the layer (exponential sweep); 0 keeps frequency.
double QcSoundLayer::frequency
The pitch of the tone waves at the start of the layer.
double QcSoundLayer::gain
The layer's share of the mix, 0..1.
double QcSoundLayer::highpass
Cut-off of a one-pole high-pass; 0 switches it off.
double QcSoundLayer::lowpass
Cut-off of a low-pass of two one-pole stages (12 dB per octave); 0 switches it off.
double QcSoundLayer::resonance
Sharpness of the band-pass (its Q): higher rings narrower and longer.
double QcSoundLayer::start
When the layer begins after the start of the sound.
double QcSoundLayer::tremoloDepth
How deep the tremolo dips the level, 0..1; 0 switches it off.
double QcSoundLayer::tremoloRate
How often per second the tremolo dips the level.
QcSoundWave QcSoundLayer::wave
The signal source (JSON "wave", "noise" by default).
Related Non-Members
enum class QcSoundBus
Mixer group a sound plays on; each has its own volume setting.
| Constant | Value | Description |
|---|---|---|
QcSoundLayer::QcSoundBus::Effects | 0 | Sound effects ("effects", the default). |
QcSoundLayer::QcSoundBus::Ambient | 1 | Ambience ("ambient"). |
QcSoundLayer::QcSoundBus::Music | 2 | Music ("music"). |
enum class QcSoundWave
Signal source of a synthesized layer.
| Constant | Value | Description |
|---|---|---|
QcSoundLayer::QcSoundWave::Sine | 0 | A sine tone. |
QcSoundLayer::QcSoundWave::Square | 1 | A square wave. |
QcSoundLayer::QcSoundWave::Triangle | 2 | A triangle wave. |
QcSoundLayer::QcSoundWave::Saw | 3 | A sawtooth wave. |
QcSoundLayer::QcSoundWave::Noise | 4 | White noise; \c {frequency} is not used. |
QcSoundLayer::QcSoundWave::Crackle | 5 | Sparse random clicks (gravel, fire); density impulses per second. |
const int qcSoundBusCount
The number of QcSoundBus values.