Add self-modulation mode
This commit is contained in:
@@ -190,6 +190,25 @@ bool DisintegratorEffect::processAudioBuffer(sampleFrame* buf, const fpp_t frame
|
||||
newInBufLocFrac[0] = fmod(newInBufLoc[0], 1);
|
||||
newInBufLocFrac[1] = newInBufLocFrac[0];
|
||||
|
||||
break;
|
||||
}
|
||||
case 3:// Self-Modulation
|
||||
{
|
||||
newInBufLoc[0] = (s[0] + 1) * 0.5f;
|
||||
newInBufLoc[1] = (s[1] + 1) * 0.5f;
|
||||
|
||||
newInBufLoc[0] = m_hp.update( newInBufLoc[0], 0 );
|
||||
newInBufLoc[0] = m_lp.update( newInBufLoc[0], 0 );
|
||||
newInBufLoc[1] = m_hp.update( newInBufLoc[1], 1 );
|
||||
newInBufLoc[1] = m_lp.update( newInBufLoc[1], 1 );
|
||||
|
||||
newInBufLoc[0] = realfmod(m_inBufLoc - newInBufLoc[0] * amount, DISINTEGRATOR_BUFFER_SIZE);
|
||||
newInBufLoc[1] = realfmod(m_inBufLoc - newInBufLoc[1] * amount, DISINTEGRATOR_BUFFER_SIZE);
|
||||
|
||||
// Distance between samples
|
||||
newInBufLocFrac[0] = fmod(newInBufLoc[0], 1);
|
||||
newInBufLocFrac[1] = fmod(newInBufLoc[1], 1);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ DisintegratorControls::DisintegratorControls(DisintegratorEffect* effect) :
|
||||
m_typeModel.addItem(tr("Mono Noise"));
|
||||
m_typeModel.addItem(tr("Stereo Noise"));
|
||||
m_typeModel.addItem(tr("Sine Wave"));
|
||||
m_typeModel.addItem(tr("Self-Modulation"));
|
||||
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user