Centre for Digital Music, Queen Mary, University of London.
This file copyright 2006 Dan Stowell.
-
+
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
channels > getMaxChannelCount()) return false;
m_stepSize = std::min(stepSize, blockSize);
-
- // Translate the coefficients
+
+ // Translate the coefficients
// from their "convenient" 60dB convergence-time values
// to real coefficients
m_clampcoef = m_clampcoef==0.0 ? 0.0 : exp(log(0.1)/(m_clampcoef * m_inputSampleRate));
AmplitudeFollower::getParameterDescriptors() const
{
ParameterList list;
-
+
ParameterDescriptor att;
att.identifier = "attack";
att.name = "Attack time";
att.maxValue = 1.f;
att.defaultValue = 0.01f;
att.isQuantized = false;
-
+
list.push_back(att);
-
+
ParameterDescriptor dec;
dec.identifier = "release";
dec.name = "Release time";
dec.maxValue = 1.f;
dec.defaultValue = 0.01f;
dec.isQuantized = false;
-
+
list.push_back(dec);
-
+
return list;
}
float previn = m_previn;
FeatureSet returnFeatures;
-
+
float val;
float peak = 0.0f;
for (size_t i = 0; i < m_stepSize; ++i) {
val = fabs(inputBuffers[0][i]);
-
+
if (val < previn) {
val = val + (previn - val) * m_relaxcoef;
} else {