Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITADSP
Commits
5e6819a9
Commit
5e6819a9
authored
Feb 13, 2020
by
Dipl.-Ing. Jonas Stienen
Browse files
Cleanup, patch running
parent
36092009
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/pd/ITADSP_pd_jet_engine.cpp
View file @
5e6819a9
...
...
@@ -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
] sin
e
-sqared roll-in of amplitude for the frequencies
, otherwise very synthetic
if
(
fNormalizedRPMControlUpscaled
<
0.1
)
fAmplitude
*=
sin
(
ITAConstants
::
HALF_PI_F
*
fNormalizedRPMControlUpscaled
/
0.1
f
)
*
sin
(
ITAConstants
::
HALF_PI_F
*
fNormalizedRPMControlUpscaled
/
0.1
f
);
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.9
f
)
?
-
0.9
f
:
(
(
m_fTempSample
>
0.9
f
)
?
0.9
f
:
m_fTempSample
);
// clip~ -0.9 0.9
...
...
@@ -248,7 +234,7 @@ void ITADSP::PD::CJetEngine::Process( float* pfOutputBuffer, int iNumSamples )
m_fTempSample
*=
0.5
f
;
// *~ 0.5
const
float
fManualBalance
=
0.1
f
/
0.5
f
;
//
Manual modifier [NOT INCLUDED IN PD PATCH]
const
float
fManualBalance
=
0.1
f
/
0.5
f
;
//
[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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment