33 {
XO(
"Acoustic"), { 50, 10, 75, 100, 21, 100, -14, 0, 80,
false } },
35 {
XO(
"Ambience"), { 100, 55, 100, 50, 53, 38, 0, -10, 100,
false } },
37 {
XO(
"Artificial"), { 81, 99, 23, 62, 16, 19, -4, 0, 100,
false } },
39 {
XO(
"Clean"), { 50, 10, 75, 100, 55, 100, -18, 0, 75,
false } },
41 {
XO(
"Modern"), { 50, 10, 75, 100, 55, 100, -15, 0, 75,
false } },
44 {
XO(
"Vocal I"), { 70, 20, 40, 99, 100, 50, -12, 0, 70,
false } },
46 {
XO(
"Vocal II"), { 50, 0, 50, 99, 50, 100, -1, -1, 70,
false } },
48 {
XO(
"Dance Vocal"), { 90, 2, 60, 77, 30, 51, -10, 0, 100,
false } },
50 {
XO(
"Modern Vocal"), { 66, 27, 77, 8, 0, 51, -10, 0, 68,
false } },
52 {
XO(
"Voice Tail"), { 66, 27, 100, 8, 0, 51, -6, 0, 68,
false } },
55 {
XO(
"Bathroom"), { 16, 8, 80, 0, 0, 100, -6, 0, 100,
false } },
57 {
XO(
"Small Room Bright"), { 30, 10, 50, 50, 50, 100, -1, -1, 100,
false } },
59 {
XO(
"Small Room Dark"), { 30, 10, 50, 50, 100, 0, -1, -1, 100,
false } },
61 {
XO(
"Medium Room"), { 75, 10, 40, 50, 100, 70, -1, -1, 70,
false } },
63 {
XO(
"Large Room"), { 85, 10, 40, 50, 100, 80, 0, -6, 90,
false } },
65 {
XO(
"Church Hall"), { 90, 32, 60, 50, 100, 50, 0, -12, 100,
false } },
67 {
XO(
"Cathedral"), { 90, 16, 90, 50, 100, 0, 0, -20, 100,
false } },
69 {
XO(
"Big Cave"), { 100, 55, 100, 50, 53, 38, 5, -3, 100,
false } },
85 return XO(
"Adds ambience or a \"hall effect\"");
117 mChannels = rs.mStereoWidth ? 2 : 1;
129 bool isStereo =
false;
140 state.
mP = std::make_unique<Reverb_priv_ex[]>(state.
mNumChans);
142 for (
unsigned int i = 0; i < state.
mNumChans; i++)
145 &state.
mP[i].reverb,
sampleRate, rs.mWetGain, rs.mRoomSize,
146 rs.mReverberance, rs.mHfDamping, rs.mPreDelay,
147 rs.mStereoWidth * (isStereo ? 1 : 0), rs.mToneLow, rs.mToneHigh,
BLOCK,
184 mSlaves.push_back(std::move(slave));
196 float*
const* outbuf,
size_t numSamples)
200 if (!(incomingSettings == mLastAppliedSettings))
202 const bool onlySimpleOnes =
205 for (
auto& slave : mSlaves)
207 for (
unsigned int i = 0; i < slave.mState.mNumChans; i++)
209 auto& reverbCore = slave.mState.mP[i].reverb;
210 const auto& is = incomingSettings;
215 &reverbCore, mLastSampleRate, is.mWetGain, is.mReverberance,
216 is.mHfDamping, is.mToneLow, is.mToneHigh);
223 &reverbCore, mLastSampleRate, is.mWetGain, is.mRoomSize,
224 is.mReverberance, is.mHfDamping, is.mPreDelay,
225 is.mStereoWidth, is.mToneLow, is.mToneHigh);
230 mLastAppliedSettings = incomingSettings;
233 if (group >= mSlaves.size())
235 return InstanceProcess(
241 for (
auto& slave : mSlaves)
243 for (
unsigned int i = 0; i < slave.mState.mNumChans; i++)
264 float*
const* outBlock,
size_t blockLen)
266 return InstanceProcess(
settings,
mState, inBlock, outBlock, blockLen);
271 float*
const* outBlock,
size_t blockLen)
275 const float* ichans[2] = { NULL, NULL };
276 float* ochans[2] = { NULL, NULL };
278 for (
unsigned int c = 0; c < state.
mNumChans; c++)
280 ichans[c] = inBlock[c];
281 ochans[c] = outBlock[c];
284 float const dryMult = rs.mWetOnly ? 0 :
dB_to_linear(rs.mDryGain);
286 auto remaining = blockLen;
291 for (
unsigned int c = 0; c < state.
mNumChans; c++)
297 (
float*)
fifo_write(&state.
mP[c].reverb.input_fifo, len, ichans[c]);
303 for (
decltype(len) i = 0; i < len; i++)
305 for (
int w = 0; w < 2; w++)
308 dryMult * state.
mP[w].dry[i] +
309 0.5 * (state.
mP[0].wet[w][i] + state.
mP[1].wet[w][i]);
315 for (
decltype(len) i = 0; i < len; i++)
317 ochans[0][i] = dryMult * state.
mP[0].dry[i] + state.
mP[0].wet[0][i];
323 for (
unsigned int c = 0; c < state.
mNumChans; c++)
377 const bool oneSimpleParameterChanged =
383 const bool allNonSimpleParametersStayedTheSame =
388 return oneSimpleParameterChanged && allNonSimpleParametersStayedTheSame;
std::optional< std::unique_ptr< EffectSettingsAccess::Message > > OptionalMessage
std::vector< RegistryPath > RegistryPaths
static void reverb_init(reverb_t *p, double sample_rate_Hz, double wet_gain_dB, double room_scale, double reverberance, double hf_damping, double pre_delay_ms, double stereo_depth, double tone_low, double tone_high)
static void reverb_set_simple_params(reverb_t *p, double sample_rate_Hz, double wet_gain_dB, double reverberance, double hf_damping, double tone_low, double tone_high)
static void reverb_process(reverb_t *p, size_t length)
static void reverb_clear(reverb_t *p)
static void reverb_create(reverb_t *p, double sample_rate_Hz, double wet_gain_dB, double room_scale, double reverberance, double hf_damping, double pre_delay_ms, double stereo_depth, double tone_low, double tone_high, size_t buffer_size, float **out)
static void * fifo_write(fifo_t *f, FIFO_SIZE_T n, void const *data)
bool OnlySimpleParametersChanged(const ReverbSettings &a, const ReverbSettings &b)
bool operator==(const ReverbSettings &a, const ReverbSettings &b)
static const struct @106 FactoryPresets[]
const TranslatableString name
static Settings & settings()
Generates EffectParameterMethods overrides from variadic template arguments.
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
void SetLinearEffectFlag(bool linearEffectFlag)
RealtimeSince
In which versions of Audacity was an effect realtime capable?
Hold values to send to effect output meters.
Interface for manipulations of an Effect's settings.
static ReverbSettings & GetSettings(EffectSettings &settings)
Assume settings originated from MakeSettings() and copies thereof.
Base class for many of the effects in Audacity.
RealtimeSince RealtimeSupport() const override
Since which version of Audacity has the effect supported realtime?
static constexpr EffectParameter WetOnly
static const ComponentInterfaceSymbol Symbol
static constexpr EffectParameter StereoWidth
static constexpr EffectParameter RoomSize
static constexpr EffectParameter HfDamping
OptionalMessage LoadFactoryPreset(int id, EffectSettings &settings) const override
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
EffectType GetType() const override
Type determines how it behaves.
static constexpr EffectParameter PreDelay
static constexpr EffectParameter Reverberance
static constexpr EffectParameter WetGain
static constexpr EffectParameter DryGain
TranslatableString GetDescription() const override
static constexpr EffectParameter ToneHigh
RegistryPaths GetFactoryPresets() const override
Report names of factory presets.
ComponentInterfaceSymbol GetSymbol() const override
static constexpr EffectParameter ToneLow
const EffectParameterMethods & Parameters() const override
Holds a msgid for the translation catalog; may also bind format arguments.
wxString Translation() const
constexpr auto sampleRate
Externalized state of a plug-in.
unsigned GetAudioInCount() const override
How many input buffers to allocate at once.
bool RealtimeSuspend() override
Instance(const PerTrackEffect &effect)
bool RealtimeAddProcessor(EffectSettings &settings, EffectOutputs *, unsigned numChannels, float sampleRate) override
bool ProcessFinalize(void) noexcept override
bool RealtimeInitialize(EffectSettings &settings, double sampleRate) override
bool InstanceInit(EffectSettings &settings, double sampleRate, ReverbState &data, ChannelNames chanMap, bool forceStereo)
bool ProcessInitialize(EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
size_t RealtimeProcess(size_t group, EffectSettings &settings, const float *const *inbuf, float *const *outbuf, size_t numSamples) override
size_t InstanceProcess(EffectSettings &settings, ReverbState &data, const float *const *inBlock, float *const *outBlock, size_t blockLen)
bool RealtimeFinalize(EffectSettings &settings) noexcept override
unsigned GetAudioOutCount() const override
How many output buffers to allocate at once.
size_t ProcessBlock(EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override
Called for destructive effect computation.
std::unique_ptr< Reverb_priv_ex[]> mP