class RemiAudio::DSP::MVerb
- RemiAudio::DSP::MVerb
- RemiAudio::DSP::Reverb
- Reference
- Object
Overview
Implements a reverb effect.
This is a port of MVerb, a studio quality, open-source reverb based on a figure-of-eight structure.
Defined in:
remiaudio/dsp/reverbs/mverb-classes.crremiaudio/dsp/reverbs/mverb-presets.cr
remiaudio/dsp/reverbs/mverb.cr
Constant Summary
-
BANDWIDTH_FREQ_MAX =
1.0
-
BANDWIDTH_FREQ_MIN =
0.0
-
DAMPING_FREQ_MAX =
1.0
-
DAMPING_FREQ_MIN =
0.0
-
DECAY_MAX =
1.0
-
DECAY_MIN =
0.0
-
DEFAULT_BANDWIDTH_FREQ =
0.5
-
DEFAULT_DAMPING_FREQ =
0.5
-
DEFAULT_DECAY =
0.5
-
DEFAULT_DENSITY =
0.5
-
DEFAULT_EARLY_LATE_MIX =
0.5
-
DEFAULT_GAIN =
1.0
-
DEFAULT_MIX =
0.5
-
DEFAULT_PREDELAY =
0.5
-
DEFAULT_SIZE =
0.5
-
DENSITY_MAX =
1.0
-
DENSITY_MIN =
0.0
-
EARLY_LATE_MIX_MAX =
1.0
-
EARLY_LATE_MIX_MIN =
0.0
-
GAIN_MAX =
1.0
-
GAIN_MIN =
0.0
-
MIX_MAX =
1.0
-
MIX_MIN =
0.0
-
PREDELAY_MAX =
1.0
-
PREDELAY_MIN =
0.0
-
PRESETS =
{PresetNames::GmDefault => Preset.new(dampingFreq: 0.59, density: 0.469, bandwidthFreq: 0.688, decay: 0.5084, predelay: 0.0, size: 0.69, gain: 0.5, mix: 1.0, earlyLateMix: 0.795), PresetNames::GmDefault2 => Preset.new(dampingFreq: 0.69, density: 0.425, bandwidthFreq: 0.785, decay: 0.5036, predelay: 0.0, size: 0.42, gain: 0.5, mix: 1.0, earlyLateMix: 0.79), PresetNames::Subtle => Preset.new(dampingFreq: 0.0, density: 0.5, bandwidthFreq: 1.0, decay: 0.5, predelay: 0.0, size: 0.5, gain: 1.0, mix: 0.15, earlyLateMix: 0.75), PresetNames::Stadium => Preset.new(dampingFreq: 0.0, density: 0.5, bandwidthFreq: 1.0, decay: 0.5, predelay: 0.0, size: 1.0, gain: 1.0, mix: 0.35, earlyLateMix: 0.75), PresetNames::Cupboard => Preset.new(dampingFreq: 0.0, density: 0.5, bandwidthFreq: 1.0, decay: 0.5, predelay: 0.0, size: 0.25, gain: 1.0, mix: 0.35, earlyLateMix: 0.75), PresetNames::Dark => Preset.new(dampingFreq: 0.9, density: 0.5, bandwidthFreq: 0.1, decay: 0.5, predelay: 0.0, size: 0.5, gain: 1.0, mix: 0.5, earlyLateMix: 0.75), PresetNames::Halves => Preset.new(dampingFreq: 0.5, density: 0.5, bandwidthFreq: 0.5, decay: 0.5, predelay: 0.5, size: 0.75, gain: 1.0, mix: 0.5, earlyLateMix: 0.5), PresetNames::Hall => Preset.new(dampingFreq: 0.79, density: 0.785, bandwidthFreq: 0.555, decay: 0.675, predelay: 0.0105, size: 1.0, gain: 1.0, mix: 0.32, earlyLateMix: 0.69), PresetNames::SubtleHall => Preset.new(dampingFreq: 0.59, density: 0.525, bandwidthFreq: 0.685, decay: 0.599, predelay: 0.007, size: 0.655, gain: 1.0, mix: 0.15, earlyLateMix: 0.78)}
-
Pre-constructed
Preset
instances forMVerb
that correspond to the names inPresetNames
. -
SIZE_MAX =
1.0
-
SIZE_MIN =
0.0
Constructors
Class Method Summary
-
.checkBandwidthFreq(value) : Nil
Checks if
value
is a valid bandwidth frequency value. -
.checkDampingFreq(value) : Nil
Checks if
value
is a valid damping value. -
.checkDecay(value) : Nil
Checks if
value
is a valid decay value. -
.checkDensity(value) : Nil
Checks if
value
is a valid density value. -
.checkEarlyLateMix(value) : Nil
Checks if
value
is a valid early/late mix value. -
.checkGain(value) : Nil
Checks if
value
is a valid gain value. -
.checkMix(value) : Nil
Checks if
value
is a valid mix value. -
.checkPredelay(value) : Nil
Checks if
value
is a valid predelay value. -
.checkSize(value) : Nil
Checks if
value
is a valid size value.
Instance Method Summary
- #bandwidthFreq : Float64
- #bandwidthFreq=(value : Float64) : Float64
- #dampingFreq : Float64
- #dampingFreq=(value : Float64) : Float64
- #decay : Float64
- #decay=(value : Float64) : Float64
- #density : Float64
- #density=(value : Float64) : Float64
- #earlyLateMix : Float64
- #earlyLateMix=(value : Float64) : Float64
- #gain : Float64
- #gain=(value : Float64) : Float64
- #mix : Float64
- #mix=(value : Float64) : Float64
- #mute : Nil
- #predelay : Float64
- #predelay=(value : Float64) : Float64
-
#process(inputLeft : Array(Float64) | Slice(Float64), inputRight : Array(Float64) | Slice(Float64), outputLeft : Array(Float64) | Slice(Float64), outputRight : Array(Float64) | Slice(Float64)) : Nil
Applies a reverb effect to
inputLeft
andinputRight
, storing the 100% wet results inoutputLeft
andoutputRight
. -
#process(inputLeft : Array(Float32) | Slice(Float32), inputRight : Array(Float32) | Slice(Float32), outputLeft : Array(Float32) | Slice(Float32), outputRight : Array(Float32) | Slice(Float32)) : Nil
Applies a reverb effect to
inputLeft
andinputRight
, storing the 100% wet results inoutputLeft
andoutputRight
. -
#process(input : Array(Float64) | Slice(Float64), output : Array(Float64) | Slice(Float64)) : Nil
Applies a reverb effect to the interleaved samples in
input
, storing the 100% wet results as interleaved samples inoutput
. -
#process(input : Array(Float32) | Slice(Float32), output : Array(Float32) | Slice(Float32)) : Nil
Applies a reverb effect to the interleaved samples in
input
, storing the 100% wet results as interleaved samples inoutput
. -
#process(buffer : Array(Float32) | Slice(Float32), multiplier : Float32 = 1.0) : Nil
Applies a reverb effect to the interleaved samples in
buffer
, mixing the the results back intobuffer
. -
#process(buffer : Array(Float64) | Slice(Float64), multiplier : Float64 = 1.0) : Nil
Applies a reverb effect to the interleaved samples in
buffer
, mixing the the results back intobuffer
. - #reset : Nil
- #sampleRate : Float64
- #sampleRate=(value : Number) : Float64
- #size : Float64
- #size=(value : Float64) : Float64
- #usePreset(preset : Reverb::Preset) : Nil
Instance methods inherited from class RemiAudio::DSP::Reverb
mute : Nil
mute,
process(inputLeft : Array(Float64) | Slice(Float64), inputRight : Array(Float64) | Slice(Float64), outputLeft : Array(Float64) | Slice(Float64), outputRight : Array(Float64) | Slice(Float64)) : Nil
process,
usePreset(preset : Reverb::Preset) : Nil
usePreset
Constructor Detail
Class Method Detail
Checks if value
is a valid bandwidth frequency value. If it is, this
does nothing. Otherwise this raises a ReverbError
with an explanation.
Checks if value
is a valid damping value. If it is, this does nothing.
Otherwise this raises a ReverbError
with an explanation.
Checks if value
is a valid decay value. If it is, this does nothing.
Otherwise this raises a ReverbError
with an explanation.
Checks if value
is a valid density value. If it is, this does nothing.
Otherwise this raises a ReverbError
with an explanation.
Checks if value
is a valid early/late mix value. If it is, this does
nothing. Otherwise this raises a ReverbError
with an explanation.
Checks if value
is a valid gain value. If it is, this does nothing.
Otherwise this raises a ReverbError
with an explanation.
Checks if value
is a valid mix value. If it is, this does nothing.
Otherwise this raises a ReverbError
with an explanation.
Checks if value
is a valid predelay value. If it is, this does nothing.
Otherwise this raises a ReverbError
with an explanation.
Checks if value
is a valid size value. If it is, this does nothing.
Otherwise this raises a ReverbError
with an explanation.
Instance Method Detail
Applies a reverb effect to inputLeft
and inputRight
, storing the 100%
wet results in outputLeft
and outputRight
. The size of both inputs
and both outputs must all match.
Applies a reverb effect to inputLeft
and inputRight
, storing the 100%
wet results in outputLeft
and outputRight
. The size of both inputs
and both outputs must all match.
Applies a reverb effect to the interleaved samples in input
, storing the
100% wet results as interleaved samples in output
. The size of both the
input and output buffers must match.
Applies a reverb effect to the interleaved samples in input
, storing the
100% wet results as interleaved samples in output
. The size of both the
input and output buffers must match.
Applies a reverb effect to the interleaved samples in buffer
, mixing the
the results back into buffer
. multiplier
dictates how strong the
effect is, and should ideally be between 0.0 and 1.0, inclusive.
Applies a reverb effect to the interleaved samples in buffer
, mixing the
the results back into buffer
. multiplier
dictates how strong the
effect is, and should ideally be between 0.0 and 1.0, inclusive.