Started work on a STK based multitimbral instrument.
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms-mv@689 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -92,17 +92,7 @@ public:
|
||||
m_sampleRate( _sample_rate ),
|
||||
m_subFilter( NULL )
|
||||
{
|
||||
// reset in/out history
|
||||
for( ch_cnt_t _chnl = 0; _chnl < CHANNELS; ++_chnl )
|
||||
{
|
||||
// reset in/out history for simple filters
|
||||
m_ou1[_chnl] = m_ou2[_chnl] = m_in1[_chnl] =
|
||||
m_in2[_chnl] = 0.0f;
|
||||
// reset in/out historey for moog-filter
|
||||
m_y1[_chnl] = m_y2[_chnl] = m_y3[_chnl] = m_y4[_chnl] =
|
||||
m_oldx[_chnl] = m_oldy1[_chnl] =
|
||||
m_oldy2[_chnl] = m_oldy3[_chnl] = 0.0f;
|
||||
}
|
||||
clearHistory();
|
||||
}
|
||||
|
||||
inline ~basicFilters()
|
||||
@@ -110,6 +100,21 @@ public:
|
||||
delete m_subFilter;
|
||||
}
|
||||
|
||||
inline void clearHistory( void )
|
||||
{
|
||||
// reset in/out history
|
||||
for( ch_cnt_t _chnl = 0; _chnl < CHANNELS; ++_chnl )
|
||||
{
|
||||
// reset in/out history for simple filters
|
||||
m_ou1[_chnl] = m_ou2[_chnl] = m_in1[_chnl] =
|
||||
m_in2[_chnl] = 0.0f;
|
||||
// reset in/out historey for moog-filter
|
||||
m_y1[_chnl] = m_y2[_chnl] = m_y3[_chnl] = m_y4[_chnl] =
|
||||
m_oldx[_chnl] = m_oldy1[_chnl] =
|
||||
m_oldy2[_chnl] = m_oldy3[_chnl] = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
inline sample_t update( sample_t _in0, ch_cnt_t _chnl )
|
||||
{
|
||||
sample_t out;
|
||||
|
||||
Reference in New Issue
Block a user