S.ex. models: implement support for sample-exact controls in fx-mixer

Works for all faders and send knobs
This commit is contained in:
Vesa
2014-06-01 07:17:43 +03:00
parent 385e13bb63
commit 1c0f9700fa
2 changed files with 85 additions and 14 deletions

View File

@@ -122,6 +122,29 @@ public:
}
}
void multiply( float f )
{
for( int i = 0; i < m_length; i++ )
{
m_values[i] *= f;
}
}
ValueBuffer & operator*=( const float & f )
{
multiply( f );
return *this;
}
ValueBuffer & operator+=( const ValueBuffer & v )
{
for( int i = 0; i < qMin( m_length, v.length() ); i++ )
{
m_values[i] += v.values()[i];
}
return *this;
}
static ValueBuffer interpolatedBuffer( float start, float end, int length )
{
ValueBuffer vb = ValueBuffer( length );