projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tempo ramps - no more tempo dilation on meter drag.
[ardour.git]
/
libs
/
vamp-plugins
/
AmplitudeFollower.cpp
diff --git
a/libs/vamp-plugins/AmplitudeFollower.cpp
b/libs/vamp-plugins/AmplitudeFollower.cpp
index c4b2e56b6260c0c3e4138a7ed39ed63c26fe0f8b..3b8744255202af10abd26c70a77a14430ad384c5 100644
(file)
--- a/
libs/vamp-plugins/AmplitudeFollower.cpp
+++ b/
libs/vamp-plugins/AmplitudeFollower.cpp
@@
-108,7
+108,7
@@
AmplitudeFollower::initialise(size_t channels, size_t stepSize, size_t blockSize
channels > getMaxChannelCount()) return false;
m_stepSize = std::min(stepSize, blockSize);
channels > getMaxChannelCount()) return false;
m_stepSize = std::min(stepSize, blockSize);
-
+
// Translate the coefficients
// from their "convenient" 60dB convergence-time values
// to real coefficients
// Translate the coefficients
// from their "convenient" 60dB convergence-time values
// to real coefficients
@@
-148,7
+148,7
@@
AmplitudeFollower::ParameterList
AmplitudeFollower::getParameterDescriptors() const
{
ParameterList list;
AmplitudeFollower::getParameterDescriptors() const
{
ParameterList list;
-
+
ParameterDescriptor att;
att.identifier = "attack";
att.name = "Attack time";
ParameterDescriptor att;
att.identifier = "attack";
att.name = "Attack time";
@@
-210,14
+210,14
@@
AmplitudeFollower::process(const float *const *inputBuffers,
float previn = m_previn;
FeatureSet returnFeatures;
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]);
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 {
if (val < previn) {
val = val + (previn - val) * m_relaxcoef;
} else {