Commit 5e6819a9 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Cleanup, patch running

parent 36092009
......@@ -73,13 +73,10 @@ namespace ITADSP
m_oJetEngineLP2.process( 1, &pfNormalizedRPMUpsampleAlias );
}
}
oInputParameter.Init( 4, g_iOutputLengthSamples, g_dSampleRate, true );
};
inline virtual ~CJetEngine()
{
oInputParameter.StoreToFile( "ITADSP_pd_jet_engine_input_param.wav" );
};
virtual void SetRPM( float fNewRPM );
......@@ -107,9 +104,6 @@ namespace ITADSP
std::vector< float > m_vfTurbineBaseModeFrequencies, m_vfTurbineBaseModeAmplitudes, m_vfRPMRange;
float m_fTempSample;
ITABase::CMultichannelFiniteImpulseResponse oInputParameter;
};
}
}
......@@ -226,19 +220,11 @@ void ITADSP::PD::CJetEngine::Process( float* pfOutputBuffer, int iNumSamples )
const float t = fmodf( ITAConstants::TWO_PI_F_L * fFrequency * float( n ) / float( g_dSampleRate ), ITAConstants::TWO_PI_F );
// [MANUAL WORK] sin-sqared roll-in of amplitude for the frequencies
// [MANUAL MODIFICATION] sine-sqared roll-in of amplitude for the frequencies, otherwise very synthetic
if( fNormalizedRPMControlUpscaled < 0.1 )
fAmplitude *= sin( ITAConstants::HALF_PI_F * fNormalizedRPMControlUpscaled / 0.1f ) * sin( ITAConstants::HALF_PI_F * fNormalizedRPMControlUpscaled / 0.1f );
m_fTempSample += fAmplitude * sin( t + fPhaseShift ); // all osc~ and *~
if( i == 0 )
{
oInputParameter[ 0 ][ iTotalSamples + n ] = m_fTempSample;
oInputParameter[ 1 ][ iTotalSamples + n ] = fFrequency;
oInputParameter[ 2 ][ iTotalSamples + n ] = fPhaseShift;
oInputParameter[ 3 ][ iTotalSamples + n ] = fNormalizedRPMControl;
}
}
m_fTempSample = ( m_fTempSample < -0.9f ) ? -0.9f : ( ( m_fTempSample > 0.9f ) ? 0.9f : m_fTempSample ); // clip~ -0.9 0.9
......@@ -248,7 +234,7 @@ void ITADSP::PD::CJetEngine::Process( float* pfOutputBuffer, int iNumSamples )
m_fTempSample *= 0.5f; // *~ 0.5
const float fManualBalance = 0.1f / 0.5f; // Manual modifier [NOT INCLUDED IN PD PATCH]
const float fManualBalance = 0.1f / 0.5f; // [MANUAL MODIFICATION] not included in patch
m_fTempSample = fCurrentSample + fManualBalance * m_fTempSample; // combine turbine and flame from jet engine patch (with a manual balance that sound better)
m_oJetEngineLP1.process( 1, &pfTempSampleAlias ); // ~lop 11000
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment