Fix MSVC warnings up to level 2 (#7329)
* Fix MSVC warnings up to /W2 * Fix large shift UB warning
This commit is contained in:
@@ -81,7 +81,7 @@ class CarlaParamFloatModel : public FloatModel
|
||||
{
|
||||
public:
|
||||
CarlaParamFloatModel(Model * parent):
|
||||
FloatModel(0.0, 0.0, 1.0, 0.001, parent, "Unused"),
|
||||
FloatModel(0.f, 0.f, 1.f, 0.001f, parent, "Unused"),
|
||||
m_isOutput(false),
|
||||
m_isEnabled(false)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace lmms
|
||||
{
|
||||
|
||||
|
||||
constexpr float COMP_LOG = -2.2;
|
||||
constexpr float COMP_LOG = -2.2f;
|
||||
|
||||
class CompressorEffect : public Effect
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ class QLabel;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
constexpr float COMP_NOISE_FLOOR = 0.000001;// -120 dbFs
|
||||
constexpr float COMP_NOISE_FLOOR = 0.000001f;// -120 dbFs
|
||||
|
||||
class CompressorControls;
|
||||
|
||||
|
||||
@@ -34,11 +34,11 @@ namespace lmms
|
||||
DelayControls::DelayControls( DelayEffect* effect ):
|
||||
EffectControls( effect ),
|
||||
m_effect ( effect ),
|
||||
m_delayTimeModel( 0.5, 0.01, 5.0, 0.0001, 5000.0, this, tr( "Delay samples" )) ,
|
||||
m_feedbackModel(0.0f,0.0f,1.0f,0.01f,this,tr( "Feedback" ) ),
|
||||
m_lfoTimeModel(2.0, 0.01, 5.0, 0.0001, 20000.0, this, tr( "LFO frequency" ) ),
|
||||
m_lfoAmountModel(0.0, 0.0, 0.5, 0.0001, 2000.0, this, tr ( "LFO amount" ) ),
|
||||
m_outGainModel( 0.0, -60.0, 20.0, 0.01, this, tr( "Output gain" ) )
|
||||
m_delayTimeModel(0.5f, 0.01f, 5.f, 0.0001f, 5000.f, this, tr("Delay samples")) ,
|
||||
m_feedbackModel(0.0f, 0.0f, 1.0f, 0.01f, this, tr("Feedback")),
|
||||
m_lfoTimeModel(2.f, 0.01f, 5.f, 0.0001f, 20000.f, this, tr("LFO frequency")),
|
||||
m_lfoAmountModel(0.f, 0.f, 0.5f, 0.0001f, 2000.f, this, tr("LFO amount")),
|
||||
m_outGainModel(0.f, -60.f, 20.f, 0.01f, this, tr("Output gain"))
|
||||
{
|
||||
connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ) );
|
||||
m_outPeakL = 0.0;
|
||||
@@ -77,4 +77,4 @@ void DelayControls::changeSampleRate()
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
} // namespace lmms
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace lmms
|
||||
StereoDelay::StereoDelay( int maxTime, int sampleRate )
|
||||
{
|
||||
m_buffer = 0;
|
||||
m_maxTime = maxTime;
|
||||
m_maxTime = static_cast<float>(maxTime);
|
||||
m_maxLength = maxTime * sampleRate;
|
||||
m_length = m_maxLength;
|
||||
m_length = static_cast<float>(m_maxLength);
|
||||
|
||||
m_writeIndex = 0;
|
||||
m_feedback = 0.0f;
|
||||
@@ -58,7 +58,7 @@ StereoDelay::~StereoDelay()
|
||||
void StereoDelay::tick( sampleFrame& frame )
|
||||
{
|
||||
m_writeIndex = ( m_writeIndex + 1 ) % ( int )m_maxLength;
|
||||
int readIndex = m_writeIndex - m_length;
|
||||
int readIndex = m_writeIndex - static_cast<int>(m_length);
|
||||
if (readIndex < 0 ) { readIndex += m_maxLength; }
|
||||
float lOut = m_buffer[ readIndex ][ 0 ];
|
||||
float rOut = m_buffer[ readIndex ] [1 ];
|
||||
|
||||
@@ -35,9 +35,9 @@ DispersionControls::DispersionControls(DispersionEffect* effect) :
|
||||
EffectControls(effect),
|
||||
m_effect(effect),
|
||||
m_amountModel(0, 0, MAX_DISPERSION_FILTERS, this, tr("Amount")),
|
||||
m_freqModel(200, 20, 20000, 0.001, this, tr("Frequency")),
|
||||
m_resoModel(0.707, 0.01, 8, 0.0001, this, tr("Resonance")),
|
||||
m_feedbackModel(0.f, -1.f, 1.f, 0.0001, this, tr("Feedback")),
|
||||
m_freqModel(200, 20, 20000, 0.001f, this, tr("Frequency")),
|
||||
m_resoModel(0.707f, 0.01f, 8, 0.0001f, this, tr("Resonance")),
|
||||
m_feedbackModel(0.f, -1.f, 1.f, 0.0001f, this, tr("Feedback")),
|
||||
m_dcModel(false, this, tr("DC Offset Removal"))
|
||||
{
|
||||
m_freqModel.setScaleLogarithmic(true);
|
||||
|
||||
@@ -43,7 +43,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
m_enabled1Model( true, this, tr( "Filter 1 enabled" ) ),
|
||||
m_filter1Model( this, tr( "Filter 1 type" ) ),
|
||||
m_cut1Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff frequency 1" ) ),
|
||||
m_res1Model( 0.5, BasicFilters<>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ),
|
||||
m_res1Model(0.5f, BasicFilters<>::minQ(), 10.f, 0.01f, this, tr("Q/Resonance 1")),
|
||||
m_gain1Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 1" ) ),
|
||||
|
||||
m_mixModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Mix" ) ),
|
||||
@@ -51,7 +51,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
m_enabled2Model( true, this, tr( "Filter 2 enabled" ) ),
|
||||
m_filter2Model( this, tr( "Filter 2 type" ) ),
|
||||
m_cut2Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff frequency 2" ) ),
|
||||
m_res2Model( 0.5, BasicFilters<>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
|
||||
m_res2Model(0.5f, BasicFilters<>::minQ(), 10.f, 0.01f, this, tr("Q/Resonance 2")),
|
||||
m_gain2Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 2" ) )
|
||||
{
|
||||
m_filter1Model.addItem( tr( "Low-pass" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
|
||||
|
||||
@@ -37,30 +37,30 @@ namespace lmms
|
||||
EqControls::EqControls( EqEffect *effect ) :
|
||||
EffectControls( effect ),
|
||||
m_effect( effect ),
|
||||
m_inGainModel( 0.0, -60.0, 20.0, 0.01, this, tr( "Input gain") ),
|
||||
m_outGainModel( -.0, -60.0, 20.0, 0.01, this, tr( "Output gain" ) ),
|
||||
m_lowShelfGainModel( 0.0 , -18, 18, 0.001, this, tr( "Low-shelf gain" ) ),
|
||||
m_para1GainModel( 0.0 , -18, 18, 0.001, this, tr( "Peak 1 gain" ) ),
|
||||
m_para2GainModel( 0.0 , -18, 18, 0.001, this, tr( "Peak 2 gain" ) ),
|
||||
m_para3GainModel( 0.0 , -18, 18, 0.001, this, tr( "Peak 3 gain" ) ),
|
||||
m_para4GainModel( 0.0 , -18, 18, 0.001, this, tr( "Peak 4 gain" ) ),
|
||||
m_highShelfGainModel( 0.0 , -18, 18, 0.001, this, tr( "High-shelf gain" ) ),
|
||||
m_hpResModel( 0.707,0.003, 10.0 , 0.001, this, tr( "HP res" ) ),
|
||||
m_lowShelfResModel( 0.707, 0.55, 10.0 , 0.001, this , tr( "Low-shelf res" ) ),
|
||||
m_para1BwModel( 0.3, 0.1, 4 , 0.001, this , tr( "Peak 1 BW" ) ),
|
||||
m_para2BwModel( 0.3, 0.1, 4 , 0.001, this , tr( "Peak 2 BW" ) ),
|
||||
m_para3BwModel( 0.3, 0.1, 4 , 0.001, this , tr( "Peak 3 BW" ) ),
|
||||
m_para4BwModel( 0.3, 0.1, 4 , 0.001, this , tr( "Peak 4 BW" ) ),
|
||||
m_highShelfResModel( 0.707, 0.55, 10.0 , 0.001, this , tr( "High-shelf res" ) ),
|
||||
m_lpResModel( 0.707,0.003, 10.0 , 0.001, this , tr( "LP res" ) ),
|
||||
m_hpFeqModel( 31.0, 20.0, 20000, 0.001, this , tr( "HP freq" ) ),
|
||||
m_lowShelfFreqModel( 80.0, 20.0, 20000, 0.001, this , tr( "Low-shelf freq" ) ),
|
||||
m_para1FreqModel( 120.0, 20.0, 20000, 0.001, this , tr( "Peak 1 freq" ) ),
|
||||
m_para2FreqModel( 250.0, 20.0, 20000, 0.001, this, tr( "Peak 2 freq" ) ),
|
||||
m_para3FreqModel( 2000.0, 20.0, 20000, 0.001, this , tr( "Peak 3 freq" ) ),
|
||||
m_para4FreqModel( 4000.0, 20.0, 20000, 0.001, this , tr( "Peak 4 freq" ) ),
|
||||
m_highShelfFreqModel( 12000.0, 20.0, 20000, 0.001, this , tr( "High-shelf freq" ) ),
|
||||
m_lpFreqModel( 18000.0, 20.0, 20000, 0.001, this , tr( "LP freq" ) ),
|
||||
m_inGainModel(0.f, -60.f, 20.f, 0.01f, this, tr("Input gain")),
|
||||
m_outGainModel(-0.f, -60.f, 20.f, 0.01f, this, tr("Output gain")),
|
||||
m_lowShelfGainModel( 0.f, -18, 18, 0.001f, this, tr("Low-shelf gain")),
|
||||
m_para1GainModel(0.f, -18, 18, 0.001f, this, tr("Peak 1 gain")),
|
||||
m_para2GainModel(0.f, -18, 18, 0.001f, this, tr("Peak 2 gain")),
|
||||
m_para3GainModel(0.f, -18, 18, 0.001f, this, tr("Peak 3 gain")),
|
||||
m_para4GainModel(0.f, -18, 18, 0.001f, this, tr("Peak 4 gain")),
|
||||
m_highShelfGainModel(0.f, -18, 18, 0.001f, this, tr("High-shelf gain")),
|
||||
m_hpResModel(0.707f,0.003f, 10.f, 0.001f, this, tr("HP res")),
|
||||
m_lowShelfResModel(0.707f, 0.55f, 10.f, 0.001f, this, tr("Low-shelf res")),
|
||||
m_para1BwModel(0.3f, 0.1f, 4, 0.001f, this, tr("Peak 1 BW")),
|
||||
m_para2BwModel(0.3f, 0.1f, 4, 0.001f, this, tr("Peak 2 BW")),
|
||||
m_para3BwModel(0.3f, 0.1f, 4, 0.001f, this, tr("Peak 3 BW")),
|
||||
m_para4BwModel(0.3f, 0.1f, 4, 0.001f, this, tr("Peak 4 BW")),
|
||||
m_highShelfResModel(0.707f, 0.55f, 10.f, 0.001f, this, tr("High-shelf res")),
|
||||
m_lpResModel(0.707f,0.003f, 10.f, 0.001f, this, tr("LP res")),
|
||||
m_hpFeqModel(31.f, 20.f, 20000, 0.001f, this, tr("HP freq")),
|
||||
m_lowShelfFreqModel(80.f, 20.f, 20000, 0.001f, this, tr("Low-shelf freq")),
|
||||
m_para1FreqModel(120.f, 20.f, 20000, 0.001f, this, tr("Peak 1 freq")),
|
||||
m_para2FreqModel(250.f, 20.f, 20000, 0.001f, this, tr("Peak 2 freq")),
|
||||
m_para3FreqModel(2000.f, 20.f, 20000, 0.001f, this, tr("Peak 3 freq")),
|
||||
m_para4FreqModel(4000.f, 20.f, 20000, 0.001f, this, tr("Peak 4 freq")),
|
||||
m_highShelfFreqModel(12000.f, 20.f, 20000, 0.001f, this, tr("High-shelf freq")),
|
||||
m_lpFreqModel(18000.f, 20.f, 20000, 0.001f, this, tr("LP freq")),
|
||||
m_hpActiveModel( false, this , tr( "HP active" ) ),
|
||||
m_lowShelfActiveModel( false, this , tr( "Low-shelf active" ) ),
|
||||
m_para1ActiveModel( false, this , tr( "Peak 1 active" ) ),
|
||||
|
||||
@@ -581,17 +581,8 @@ void EqHandle::wheelEvent( QGraphicsSceneWheelEvent *wevent )
|
||||
|
||||
if( wevent->orientation() == Qt::Vertical )
|
||||
{
|
||||
m_resonance = m_resonance + ( numSteps );
|
||||
m_resonance = std::clamp(m_resonance + numSteps, 0.1f, highestBandwich);
|
||||
|
||||
if( m_resonance < 0.1 )
|
||||
{
|
||||
m_resonance = 0.1;
|
||||
}
|
||||
|
||||
if( m_resonance > highestBandwich )
|
||||
{
|
||||
m_resonance = highestBandwich;
|
||||
}
|
||||
emit positionChanged();
|
||||
}
|
||||
wevent->accept();
|
||||
|
||||
@@ -67,7 +67,7 @@ private slots:
|
||||
{
|
||||
const float opl = getPeak_L();
|
||||
const float opr = getPeak_R();
|
||||
const float fallOff = 1.07;
|
||||
const float fallOff = 1.07f;
|
||||
if( *m_lPeak > opl )
|
||||
{
|
||||
setPeak_L( *m_lPeak );
|
||||
|
||||
@@ -49,10 +49,10 @@ EqAnalyser::EqAnalyser() :
|
||||
|
||||
//initialize Blackman-Harris window, constants taken from
|
||||
//https://en.wikipedia.org/wiki/Window_function#A_list_of_window_functions
|
||||
const float a0 = 0.35875;
|
||||
const float a1 = 0.48829;
|
||||
const float a2 = 0.14128;
|
||||
const float a3 = 0.01168;
|
||||
const float a0 = 0.35875f;
|
||||
const float a1 = 0.48829f;
|
||||
const float a2 = 0.14128f;
|
||||
const float a3 = 0.01168f;
|
||||
|
||||
for (int i = 0; i < FFT_BUFFER_SIZE; i++)
|
||||
{
|
||||
@@ -230,7 +230,7 @@ void EqSpectrumView::paintEvent(QPaintEvent *event)
|
||||
float *bands = m_analyser->m_bands;
|
||||
m_path.moveTo( 0, height() );
|
||||
m_peakSum = 0;
|
||||
const float fallOff = 1.07;
|
||||
const float fallOff = 1.07f;
|
||||
for( int x = 0; x < MAX_BANDS; ++x, ++bands )
|
||||
{
|
||||
float peak = *bands != 0. ? (fh * 2.0 / 3.0 * (20. * log10(*bands / energy) - LOWER_Y) / (-LOWER_Y)) : 0.;
|
||||
@@ -305,4 +305,4 @@ void EqSpectrumView::periodicalUpdate()
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
} // namespace lmms
|
||||
|
||||
@@ -36,12 +36,12 @@ namespace lmms
|
||||
FlangerControls::FlangerControls( FlangerEffect *effect ) :
|
||||
EffectControls ( effect ),
|
||||
m_effect ( effect ),
|
||||
m_delayTimeModel(0.001, 0.0001, 0.050, 0.0001, this, tr( "Delay samples" ) ),
|
||||
m_lfoFrequencyModel( 0.25, 0.01, 60, 0.0001, 60000.0, this, tr( "LFO frequency" ) ),
|
||||
m_lfoAmountModel( 0.0, 0.0, 0.0025, 0.0001, this, tr( "Amount" ) ),
|
||||
m_lfoPhaseModel( 90.0, 0.0, 360.0, 0.0001, this, tr( "Stereo phase" ) ),
|
||||
m_feedbackModel( 0.0, -1.0, 1.0, 0.0001, this, tr( "Feedback" ) ),
|
||||
m_whiteNoiseAmountModel( 0.0, 0.0, 0.05, 0.0001, this, tr( "Noise" ) ),
|
||||
m_delayTimeModel(0.001f, 0.0001f, 0.050f, 0.0001f, this, tr("Delay samples")),
|
||||
m_lfoFrequencyModel(0.25f, 0.01f, 60, 0.0001f, 60000.f, this, tr("LFO frequency")),
|
||||
m_lfoAmountModel(0.f, 0.f, 0.0025f, 0.0001f, this, tr("Amount")),
|
||||
m_lfoPhaseModel(90.f, 0.f, 360.f, 0.0001f, this, tr("Stereo phase")),
|
||||
m_feedbackModel(0.f, -1.f, 1.f, 0.0001f, this, tr("Feedback")),
|
||||
m_whiteNoiseAmountModel(0.f, 0.f, 0.05f, 0.0001f, this, tr("Noise")),
|
||||
m_invertFeedbackModel ( false, this, tr( "Invert" ) )
|
||||
|
||||
{
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace lmms
|
||||
MonoDelay::MonoDelay( int maxTime , int sampleRate )
|
||||
{
|
||||
m_buffer = 0;
|
||||
m_maxTime = maxTime;
|
||||
m_maxTime = static_cast<float>(maxTime);
|
||||
m_maxLength = maxTime * sampleRate;
|
||||
m_length = m_maxLength;
|
||||
m_length = static_cast<float>(m_maxLength);
|
||||
|
||||
m_writeIndex = 0;
|
||||
m_feedback = 0.0f;
|
||||
@@ -57,7 +57,7 @@ MonoDelay::~MonoDelay()
|
||||
void MonoDelay::tick( sample_t* sample )
|
||||
{
|
||||
m_writeIndex = ( m_writeIndex + 1 ) % ( int )m_maxLength;
|
||||
int readIndex = m_writeIndex - m_length;
|
||||
int readIndex = m_writeIndex - static_cast<int>(m_length);
|
||||
if (readIndex < 0 ) { readIndex += m_maxLength; }
|
||||
float out = m_buffer[ readIndex ];
|
||||
m_buffer[ m_writeIndex ] = *sample + ( out * m_feedback );
|
||||
|
||||
@@ -57,8 +57,8 @@ LOMMEffect::LOMMEffect(Model* parent, const Descriptor::SubPluginFeatures::Key*
|
||||
m_hp2(m_sampleRate),
|
||||
m_ap(m_sampleRate),
|
||||
m_needsUpdate(true),
|
||||
m_coeffPrecalc(-0.05),
|
||||
m_crestTimeConst(0.999),
|
||||
m_coeffPrecalc(-0.05f),
|
||||
m_crestTimeConst(0.999f),
|
||||
m_lookWrite(0),
|
||||
m_lookBufLength(2)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ bool LOMMEffect::processAudioBuffer(sampleFrame* buf, const fpp_t frames)
|
||||
{
|
||||
m_lp1.setLowpass(m_lommControls.m_split1Model.value());
|
||||
m_hp1.setHighpass(m_lommControls.m_split1Model.value());
|
||||
m_ap.calcFilterCoeffs(m_lommControls.m_split1Model.value(), 0.70710678118);
|
||||
m_ap.calcFilterCoeffs(m_lommControls.m_split1Model.value(), 0.70710678118f);
|
||||
}
|
||||
if (m_needsUpdate || m_lommControls.m_split2Model.isValueChanged())
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
constexpr inline float LOMM_MIN_FLOOR = 0.00012589;// -72 dBFS
|
||||
constexpr inline float LOMM_MIN_FLOOR = 0.00012589f;// -72 dBFS
|
||||
constexpr inline float LOMM_MAX_LOOKAHEAD = 20.f;
|
||||
constexpr inline float LOMM_AUTO_TIME_ADJUST = 5.f;
|
||||
|
||||
|
||||
@@ -35,55 +35,55 @@ namespace lmms
|
||||
LOMMControls::LOMMControls(LOMMEffect* effect) :
|
||||
EffectControls(effect),
|
||||
m_effect(effect),
|
||||
m_depthModel(0.4, 0, 1, 0.00001, this, tr("Depth")),
|
||||
m_timeModel(1, 0, 10, 0.00001, this, tr("Time")),
|
||||
m_inVolModel(0, -48, 48, 0.00001, this, tr("Input Volume")),
|
||||
m_outVolModel(8, -48, 48, 0.00001, this, tr("Output Volume")),
|
||||
m_upwardModel(1, 0, 2, 0.00001, this, tr("Upward Depth")),
|
||||
m_downwardModel(1, 0, 2, 0.00001, this, tr("Downward Depth")),
|
||||
m_split1Model(2500, 20, 20000, 0.01, this, tr("High/Mid Split")),
|
||||
m_split2Model(88.3, 20, 20000, 0.01, this, tr("Mid/Low Split")),
|
||||
m_depthModel(0.4f, 0, 1, 0.00001f, this, tr("Depth")),
|
||||
m_timeModel(1, 0, 10, 0.00001f, this, tr("Time")),
|
||||
m_inVolModel(0, -48, 48, 0.00001f, this, tr("Input Volume")),
|
||||
m_outVolModel(8, -48, 48, 0.00001f, this, tr("Output Volume")),
|
||||
m_upwardModel(1, 0, 2, 0.00001f, this, tr("Upward Depth")),
|
||||
m_downwardModel(1, 0, 2, 0.00001f, this, tr("Downward Depth")),
|
||||
m_split1Model(2500, 20, 20000, 0.01f, this, tr("High/Mid Split")),
|
||||
m_split2Model(88.3f, 20, 20000, 0.01f, this, tr("Mid/Low Split")),
|
||||
m_split1EnabledModel(true, this, tr("Enable High/Mid Split")),
|
||||
m_split2EnabledModel(true, this, tr("Enable Mid/Low Split")),
|
||||
m_band1EnabledModel(true, this, tr("Enable High Band")),
|
||||
m_band2EnabledModel(true, this, tr("Enable Mid Band")),
|
||||
m_band3EnabledModel(true, this, tr("Enable Low Band")),
|
||||
m_inHighModel(0, -48, 48, 0.00001, this, tr("High Input Volume")),
|
||||
m_inMidModel(0, -48, 48, 0.00001, this, tr("Mid Input Volume")),
|
||||
m_inLowModel(0, -48, 48, 0.00001, this, tr("Low Input Volume")),
|
||||
m_outHighModel(4.6, -48, 48, 0.00001, this, tr("High Output Volume")),
|
||||
m_outMidModel(0.0, -48, 48, 0.00001, this, tr("Mid Output Volume")),
|
||||
m_outLowModel(4.6, -48, 48, 0.00001, this, tr("Low Output Volume")),
|
||||
m_aThreshHModel(-30.3, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001, this, tr("Above Threshold High")),
|
||||
m_aThreshMModel(-25.0, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001, this, tr("Above Threshold Mid")),
|
||||
m_aThreshLModel(-28.6, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001, this, tr("Above Threshold Low")),
|
||||
m_aRatioHModel(99.99, 1, 99.99, 0.01, this, tr("Above Ratio High")),
|
||||
m_aRatioMModel(66.7, 1, 99.99, 0.01, this, tr("Above Ratio Mid")),
|
||||
m_aRatioLModel(66.7, 1, 99.99, 0.01, this, tr("Above Ratio Low")),
|
||||
m_bThreshHModel(-35.6, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001, this, tr("Below Threshold High")),
|
||||
m_bThreshMModel(-36.6, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001, this, tr("Below Threshold Mid")),
|
||||
m_bThreshLModel(-35.6, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001, this, tr("Below Threshold Low")),
|
||||
m_bRatioHModel(4.17, 1, 99.99, 0.01, this, tr("Below Ratio High")),
|
||||
m_bRatioMModel(4.17, 1, 99.99, 0.01, this, tr("Below Ratio Mid")),
|
||||
m_bRatioLModel(4.17, 1, 99.99, 0.01, this, tr("Below Ratio Low")),
|
||||
m_atkHModel(13.5, 0, 1000, 0.001, this, tr("Attack High")),
|
||||
m_atkMModel(22.4, 0, 1000, 0.001, this, tr("Attack Mid")),
|
||||
m_atkLModel(47.8, 0, 1000, 0.001, this, tr("Attack Low")),
|
||||
m_relHModel(132, 0, 1000, 0.001, this, tr("Release High")),
|
||||
m_relMModel(282, 0, 1000, 0.001, this, tr("Release Mid")),
|
||||
m_relLModel(282, 0, 1000, 0.001, this, tr("Release Low")),
|
||||
m_rmsTimeModel(10, 0, 500, 0.001, this, tr("RMS Time")),
|
||||
m_kneeModel(6, 0, 36, 0.00001, this, tr("Knee")),
|
||||
m_rangeModel(36, 0, 96, 0.00001, this, tr("Range")),
|
||||
m_balanceModel(0, -18, 18, 0.00001, this, tr("Balance")),
|
||||
m_inHighModel(0, -48, 48, 0.00001f, this, tr("High Input Volume")),
|
||||
m_inMidModel(0, -48, 48, 0.00001f, this, tr("Mid Input Volume")),
|
||||
m_inLowModel(0, -48, 48, 0.00001f, this, tr("Low Input Volume")),
|
||||
m_outHighModel(4.6f, -48, 48, 0.00001f, this, tr("High Output Volume")),
|
||||
m_outMidModel(0.f, -48, 48, 0.00001f, this, tr("Mid Output Volume")),
|
||||
m_outLowModel(4.6f, -48, 48, 0.00001f, this, tr("Low Output Volume")),
|
||||
m_aThreshHModel(-30.3f, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001f, this, tr("Above Threshold High")),
|
||||
m_aThreshMModel(-25.f, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001f, this, tr("Above Threshold Mid")),
|
||||
m_aThreshLModel(-28.6f, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001f, this, tr("Above Threshold Low")),
|
||||
m_aRatioHModel(99.99f, 1, 99.99f, 0.01f, this, tr("Above Ratio High")),
|
||||
m_aRatioMModel(66.7f, 1, 99.99f, 0.01f, this, tr("Above Ratio Mid")),
|
||||
m_aRatioLModel(66.7f, 1, 99.99f, 0.01f, this, tr("Above Ratio Low")),
|
||||
m_bThreshHModel(-35.6f, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001f, this, tr("Below Threshold High")),
|
||||
m_bThreshMModel(-36.6f, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001f, this, tr("Below Threshold Mid")),
|
||||
m_bThreshLModel(-35.6f, LOMM_DISPLAY_MIN, LOMM_DISPLAY_MAX, 0.001f, this, tr("Below Threshold Low")),
|
||||
m_bRatioHModel(4.17f, 1, 99.99f, 0.01f, this, tr("Below Ratio High")),
|
||||
m_bRatioMModel(4.17f, 1, 99.99f, 0.01f, this, tr("Below Ratio Mid")),
|
||||
m_bRatioLModel(4.17f, 1, 99.99f, 0.01f, this, tr("Below Ratio Low")),
|
||||
m_atkHModel(13.5f, 0, 1000, 0.001f, this, tr("Attack High")),
|
||||
m_atkMModel(22.4f, 0, 1000, 0.001f, this, tr("Attack Mid")),
|
||||
m_atkLModel(47.8f, 0, 1000, 0.001f, this, tr("Attack Low")),
|
||||
m_relHModel(132, 0, 1000, 0.001f, this, tr("Release High")),
|
||||
m_relMModel(282, 0, 1000, 0.001f, this, tr("Release Mid")),
|
||||
m_relLModel(282, 0, 1000, 0.001f, this, tr("Release Low")),
|
||||
m_rmsTimeModel(10, 0, 500, 0.001f, this, tr("RMS Time")),
|
||||
m_kneeModel(6, 0, 36, 0.00001f, this, tr("Knee")),
|
||||
m_rangeModel(36, 0, 96, 0.00001f, this, tr("Range")),
|
||||
m_balanceModel(0, -18, 18, 0.00001f, this, tr("Balance")),
|
||||
m_depthScalingModel(true, this, tr("Scale output volume with Depth")),
|
||||
m_stereoLinkModel(false, this, tr("Stereo Link")),
|
||||
m_autoTimeModel(0, 0, 1, 0.00001, this, tr("Auto Time")),
|
||||
m_mixModel(1, 0, 1, 0.00001, this, tr("Mix")),
|
||||
m_autoTimeModel(0, 0, 1, 0.00001f, this, tr("Auto Time")),
|
||||
m_mixModel(1, 0, 1, 0.00001f, this, tr("Mix")),
|
||||
m_feedbackModel(false, this, tr("Feedback")),
|
||||
m_midsideModel(false, this, tr("Mid/Side")),
|
||||
m_lookaheadEnableModel(false, this, tr("Lookahead")),
|
||||
m_lookaheadModel(0.f, 0.f, LOMM_MAX_LOOKAHEAD, 0.01, this, tr("Lookahead Length")),
|
||||
m_lookaheadModel(0.f, 0.f, LOMM_MAX_LOOKAHEAD, 0.01f, this, tr("Lookahead Length")),
|
||||
m_lowSideUpwardSuppressModel(false, this, tr("Suppress upward compression for side band"))
|
||||
{
|
||||
auto models = {&m_timeModel, &m_inVolModel, &m_outVolModel, &m_inHighModel, &m_inMidModel,
|
||||
|
||||
@@ -209,7 +209,7 @@ Lb302Filter3Pole::Lb302Filter3Pole(Lb302FilterKnobState *p_fs) :
|
||||
void Lb302Filter3Pole::recalc()
|
||||
{
|
||||
// DO NOT CALL BASE CLASS
|
||||
vcf_e0 = 0.000001;
|
||||
vcf_e0 = 0.000001f;
|
||||
vcf_e1 = 1.0;
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ Lb302Synth::Lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
accentToggle( false, this, tr( "Accent" ) ),
|
||||
deadToggle( false, this, tr( "Dead" ) ),
|
||||
db24Toggle( false, this, tr( "24dB/oct Filter" ) ),
|
||||
vca_attack(1.0 - 0.96406088),
|
||||
vca_attack(1.f - 0.96406088f),
|
||||
vca_a0(0.5),
|
||||
vca_a(0.),
|
||||
vca_mode(VcaMode::NeverPlayed)
|
||||
|
||||
@@ -865,31 +865,31 @@ inline sample_t MonstroSynth::calcSlope( int slope, sample_t s )
|
||||
MonstroInstrument::MonstroInstrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &monstro_plugin_descriptor ),
|
||||
|
||||
m_osc1Vol( 33.0, 0.0, 200.0, 0.1, this, tr( "Osc 1 volume" ) ),
|
||||
m_osc1Pan( 0.0, -100.0, 100.0, 0.1, this, tr( "Osc 1 panning" ) ),
|
||||
m_osc1Vol(33.f, 0.f, 200.f, 0.1f, this, tr("Osc 1 volume")),
|
||||
m_osc1Pan(0.f, -100.f, 100.f, 0.1f, this, tr("Osc 1 panning")),
|
||||
m_osc1Crs( 0.0, -24.0, 24.0, 1.0, this, tr( "Osc 1 coarse detune" ) ),
|
||||
m_osc1Ftl( 0.0, -100.0, 100.0, 1.0, this, tr( "Osc 1 fine detune left" ) ),
|
||||
m_osc1Ftr( 0.0, -100.0, 100.0, 1.0, this, tr( "Osc 1 fine detune right" ) ),
|
||||
m_osc1Spo( 0.0, -180.0, 180.0, 0.1, this, tr( "Osc 1 stereo phase offset" ) ),
|
||||
m_osc1Pw( 50.0, PW_MIN, PW_MAX, 0.01, this, tr( "Osc 1 pulse width" ) ),
|
||||
m_osc1Spo(0.f, -180.f, 180.f, 0.1f, this, tr("Osc 1 stereo phase offset")),
|
||||
m_osc1Pw(50.f, PW_MIN, PW_MAX, 0.01f, this, tr("Osc 1 pulse width")),
|
||||
m_osc1SSR( false, this, tr( "Osc 1 sync send on rise" ) ),
|
||||
m_osc1SSF( false, this, tr( "Osc 1 sync send on fall" ) ),
|
||||
|
||||
m_osc2Vol( 33.0, 0.0, 200.0, 0.1, this, tr( "Osc 2 volume" ) ),
|
||||
m_osc2Pan( 0.0, -100.0, 100.0, 0.1, this, tr( "Osc 2 panning" ) ),
|
||||
m_osc2Vol(33.f, 0.f, 200.f, 0.1f, this, tr("Osc 2 volume")),
|
||||
m_osc2Pan(0.f, -100.f, 100.f, 0.1f, this, tr("Osc 2 panning")),
|
||||
m_osc2Crs( 0.0, -24.0, 24.0, 1.0, this, tr( "Osc 2 coarse detune" ) ),
|
||||
m_osc2Ftl( 0.0, -100.0, 100.0, 1.0, this, tr( "Osc 2 fine detune left" ) ),
|
||||
m_osc2Ftr( 0.0, -100.0, 100.0, 1.0, this, tr( "Osc 2 fine detune right" ) ),
|
||||
m_osc2Spo( 0.0, -180.0, 180.0, 0.1, this, tr( "Osc 2 stereo phase offset" ) ),
|
||||
m_osc2Spo(0.f, -180.f, 180.f, 0.1f, this, tr("Osc 2 stereo phase offset")),
|
||||
m_osc2Wave( this, tr( "Osc 2 waveform" ) ),
|
||||
m_osc2SyncH( false, this, tr( "Osc 2 sync hard" ) ),
|
||||
m_osc2SyncR( false, this, tr( "Osc 2 sync reverse" ) ),
|
||||
|
||||
m_osc3Vol( 33.0, 0.0, 200.0, 0.1, this, tr( "Osc 3 volume" ) ),
|
||||
m_osc3Pan( 0.0, -100.0, 100.0, 0.1, this, tr( "Osc 3 panning" ) ),
|
||||
m_osc3Vol(33.f, 0.f, 200.f, 0.1f, this, tr("Osc 3 volume")),
|
||||
m_osc3Pan(0.f, -100.f, 100.f, 0.1f, this, tr("Osc 3 panning")),
|
||||
m_osc3Crs( 0.0, -24.0, 24.0, 1.0, this, tr( "Osc 3 coarse detune" ) ),
|
||||
m_osc3Spo( 0.0, -180.0, 180.0, 0.1, this, tr( "Osc 3 Stereo phase offset" ) ),
|
||||
m_osc3Sub( 0.0, -100.0, 100.0, 0.1, this, tr( "Osc 3 sub-oscillator mix" ) ),
|
||||
m_osc3Spo(0.f, -180.f, 180.f, 0.1f, this, tr("Osc 3 Stereo phase offset")),
|
||||
m_osc3Sub(0.f, -100.f, 100.f, 0.1f, this, tr("Osc 3 sub-oscillator mix")),
|
||||
m_osc3Wave1( this, tr( "Osc 3 waveform 1" ) ),
|
||||
m_osc3Wave2( this, tr( "Osc 3 waveform 2" ) ),
|
||||
m_osc3SyncH( false, this, tr( "Osc 3 sync hard" ) ),
|
||||
@@ -897,13 +897,13 @@ MonstroInstrument::MonstroInstrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
m_lfo1Wave( this, tr( "LFO 1 waveform" ) ),
|
||||
m_lfo1Att( 0.0f, 0.0f, 2000.0f, 1.0f, 2000.0f, this, tr( "LFO 1 attack" ) ),
|
||||
m_lfo1Rate( 1.0f, 0.1, 10000.0, 0.1, 10000.0f, this, tr( "LFO 1 rate" ) ),
|
||||
m_lfo1Phs( 0.0, -180.0, 180.0, 0.1, this, tr( "LFO 1 phase" ) ),
|
||||
m_lfo1Rate(1.0f, 0.1f, 10000.f, 0.1f, 10000.0f, this, tr("LFO 1 rate")),
|
||||
m_lfo1Phs(0.f, -180.f, 180.f, 0.1f, this, tr("LFO 1 phase")),
|
||||
|
||||
m_lfo2Wave( this, tr( "LFO 2 waveform" ) ),
|
||||
m_lfo2Att( 0.0f, 0.0f, 2000.0f, 1.0f, 2000.0f, this, tr( "LFO 2 attack" ) ),
|
||||
m_lfo2Rate( 1.0f, 0.1, 10000.0, 0.1, 10000.0f, this, tr( "LFO 2 rate" ) ),
|
||||
m_lfo2Phs( 0.0, -180.0, 180.0, 0.1, this, tr( "LFO 2 phase" ) ),
|
||||
m_lfo2Rate(1.0f, 0.1f, 10000.f, 0.1f, 10000.0f, this, tr("LFO 2 rate")),
|
||||
m_lfo2Phs(0.0, -180.f, 180.f, 0.1f, this, tr("LFO 2 phase")),
|
||||
|
||||
m_env1Pre( 0.0f, 0.0f, 2000.0f, 1.0f, 2000.0f, this, tr( "Env 1 pre-delay" ) ),
|
||||
m_env1Att( 0.0f, 0.0f, 2000.0f, 1.0f, 2000.0f, this, tr( "Env 1 attack" ) ),
|
||||
|
||||
@@ -60,22 +60,22 @@ namespace lmms
|
||||
{
|
||||
|
||||
|
||||
const float NES_SIMPLE_FILTER = 1.0 / 20.0; // simulate nes analog audio output
|
||||
const float NES_SIMPLE_FILTER = 1.f / 20.f; // simulate nes analog audio output
|
||||
const float NFB = 895000.0f;
|
||||
const float NOISE_FREQS[16] =
|
||||
{ NFB/5, NFB/9, NFB/17, NFB/33, NFB/65, NFB/97, NFB/129, NFB/161, NFB/193, NFB/255, NFB/381, NFB/509, NFB/763, NFB/1017, NFB/2035, NFB/4069 };
|
||||
const uint16_t LFSR_INIT = 1;
|
||||
const float DUTY_CYCLE[4] = { 0.125, 0.25, 0.5, 0.75 };
|
||||
const float DITHER_AMP = 1.0 / 60.0;
|
||||
const float DITHER_AMP = 1.f / 60.f;
|
||||
const float MIN_FREQ = 10.0;
|
||||
const int TRIANGLE_WAVETABLE[32] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
|
||||
|
||||
const float NES_DIST = 0.9f; // simulate the slight nonlinear distortion in nes audio output
|
||||
|
||||
const float NES_MIXING_12 = 1.0 / 20.0;
|
||||
const float NES_MIXING_34 = 1.0 / 12.0;
|
||||
const float NES_MIXING_ALL = 1.0 / ( NES_MIXING_12 + NES_MIXING_34 ); // constants to simulate the hardwired mixing values for nes channels
|
||||
const float NES_MIXING_12 = 1.f / 20.f;
|
||||
const float NES_MIXING_34 = 1.f / 12.f;
|
||||
const float NES_MIXING_ALL = 1.f / (NES_MIXING_12 + NES_MIXING_34); // constants to simulate the hardwired mixing values for nes channels
|
||||
|
||||
const int MIN_WLEN = 4;
|
||||
|
||||
|
||||
@@ -770,15 +770,15 @@ void OpulenzInstrumentView::updateKnobHints()
|
||||
// Envelope times in ms: t[0] = 0, t[n] = ( 1<<n ) * X, X = 0.11597 for A, 0.6311 for D/R
|
||||
// Here some rounding has been applied.
|
||||
const auto attack_times = std::array<float, 16>{
|
||||
0.0, 0.2, 0.4, 0.9, 1.8, 3.7, 7.4,
|
||||
15.0, 30.0, 60.0, 120.0, 240.0, 480.0,
|
||||
950.0, 1900.0, 3800.0
|
||||
0.f, 0.2f, 0.4f, 0.9f, 1.8f, 3.7f, 7.4f,
|
||||
15.f, 30.f, 60.f, 120.f, 240.f, 480.f,
|
||||
950.f, 1900.f, 3800.f
|
||||
};
|
||||
|
||||
const auto dr_times = std::array<float, 16>{
|
||||
0.0, 1.2, 2.5, 5.0, 10.0, 20.0, 40.0,
|
||||
80.0, 160.0, 320.0, 640.0, 1300.0, 2600.0,
|
||||
5200.0, 10000.0, 20000.0
|
||||
0.f, 1.2f, 2.5f, 5.f, 10.f, 20.f, 40.f,
|
||||
80.f, 160.f, 320.f, 640.f, 1300.f, 2600.f,
|
||||
5200.f, 10000.f, 20000.f
|
||||
};
|
||||
|
||||
const auto fmultipliers = std::array<int, 16>{
|
||||
|
||||
@@ -38,14 +38,14 @@ PeakControllerEffectControls::
|
||||
PeakControllerEffectControls( PeakControllerEffect * _eff ) :
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff ),
|
||||
m_baseModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Base value" ) ),
|
||||
m_amountModel( 1.0, -1.0, 1.0, 0.005, this, tr( "Modulation amount" ) ),
|
||||
m_attackModel( 0, 0, 0.999, 0.001, this, tr( "Attack" ) ),
|
||||
m_decayModel( 0, 0, 0.999, 0.001, this, tr( "Release" ) ),
|
||||
m_tresholdModel( 0, 0, 1.0, 0.001, this, tr( "Treshold" ) ),
|
||||
m_baseModel(0.5f, 0.f, 1.f, 0.001f, this, tr("Base value")),
|
||||
m_amountModel(1.f, -1.f, 1.f, 0.005f, this, tr("Modulation amount")),
|
||||
m_attackModel(0, 0, 0.999f, 0.001f, this, tr("Attack")),
|
||||
m_decayModel(0, 0, 0.999f, 0.001f, this, tr("Release")),
|
||||
m_tresholdModel(0, 0, 1.f, 0.001f, this, tr("Treshold")),
|
||||
m_muteModel( false, this, tr( "Mute output" ) ),
|
||||
m_absModel( true, this, tr("Absolute value") ),
|
||||
m_amountMultModel( 1.0, 0, 32, 0.2, this, tr("Amount multiplicator") )
|
||||
m_amountMultModel(1.f, 0, 32, 0.2f, this, tr("Amount multiplicator"))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ int sp_dcblock_init(sp_data *sp, sp_dcblock *p, int oversampling )
|
||||
p->inputs = 0.0;
|
||||
p->gain = pow( 0.99, 1.0f / oversampling );
|
||||
if (p->gain == 0.0 || p->gain>=1.0 || p->gain<=-1.0)
|
||||
p->gain = 0.99;
|
||||
p->gain = 0.99f;
|
||||
return SP_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "base.h"
|
||||
#include "revsc.h"
|
||||
|
||||
#define DEFAULT_SRATE 44100.0
|
||||
#define DEFAULT_SRATE 44100.f
|
||||
#define MIN_SRATE 5000.0
|
||||
#define MAX_SRATE 1000000.0
|
||||
#define MAX_PITCHMOD 20.0
|
||||
@@ -34,20 +34,20 @@
|
||||
/* reverbParams[n][3] = random seed (0 - 32767) */
|
||||
|
||||
static const SPFLOAT reverbParams[8][4] = {
|
||||
{ (2473.0 / DEFAULT_SRATE), 0.0010, 3.100, 1966.0 },
|
||||
{ (2767.0 / DEFAULT_SRATE), 0.0011, 3.500, 29491.0 },
|
||||
{ (3217.0 / DEFAULT_SRATE), 0.0017, 1.110, 22937.0 },
|
||||
{ (3557.0 / DEFAULT_SRATE), 0.0006, 3.973, 9830.0 },
|
||||
{ (3907.0 / DEFAULT_SRATE), 0.0010, 2.341, 20643.0 },
|
||||
{ (4127.0 / DEFAULT_SRATE), 0.0011, 1.897, 22937.0 },
|
||||
{ (2143.0 / DEFAULT_SRATE), 0.0017, 0.891, 29491.0 },
|
||||
{ (1933.0 / DEFAULT_SRATE), 0.0006, 3.221, 14417.0 }
|
||||
{ (2473.f / DEFAULT_SRATE), 0.0010f, 3.100f, 1966.f },
|
||||
{ (2767.f / DEFAULT_SRATE), 0.0011f, 3.500f, 29491.f },
|
||||
{ (3217.f / DEFAULT_SRATE), 0.0017f, 1.110f, 22937.f },
|
||||
{ (3557.f / DEFAULT_SRATE), 0.0006f, 3.973f, 9830.f },
|
||||
{ (3907.f / DEFAULT_SRATE), 0.0010f, 2.341f, 20643.f },
|
||||
{ (4127.f / DEFAULT_SRATE), 0.0011f, 1.897f, 22937.f },
|
||||
{ (2143.f / DEFAULT_SRATE), 0.0017f, 0.891f, 29491.f },
|
||||
{ (1933.f / DEFAULT_SRATE), 0.0006f, 3.221f, 14417.f }
|
||||
};
|
||||
|
||||
static int delay_line_max_samples(SPFLOAT sr, SPFLOAT iPitchMod, int n);
|
||||
static int init_delay_line(sp_revsc *p, sp_revsc_dl *lp, int n);
|
||||
static int delay_line_bytes_alloc(SPFLOAT sr, SPFLOAT iPitchMod, int n);
|
||||
static const SPFLOAT outputGain = 0.35;
|
||||
static const SPFLOAT outputGain = 0.35f;
|
||||
static const SPFLOAT jpScale = 0.25;
|
||||
int sp_revsc_create(sp_revsc **p){
|
||||
*p = malloc(sizeof(sp_revsc));
|
||||
@@ -56,9 +56,9 @@ int sp_revsc_create(sp_revsc **p){
|
||||
|
||||
int sp_revsc_init(sp_data *sp, sp_revsc *p)
|
||||
{
|
||||
p->iSampleRate = sp->sr;
|
||||
p->sampleRate = sp->sr;
|
||||
p->feedback = 0.97;
|
||||
p->iSampleRate = (float) sp->sr;
|
||||
p->sampleRate = (float) sp->sr;
|
||||
p->feedback = 0.97f;
|
||||
p->lpfreq = 10000;
|
||||
p->iPitchMod = 1;
|
||||
p->iSkipInit = 0;
|
||||
@@ -67,14 +67,14 @@ int sp_revsc_init(sp_data *sp, sp_revsc *p)
|
||||
p->initDone = 1;
|
||||
int i, nBytes = 0;
|
||||
for(i = 0; i < 8; i++){
|
||||
nBytes += delay_line_bytes_alloc(sp->sr, 1, i);
|
||||
nBytes += delay_line_bytes_alloc((float) sp->sr, 1, i);
|
||||
}
|
||||
sp_auxdata_alloc(&p->aux, nBytes);
|
||||
nBytes = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
p->delayLines[i].buf = (SPFLOAT*) (((char*) p->aux.ptr) + nBytes);
|
||||
init_delay_line(p, &p->delayLines[i], i);
|
||||
nBytes += delay_line_bytes_alloc(sp->sr, 1, i);
|
||||
nBytes += delay_line_bytes_alloc((float) sp->sr, 1, i);
|
||||
}
|
||||
|
||||
return SP_OK;
|
||||
@@ -217,7 +217,7 @@ int sp_revsc_compute(sp_data *sp, sp_revsc *p, SPFLOAT *in1, SPFLOAT *in2, SPFLO
|
||||
|
||||
/* calculate interpolation coefficients */
|
||||
|
||||
a2 = frac * frac; a2 -= 1.0; a2 *= (1.0 / 6.0);
|
||||
a2 = frac * frac; a2 -= 1.0; a2 *= (1.f / 6.f);
|
||||
a1 = frac; a1 += 1.0; a1 *= 0.5; am1 = a1 - 1.0;
|
||||
a0 = 3.0 * a2; a1 -= a0; am1 -= a2; a0 -= frac;
|
||||
|
||||
|
||||
@@ -136,14 +136,14 @@ Sf2Instrument::Sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
m_gain( 1.0f, 0.0f, 5.0f, 0.01f, this, tr( "Gain" ) ),
|
||||
m_reverbOn( false, this, tr( "Reverb" ) ),
|
||||
m_reverbRoomSize( FLUID_REVERB_DEFAULT_ROOMSIZE, 0, 1.0, 0.01f, this, tr( "Reverb room size" ) ),
|
||||
m_reverbDamping( FLUID_REVERB_DEFAULT_DAMP, 0, 1.0, 0.01, this, tr( "Reverb damping" ) ),
|
||||
m_reverbDamping(FLUID_REVERB_DEFAULT_DAMP, 0, 1.f, 0.01f, this, tr("Reverb damping")),
|
||||
m_reverbWidth( FLUID_REVERB_DEFAULT_WIDTH, 0, 1.0, 0.01f, this, tr( "Reverb width" ) ),
|
||||
m_reverbLevel( FLUID_REVERB_DEFAULT_LEVEL, 0, 1.0, 0.01f, this, tr( "Reverb level" ) ),
|
||||
m_chorusOn( false, this, tr( "Chorus" ) ),
|
||||
m_chorusNum( FLUID_CHORUS_DEFAULT_N, 0, 10.0, 1.0, this, tr( "Chorus voices" ) ),
|
||||
m_chorusLevel( FLUID_CHORUS_DEFAULT_LEVEL, 0, 10.0, 0.01, this, tr( "Chorus level" ) ),
|
||||
m_chorusSpeed( FLUID_CHORUS_DEFAULT_SPEED, 0.29, 5.0, 0.01, this, tr( "Chorus speed" ) ),
|
||||
m_chorusDepth( FLUID_CHORUS_DEFAULT_DEPTH, 0, 46.0, 0.05, this, tr( "Chorus depth" ) )
|
||||
m_chorusLevel(FLUID_CHORUS_DEFAULT_LEVEL, 0, 10.f, 0.01f, this, tr("Chorus level")),
|
||||
m_chorusSpeed(FLUID_CHORUS_DEFAULT_SPEED, 0.29f, 5.f, 0.01f, this, tr("Chorus speed")),
|
||||
m_chorusDepth(FLUID_CHORUS_DEFAULT_DEPTH, 0, 46.f, 0.05f, this, tr("Chorus depth"))
|
||||
{
|
||||
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ class SfxrZeroToOneFloatModel : public FloatModel
|
||||
{
|
||||
public:
|
||||
SfxrZeroToOneFloatModel( float val, Model * parent, const QString& displayName ):
|
||||
FloatModel( val, 0.0, 1.0, 0.001, parent, displayName )
|
||||
FloatModel(val, 0.f, 1.f, 0.001f, parent, displayName)
|
||||
{
|
||||
}
|
||||
/* purpose: prevent the initial value of the model from being changed */
|
||||
@@ -156,7 +156,7 @@ class SfxrNegPosOneFloatModel : public FloatModel
|
||||
{
|
||||
public:
|
||||
SfxrNegPosOneFloatModel(float val, Model * parent, const QString& displayName ):
|
||||
FloatModel( val, -1.0, 1.0, 0.001, parent, displayName )
|
||||
FloatModel(val, -1.f, 1.f, 0.001f, parent, displayName)
|
||||
{
|
||||
}
|
||||
/* purpose: prevent the initial value of the model from being changed */
|
||||
|
||||
@@ -197,7 +197,7 @@ void SlicerT::findSlices()
|
||||
|
||||
int lastPoint = -minDist - 1; // to always store 0 first
|
||||
float spectralFlux = 0;
|
||||
float prevFlux = 1E-10; // small value, no divison by zero
|
||||
float prevFlux = 1E-10f; // small value, no divison by zero
|
||||
|
||||
for (int i = 0; i < singleChannel.size() - windowSize; i += windowSize)
|
||||
{
|
||||
@@ -227,7 +227,7 @@ void SlicerT::findSlices()
|
||||
}
|
||||
|
||||
prevFlux = spectralFlux;
|
||||
spectralFlux = 1E-10; // again for no divison by zero
|
||||
spectralFlux = 1E-10f; // again for no divison by zero
|
||||
}
|
||||
|
||||
m_slicePoints.push_back(m_originalSample.sampleSize());
|
||||
|
||||
@@ -742,7 +742,7 @@ std::vector<std::pair<float, std::string>> SaSpectrumView::makeLogAmpTics(int lo
|
||||
|
||||
// Generate n dB increments, start checking at -90 dB. Limits are tweaked
|
||||
// just a little bit to make sure float comparisons do not miss edges.
|
||||
for (float i = 0.000000001; 10 * log10(i) <= (high + 0.001); i *= increment)
|
||||
for (float i = 0.000000001f; 10 * log10(i) <= (high + 0.001); i *= increment)
|
||||
{
|
||||
if (10 * log10(i) >= (low - 0.001))
|
||||
{
|
||||
|
||||
@@ -218,8 +218,7 @@ std::vector<std::pair<float, std::string>> SaWaterfallView::makeTimeTics()
|
||||
float limit = yPixelToTime(m_displayBottom, m_displayHeight);
|
||||
|
||||
// set increment to about 30 pixels (but min. 0.1 s)
|
||||
float increment = std::round(10 * limit / (m_displayHeight / 30)) / 10;
|
||||
if (increment < 0.1) {increment = 0.1;}
|
||||
const float increment = std::max(std::round(10 * limit / (m_displayHeight / 30)) / 10, 0.1f);
|
||||
|
||||
// NOTE: labels positions are rounded to match the (rounded) label value
|
||||
for (float i = 0; i <= limit; i += increment)
|
||||
|
||||
@@ -114,7 +114,7 @@ MalletsInstrument::MalletsInstrument( InstrumentTrack * _instrument_track ):
|
||||
|
||||
// TubeBell
|
||||
m_presetsModel.addItem( tr( "Tubular bells" ) );
|
||||
m_scalers.append( 1.8 );
|
||||
m_scalers.append(1.8f);
|
||||
|
||||
// BandedWG
|
||||
m_presetsModel.addItem( tr( "Uniform bar" ) );
|
||||
|
||||
Reference in New Issue
Block a user