Merge branch 'master' into ed_refac
This commit is contained in:
@@ -15,7 +15,7 @@ INCLUDE(FindPkgConfig)
|
||||
|
||||
SET(VERSION_MAJOR "1")
|
||||
SET(VERSION_MINOR "0")
|
||||
SET(VERSION_PATCH "98")
|
||||
SET(VERSION_PATCH "100")
|
||||
#SET(VERSION_SUFFIX "")
|
||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
IF(VERSION_SUFFIX)
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE lmms-project>
|
||||
<lmms-project version="1.0" creator="LMMS" creatorversion="1.0.98" type="instrumenttracksettings">
|
||||
<lmms-project version="1.0" creator="LMMS" creatorversion="1.0.99" type="instrumenttracksettings">
|
||||
<head/>
|
||||
<instrumenttracksettings muted="0" type="0" name="Kick power" solo="0">
|
||||
<instrumenttrack pan="0" fxch="0" scale_type="linear" pitchrange="1" pitch="0" basenote="57" vol="100">
|
||||
<instrumenttrack pan="0" fxch="0" pitchrange="1" pitch="0" basenote="57" vol="100">
|
||||
<instrument name="kicker">
|
||||
<kicker decay_numerator="4" decay_denominator="4" distend="0.8" click="0.25" endnote="0" version="1" decay="594" syncmode="0" noise="0" slope="0.33" dist="1.2" env="0.163" scale_type="linear" startnote="0" startfreq="130" endfreq="5" gain="1"/>
|
||||
<kicker decay_numerator="4" decay_denominator="4" distend="0.8" click="0.25" endnote="0" version="1" decay="360" syncmode="0" noise="0.2" slope="0.372" dist="1.2" env="0.163" startnote="0" startfreq="145" endfreq="30" gain="1"/>
|
||||
</instrument>
|
||||
<eldata scale_type="linear" fres="0.5" ftype="0" fcut="14000" fwet="0">
|
||||
<elvol lspd_denominator="4" sustain="0.5" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4" scale_type="linear"/>
|
||||
<elcut lspd_denominator="4" sustain="0.5" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4" scale_type="linear"/>
|
||||
<elres lspd_denominator="4" sustain="0.5" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4" scale_type="linear"/>
|
||||
<eldata fres="0.5" ftype="0" fcut="14000" fwet="0">
|
||||
<elvol lspd_denominator="4" sustain="0.5" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4"/>
|
||||
<elcut lspd_denominator="4" sustain="0.5" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4"/>
|
||||
<elres lspd_denominator="4" sustain="0.5" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4"/>
|
||||
</eldata>
|
||||
<chordcreator chord="0" scale_type="linear" chordrange="1" chord-enabled="0"/>
|
||||
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" scale_type="linear" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
|
||||
<midiport inputcontroller="0" fixedoutputvelocity="-1" inputchannel="0" scale_type="linear" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
|
||||
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
|
||||
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
|
||||
<midiport inputcontroller="0" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
|
||||
<fxchain numofeffects="0" enabled="0"/>
|
||||
</instrumenttrack>
|
||||
</instrumenttracksettings>
|
||||
161
data/presets/Kicker/SnareMarch.xpf
Normal file
161
data/presets/Kicker/SnareMarch.xpf
Normal file
@@ -0,0 +1,161 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE lmms-project>
|
||||
<lmms-project version="1.0" creator="LMMS" creatorversion="1.0.99" type="instrumenttracksettings">
|
||||
<head/>
|
||||
<instrumenttracksettings muted="0" type="0" name="Snare March" solo="0">
|
||||
<instrumenttrack pan="0" fxch="0" pitchrange="1" pitch="0" basenote="57" vol="100">
|
||||
<instrument name="kicker">
|
||||
<kicker decay_numerator="4" decay_denominator="4" distend="0" click="1" endnote="0" version="1" decay="240" syncmode="0" noise="0.85" slope="1" dist="0" env="0.644" startnote="0" startfreq="229" endfreq="195" gain="1"/>
|
||||
</instrument>
|
||||
<eldata fres="0.56" ftype="3" fcut="929" fwet="1">
|
||||
<elvol lspd_denominator="4" sustain="0.294" pdel="0" userwavefile="" dec="0.453" lamt="0" syncmode="0" latt="0" rel="0.1" amt="1" x100="0" att="0" lpdel="0" hold="0" lshp="2" lspd="0.0997" ctlenvamt="0" lspd_numerator="4"/>
|
||||
<elcut lspd_denominator="4" sustain="0.5" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="2" lspd="0.001" ctlenvamt="0" lspd_numerator="4"/>
|
||||
<elres lspd_denominator="4" sustain="0.5" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4"/>
|
||||
</eldata>
|
||||
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
|
||||
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
|
||||
<midiport inputcontroller="0" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
|
||||
<fxchain numofeffects="6" enabled="1">
|
||||
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="1" gate="0" name="ladspaeffect" wet="1" on="1">
|
||||
<ladspacontrols ports="10">
|
||||
<port02 data="0"/>
|
||||
<port03 data="0"/>
|
||||
<port04 data="2.07"/>
|
||||
<port05 data="3.51"/>
|
||||
<port06 data="-47.97"/>
|
||||
<port07 data="-12.69"/>
|
||||
<port08 data="-47.97"/>
|
||||
<port09 data="-47.34"/>
|
||||
<port010 data="-47.97"/>
|
||||
<port011 data="9.99"/>
|
||||
</ladspacontrols>
|
||||
<key>
|
||||
<attribute value="caps" name="file"/>
|
||||
<attribute value="Eq2x2" name="plugin"/>
|
||||
</key>
|
||||
</effect>
|
||||
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="1" gate="0" name="ladspaeffect" wet="0.5" on="0">
|
||||
<ladspacontrols ports="4">
|
||||
<port02 data="0.370265"/>
|
||||
<port03 data="0"/>
|
||||
<port04 data="0.9995"/>
|
||||
<port05 data="0.10875"/>
|
||||
</ladspacontrols>
|
||||
<key>
|
||||
<attribute value="caps" name="file"/>
|
||||
<attribute value="Plate2x2" name="plugin"/>
|
||||
</key>
|
||||
</effect>
|
||||
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="1" gate="0" name="ladspaeffect" wet="1" on="1">
|
||||
<ladspacontrols ports="9">
|
||||
<port07>
|
||||
<data scale_type="log" value="0.4" id="6315252"/>
|
||||
</port07>
|
||||
<port08>
|
||||
<data scale_type="log" value="2000.25" id="2498139"/>
|
||||
</port08>
|
||||
<port09 data="0"/>
|
||||
<port010 data="1"/>
|
||||
<port011 data="0.5"/>
|
||||
<port012 data="1"/>
|
||||
<port013 data="0"/>
|
||||
<port014>
|
||||
<data scale_type="log" value="659.34" id="5231681"/>
|
||||
</port014>
|
||||
<port015>
|
||||
<data scale_type="log" value="4862.63" id="1579810"/>
|
||||
</port015>
|
||||
</ladspacontrols>
|
||||
<key>
|
||||
<attribute value="calf" name="file"/>
|
||||
<attribute value="Reverb" name="plugin"/>
|
||||
</key>
|
||||
</effect>
|
||||
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="1" gate="0" name="ladspaeffect" wet="0.18" on="1">
|
||||
<ladspacontrols ports="13">
|
||||
<port04 data="0"/>
|
||||
<port05 data="1.02375"/>
|
||||
<port06 data="0.96"/>
|
||||
<port07 data="0.50125"/>
|
||||
<port012 data="5.049"/>
|
||||
<port013 data="10"/>
|
||||
<port015>
|
||||
<data scale_type="log" value="20000" id="8103466"/>
|
||||
</port015>
|
||||
<port016>
|
||||
<data scale_type="log" value="10" id="4889780"/>
|
||||
</port016>
|
||||
<port017>
|
||||
<data scale_type="log" value="20000" id="6261168"/>
|
||||
</port017>
|
||||
<port018>
|
||||
<data scale_type="log" value="10" id="4037431"/>
|
||||
</port018>
|
||||
<port019>
|
||||
<data scale_type="log" value="215.82" id="6293968"/>
|
||||
</port019>
|
||||
<port020 data="15.9973"/>
|
||||
<port021>
|
||||
<data scale_type="log" value="0.9999" id="2846145"/>
|
||||
</port021>
|
||||
</ladspacontrols>
|
||||
<key>
|
||||
<attribute value="calf" name="file"/>
|
||||
<attribute value="Saturator" name="plugin"/>
|
||||
</key>
|
||||
</effect>
|
||||
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="1" gate="0" name="ladspaeffect" wet="1" on="1">
|
||||
<ladspacontrols ports="13">
|
||||
<port04 data="0"/>
|
||||
<port05 data="1.02375"/>
|
||||
<port06 data="0.96"/>
|
||||
<port07 data="1"/>
|
||||
<port012 data="5.049"/>
|
||||
<port013 data="10"/>
|
||||
<port015>
|
||||
<data scale_type="log" value="20000" id="7709628"/>
|
||||
</port015>
|
||||
<port016>
|
||||
<data scale_type="log" value="10" id="7480205"/>
|
||||
</port016>
|
||||
<port017>
|
||||
<data scale_type="log" value="20000" id="4036038"/>
|
||||
</port017>
|
||||
<port018>
|
||||
<data scale_type="log" value="10" id="1042561"/>
|
||||
</port018>
|
||||
<port019>
|
||||
<data scale_type="log" value="721.71" id="92193"/>
|
||||
</port019>
|
||||
<port020 data="1.31484"/>
|
||||
<port021>
|
||||
<data scale_type="log" value="0.100237" id="7520542"/>
|
||||
</port021>
|
||||
</ladspacontrols>
|
||||
<key>
|
||||
<attribute value="calf" name="file"/>
|
||||
<attribute value="Saturator" name="plugin"/>
|
||||
</key>
|
||||
</effect>
|
||||
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="1" gate="0" name="ladspaeffect" wet="1" on="1">
|
||||
<ladspacontrols ports="10">
|
||||
<port02 data="-47.97"/>
|
||||
<port03 data="-10.8"/>
|
||||
<port04 data="0"/>
|
||||
<port05 data="0"/>
|
||||
<port06 data="0"/>
|
||||
<port07 data="0"/>
|
||||
<port08 data="0"/>
|
||||
<port09 data="0"/>
|
||||
<port010 data="0.72"/>
|
||||
<port011 data="2.52"/>
|
||||
</ladspacontrols>
|
||||
<key>
|
||||
<attribute value="caps" name="file"/>
|
||||
<attribute value="Eq2x2" name="plugin"/>
|
||||
</key>
|
||||
</effect>
|
||||
</fxchain>
|
||||
</instrumenttrack>
|
||||
</instrumenttracksettings>
|
||||
</lmms-project>
|
||||
21
data/presets/Kicker/TR909-RimShot.xpf
Normal file
21
data/presets/Kicker/TR909-RimShot.xpf
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE lmms-project>
|
||||
<lmms-project version="1.0" creator="LMMS" creatorversion="1.0.98" type="instrumenttracksettings">
|
||||
<head/>
|
||||
<instrumenttracksettings muted="0" type="0" name="TR909-RimShot" solo="0">
|
||||
<instrumenttrack pan="0" fxch="0" pitchrange="1" pitch="0" basenote="57" vol="100">
|
||||
<instrument name="kicker">
|
||||
<kicker decay_numerator="4" decay_denominator="4" distend="0.8" click="0.15" endnote="0" version="1" decay="40" syncmode="0" noise="0.13" slope="0.265" dist="100" env="0.044" startnote="0" startfreq="330" endfreq="5" gain="0.75"/>
|
||||
</instrument>
|
||||
<eldata fres="2.75" ftype="1" fcut="100" fwet="1">
|
||||
<elvol lspd_denominator="4" sustain="0" pdel="0" userwavefile="" dec="0.2" lamt="1" syncmode="7" latt="0.1" rel="0" amt="1" x100="0" att="0" lpdel="0" hold="0" lshp="0" lspd="0.0027" ctlenvamt="0" lspd_numerator="4"/>
|
||||
<elcut lspd_denominator="4" sustain="0" pdel="0" userwavefile="" dec="0" lamt="0" syncmode="6" latt="0" rel="0" amt="0.2" x100="0" att="0" lpdel="0" hold="0.2" lshp="1" lspd="0.0054" ctlenvamt="0" lspd_numerator="4"/>
|
||||
<elres lspd_denominator="4" sustain="0" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0" amt="0.2" x100="0" att="0" lpdel="0" hold="0" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4"/>
|
||||
</eldata>
|
||||
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
|
||||
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
|
||||
<midiport inputcontroller="0" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
|
||||
<fxchain numofeffects="0" enabled="0"/>
|
||||
</instrumenttrack>
|
||||
</instrumenttracksettings>
|
||||
</lmms-project>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* AutomatableSlider.h - class automatableSlider, a QSlider with automation
|
||||
* AutomatableSlider.h - class AutomatableSlider, a QSlider with automation
|
||||
*
|
||||
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
|
||||
@@ -75,68 +75,69 @@ public:
|
||||
inline void setCoeffs( float freq )
|
||||
{
|
||||
// wc
|
||||
const float wc = F_2PI * freq;
|
||||
const float wc2 = wc * wc;
|
||||
const float wc3 = wc2 * wc;
|
||||
const double wc = D_2PI * freq;
|
||||
const double wc2 = wc * wc;
|
||||
const double wc3 = wc2 * wc;
|
||||
m_wc4 = wc2 * wc2;
|
||||
|
||||
// k
|
||||
const float k = wc / tanf( F_PI * freq / m_sampleRate );
|
||||
const float k2 = k * k;
|
||||
const float k3 = k2 * k;
|
||||
const double k = wc / tan( D_PI * freq / m_sampleRate );
|
||||
const double k2 = k * k;
|
||||
const double k3 = k2 * k;
|
||||
m_k4 = k2 * k2;
|
||||
|
||||
// a
|
||||
static const float sqrt2 = sqrtf( 2.0f );
|
||||
const float sq_tmp1 = sqrt2 * wc3 * k;
|
||||
const float sq_tmp2 = sqrt2 * wc * k3;
|
||||
m_a = 4.0f * wc2 * k2 + 2.0f * sq_tmp1 + m_k4 + 2.0f * sq_tmp2 + m_wc4;
|
||||
static const double sqrt2 = sqrt( 2.0 );
|
||||
const double sq_tmp1 = sqrt2 * wc3 * k;
|
||||
const double sq_tmp2 = sqrt2 * wc * k3;
|
||||
|
||||
m_a = 1.0 / ( 4.0 * wc2 * k2 + 2.0 * sq_tmp1 + m_k4 + 2.0 * sq_tmp2 + m_wc4 );
|
||||
|
||||
// b
|
||||
m_b1 = ( 4.0f * ( m_wc4 + sq_tmp1 - m_k4 - sq_tmp2 ) ) / m_a;
|
||||
m_b2 = ( 6.0f * m_wc4 - 8.0f * wc2 * k2 + 6.0f * m_k4 ) / m_a;
|
||||
m_b3 = ( 4.0f * ( m_wc4 - sq_tmp1 + sq_tmp2 - m_k4 ) ) / m_a;
|
||||
m_b4 = ( m_k4 - 2.0f * sq_tmp1 + m_wc4 - 2.0f * sq_tmp2 + 4.0f * wc2 * k2 ) / m_a;
|
||||
m_b1 = ( 4.0 * ( m_wc4 + sq_tmp1 - m_k4 - sq_tmp2 ) ) * m_a;
|
||||
m_b2 = ( 6.0 * m_wc4 - 8.0 * wc2 * k2 + 6.0 * m_k4 ) * m_a;
|
||||
m_b3 = ( 4.0 * ( m_wc4 - sq_tmp1 + sq_tmp2 - m_k4 ) ) * m_a;
|
||||
m_b4 = ( m_k4 - 2.0 * sq_tmp1 + m_wc4 - 2.0 * sq_tmp2 + 4.0 * wc2 * k2 ) * m_a;
|
||||
}
|
||||
|
||||
inline void setLowpass( float freq )
|
||||
{
|
||||
setCoeffs( freq );
|
||||
m_a0 = m_wc4 / m_a;
|
||||
m_a1 = 4.0f * m_a0;
|
||||
m_a2 = 6.0f * m_a0;
|
||||
m_a0 = m_wc4 * m_a;
|
||||
m_a1 = 4.0 * m_a0;
|
||||
m_a2 = 6.0 * m_a0;
|
||||
}
|
||||
|
||||
inline void setHighpass( float freq )
|
||||
{
|
||||
setCoeffs( freq );
|
||||
m_a0 = m_k4 / m_a;
|
||||
m_a1 = 4.0f * m_a0;
|
||||
m_a2 = 6.0f * m_a0;
|
||||
m_a0 = m_k4 * m_a;
|
||||
m_a1 = -4.0 * m_a0;
|
||||
m_a2 = 6.0 * m_a0;
|
||||
}
|
||||
|
||||
inline float update( float in, ch_cnt_t ch )
|
||||
{
|
||||
const float a0in = m_a0 * in;
|
||||
const float a1in = m_a1 * in;
|
||||
const float out = m_z1[ch] + a0in;
|
||||
const double x = in - ( m_z1[ch] * m_b1 ) - ( m_z2[ch] * m_b2 ) -
|
||||
( m_z3[ch] * m_b3 ) - ( m_z4[ch] * m_b4 );
|
||||
const double y = ( m_a0 * x ) + ( m_z1[ch] * m_a1 ) + ( m_z2[ch] * m_a2 ) +
|
||||
( m_z3[ch] * m_a1 ) + ( m_z4[ch] * m_a0 );
|
||||
m_z4[ch] = m_z3[ch];
|
||||
m_z3[ch] = m_z2[ch];
|
||||
m_z2[ch] = m_z1[ch];
|
||||
m_z1[ch] = x;
|
||||
|
||||
m_z1[ch] = a1in + m_z2[ch] - ( m_b1 * out );
|
||||
m_z2[ch] = ( m_a2 * in ) + m_z3[ch] - ( m_b2 * out );
|
||||
m_z3[ch] = a1in + m_z4[ch] - ( m_b3 * out );
|
||||
m_z4[ch] = a0in - ( m_b4 * out );
|
||||
|
||||
return out;
|
||||
return y;
|
||||
}
|
||||
|
||||
private:
|
||||
float m_sampleRate;
|
||||
float m_wc4;
|
||||
float m_k4;
|
||||
float m_a, m_a0, m_a1, m_a2;
|
||||
float m_b1, m_b2, m_b3, m_b4;
|
||||
double m_wc4;
|
||||
double m_k4;
|
||||
double m_a, m_a0, m_a1, m_a2;
|
||||
double m_b1, m_b2, m_b3, m_b4;
|
||||
|
||||
typedef float frame[CHANNELS];
|
||||
typedef double frame[CHANNELS];
|
||||
frame m_z1, m_z2, m_z3, m_z4;
|
||||
};
|
||||
typedef LinkwitzRiley<2> StereoLinkwitzRiley;
|
||||
|
||||
@@ -57,13 +57,14 @@
|
||||
class TextFloat;
|
||||
|
||||
|
||||
class Fader : public QWidget, public FloatModelView
|
||||
class EXPORT Fader : public QWidget, public FloatModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Q_PROPERTY( QColor peakGreen READ peakGreen WRITE setPeakGreen )
|
||||
Q_PROPERTY( QColor peakRed READ peakRed WRITE setPeakRed )
|
||||
Fader( FloatModel * _model, const QString & _name, QWidget * _parent );
|
||||
Fader( FloatModel * _model, const QString & _name, QWidget * _parent, QPixmap * back, QPixmap * leds, QPixmap * knob );
|
||||
virtual ~Fader();
|
||||
|
||||
void setPeak_L( float fPeak );
|
||||
@@ -76,6 +77,17 @@ public:
|
||||
QColor peakRed() const;
|
||||
void setPeakGreen( const QColor & c );
|
||||
void setPeakRed( const QColor & c );
|
||||
|
||||
void setDisplayConversion( bool b )
|
||||
{
|
||||
m_displayConversion = b;
|
||||
}
|
||||
inline void setHintText( const QString & _txt_before,
|
||||
const QString & _txt_after )
|
||||
{
|
||||
setDescription( _txt_before );
|
||||
setUnit( _txt_after );
|
||||
}
|
||||
|
||||
private:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
@@ -91,7 +103,7 @@ private:
|
||||
float fRange = m_model->maxValue() - m_model->minValue();
|
||||
float realVal = m_model->value() - m_model->minValue();
|
||||
|
||||
return height() - ( ( height() - ( *s_knob ).height() ) * ( realVal / fRange ) );
|
||||
return height() - ( ( height() - m_knob->height() ) * ( realVal / fRange ) );
|
||||
}
|
||||
|
||||
FloatModel * m_model;
|
||||
@@ -112,6 +124,12 @@ private:
|
||||
static QPixmap * s_back;
|
||||
static QPixmap * s_leds;
|
||||
static QPixmap * s_knob;
|
||||
|
||||
QPixmap * m_back;
|
||||
QPixmap * m_leds;
|
||||
QPixmap * m_knob;
|
||||
|
||||
bool m_displayConversion;
|
||||
|
||||
int m_moveStartPoint;
|
||||
float m_startValue;
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
}
|
||||
|
||||
void clearJournal();
|
||||
|
||||
void stopAllJournalling();
|
||||
JournallingObject * journallingObject( const jo_id_t _id )
|
||||
{
|
||||
if( m_joIDs.contains( _id ) )
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <math.h>
|
||||
#include "lmms_constants.h"
|
||||
#include "lmms_math.h"
|
||||
|
||||
inline float hermiteInterpolate( float x0, float x1, float x2, float x3,
|
||||
float frac_pos )
|
||||
@@ -80,24 +81,13 @@ inline float cubicInterpolate( float v0, float v1, float v2, float v3, float x )
|
||||
inline float cosinusInterpolate( float v0, float v1, float x )
|
||||
{
|
||||
const float f = ( 1.0f - cosf( x * F_PI ) ) * 0.5f;
|
||||
#ifdef FP_FAST_FMAF
|
||||
return fmaf( f, v1-v0, v0 );
|
||||
#else
|
||||
return f * (v1-v0) + v0;
|
||||
#endif
|
||||
// return( v0*f + v1*( 1.0f-f ) );
|
||||
return fastFmaf( f, v1-v0, v0 );
|
||||
}
|
||||
|
||||
|
||||
inline float linearInterpolate( float v0, float v1, float x )
|
||||
{
|
||||
// take advantage of fma function if present in hardware
|
||||
|
||||
#ifdef FP_FAST_FMAF
|
||||
return fmaf( x, v1-v0, v0 );
|
||||
#else
|
||||
return x * (v1-v0) + v0;
|
||||
#endif
|
||||
return fastFmaf( x, v1-v0, v0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,15 +25,28 @@
|
||||
#ifndef LMMS_CONSTANTS_H
|
||||
#define LMMS_CONSTANTS_H
|
||||
|
||||
const double D_PI = 3.14159265358979323846;
|
||||
const double D_2PI = D_PI * 2.0;
|
||||
const double D_PI_2 = D_PI * 0.5;
|
||||
const double D_E = 2.71828182845904523536;
|
||||
const long double LD_PI = 3.14159265358979323846264338327950288419716939937510;
|
||||
const long double LD_2PI = LD_PI * 2.0;
|
||||
const long double LD_PI_2 = LD_PI * 0.5;
|
||||
const long double LD_PI_R = 1.0 / LD_PI;
|
||||
const long double LD_PI_SQR = LD_PI * LD_PI;
|
||||
const long double LD_E = 2.71828182845904523536028747135266249775724709369995;
|
||||
const long double LD_E_R = 1.0 / LD_E;
|
||||
|
||||
const float F_PI = (float) D_PI;
|
||||
const float F_2PI = (float) D_2PI;
|
||||
const float F_PI_2 = (float) D_PI_2;
|
||||
const float F_E = (float) D_E;
|
||||
const double D_PI = (double) LD_PI;
|
||||
const double D_2PI = (double) LD_2PI;
|
||||
const double D_PI_2 = (double) LD_PI_2;
|
||||
const double D_PI_R = (double) LD_PI_R;
|
||||
const double D_PI_SQR = (double) LD_PI_SQR;
|
||||
const double D_E = (double) LD_E;
|
||||
const double D_E_R = (double) LD_E_R;
|
||||
|
||||
const float F_PI = (float) LD_PI;
|
||||
const float F_2PI = (float) LD_2PI;
|
||||
const float F_PI_2 = (float) LD_PI_2;
|
||||
const float F_PI_R = (float) LD_PI_R;
|
||||
const float F_PI_SQR = (float) LD_PI_SQR;
|
||||
const float F_E = (float) LD_E;
|
||||
const float F_E_R = (float) LD_E_R;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -142,6 +142,44 @@ static inline float fastRandf( float range )
|
||||
return fast_rand() * range * fast_rand_ratio;
|
||||
}
|
||||
|
||||
//! @brief Takes advantage of fmal() function if present in hardware
|
||||
static inline long double fastFmal( long double a, long double b, long double c )
|
||||
{
|
||||
#ifdef FP_FAST_FMAL
|
||||
#ifdef __clang__
|
||||
return fma( a, b, c );
|
||||
#else
|
||||
return fmal( a, b, c );
|
||||
#endif
|
||||
#else
|
||||
return a * b + c;
|
||||
#endif
|
||||
}
|
||||
|
||||
//! @brief Takes advantage of fmaf() function if present in hardware
|
||||
static inline float fastFmaf( float a, float b, float c )
|
||||
{
|
||||
#ifdef FP_FAST_FMAF
|
||||
#ifdef __clang__
|
||||
return fma( a, b, c );
|
||||
#else
|
||||
return fmaf( a, b, c );
|
||||
#endif
|
||||
#else
|
||||
return a * b + c;
|
||||
#endif
|
||||
}
|
||||
|
||||
//! @brief Takes advantage of fma() function if present in hardware
|
||||
static inline double fastFma( double a, double b, double c )
|
||||
{
|
||||
#ifdef FP_FAST_FMA
|
||||
return fma( a, b, c );
|
||||
#else
|
||||
return a * b + c;
|
||||
#endif
|
||||
}
|
||||
|
||||
// source: http://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/
|
||||
static inline double fastPow( double a, double b )
|
||||
{
|
||||
@@ -251,4 +289,18 @@ static inline float fastSqrt( float n )
|
||||
return u.f;
|
||||
}
|
||||
|
||||
//! returns value furthest from zero
|
||||
template<class T>
|
||||
static inline T absMax( T a, T b )
|
||||
{
|
||||
return qAbs<T>(a) > qAbs<T>(b) ? a : b;
|
||||
}
|
||||
|
||||
//! returns value nearest to zero
|
||||
template<class T>
|
||||
static inline T absMin( T a, T b )
|
||||
{
|
||||
return qAbs<T>(a) < qAbs<T>(b) ? a : b;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,26 +45,26 @@ AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) :
|
||||
volumeKnob -> setVolumeKnob( true );
|
||||
volumeKnob->setModel( &controls->m_volumeModel );
|
||||
volumeKnob->setLabel( tr( "VOL" ) );
|
||||
volumeKnob->setHintText( tr( "Volume:" ) + " ", "%" );
|
||||
volumeKnob->setHintText( tr( "Volume:" ) , "%" );
|
||||
|
||||
Knob * panKnob = new Knob( knobBright_26, this);
|
||||
panKnob -> move( 60, 30 );
|
||||
panKnob->setModel( &controls->m_panModel );
|
||||
panKnob->setLabel( tr( "PAN" ) );
|
||||
panKnob->setHintText( tr( "Panning:" ) + " ", "" );
|
||||
panKnob->setHintText( tr( "Panning:" ) , "" );
|
||||
|
||||
Knob * leftKnob = new Knob( knobBright_26, this);
|
||||
leftKnob -> move( 20, 80 );
|
||||
leftKnob -> setVolumeKnob( true );
|
||||
leftKnob->setModel( &controls->m_leftModel );
|
||||
leftKnob->setLabel( tr( "LEFT" ) );
|
||||
leftKnob->setHintText( tr( "Left gain:" ) + " ", "%" );
|
||||
leftKnob->setHintText( tr( "Left gain:" ) , "%" );
|
||||
|
||||
Knob * rightKnob = new Knob( knobBright_26, this);
|
||||
rightKnob -> move( 60, 80 );
|
||||
rightKnob -> setVolumeKnob( true );
|
||||
rightKnob->setModel( &controls->m_rightModel );
|
||||
rightKnob->setLabel( tr( "RIGHT" ) );
|
||||
rightKnob->setHintText( tr( "Right gain:" ) + " ", "%" );
|
||||
rightKnob->setHintText( tr( "Right gain:" ) , "%" );
|
||||
}
|
||||
|
||||
|
||||
@@ -47,17 +47,17 @@ BassBoosterControlDialog::BassBoosterControlDialog( BassBoosterControls* control
|
||||
Knob * freqKnob = new Knob( knobBright_26, this);
|
||||
freqKnob->setModel( &controls->m_freqModel );
|
||||
freqKnob->setLabel( tr( "FREQ" ) );
|
||||
freqKnob->setHintText( tr( "Frequency:" ) + " ", "Hz" );
|
||||
freqKnob->setHintText( tr( "Frequency:" ) , "Hz" );
|
||||
|
||||
Knob * gainKnob = new Knob( knobBright_26, this );
|
||||
gainKnob->setModel( &controls->m_gainModel );
|
||||
gainKnob->setLabel( tr( "GAIN" ) );
|
||||
gainKnob->setHintText( tr( "Gain:" ) + " ", "" );
|
||||
gainKnob->setHintText( tr( "Gain:" ) , "" );
|
||||
|
||||
Knob * ratioKnob = new Knob( knobBright_26, this );
|
||||
ratioKnob->setModel( &controls->m_ratioModel );
|
||||
ratioKnob->setLabel( tr( "RATIO" ) );
|
||||
ratioKnob->setHintText( tr( "Ratio:" ) + " ", "" );
|
||||
ratioKnob->setHintText( tr( "Ratio:" ) , "" );
|
||||
|
||||
l->addWidget( freqKnob );
|
||||
l->addWidget( gainKnob );
|
||||
|
||||
@@ -30,6 +30,8 @@ const int OS_RATE = 5;
|
||||
const float OS_RATIO = 1.0f / OS_RATE;
|
||||
const float CUTOFF_RATIO = 0.353553391f;
|
||||
const int SILENCEFRAMES = 10;
|
||||
const float OS_RESAMPLE [5] = { 0.0001490062883964112, 0.1645978376763992, 0.6705063120704088,
|
||||
0.1645978376763992, 0.0001490062883964112 };
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -78,7 +80,7 @@ void BitcrushEffect::sampleRateChanged()
|
||||
{
|
||||
m_sampleRate = Engine::mixer()->processingSampleRate();
|
||||
m_filter.setSampleRate( m_sampleRate );
|
||||
m_filter.setLowpass( m_sampleRate * CUTOFF_RATIO );
|
||||
m_filter.setLowpass( m_sampleRate * ( CUTOFF_RATIO * OS_RATIO ) );
|
||||
m_needsUpdate = true;
|
||||
}
|
||||
|
||||
@@ -95,6 +97,11 @@ inline float BitcrushEffect::noise( float amt )
|
||||
|
||||
bool BitcrushEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
{
|
||||
if( !isEnabled() || !isRunning () )
|
||||
{
|
||||
return( false );
|
||||
}
|
||||
|
||||
// update values
|
||||
if( m_needsUpdate || m_controls.m_rateEnabled.isValueChanged() )
|
||||
{
|
||||
@@ -219,8 +226,8 @@ bool BitcrushEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
float rsum = 0.0f;
|
||||
for( int o = 0; o < OS_RATE; ++o )
|
||||
{
|
||||
lsum += m_buffer[f * OS_RATE + o][0] * OS_RATIO;
|
||||
rsum += m_buffer[f * OS_RATE + o][1] * OS_RATIO;
|
||||
lsum += m_buffer[f * OS_RATE + o][0] * OS_RESAMPLE[o];
|
||||
rsum += m_buffer[f * OS_RATE + o][1] * OS_RESAMPLE[o];
|
||||
}
|
||||
buf[f][0] = d * buf[f][0] + w * qBound( -m_outClip, lsum, m_outClip ) * m_outGain;
|
||||
buf[f][1] = d * buf[f][1] + w * qBound( -m_outClip, rsum, m_outClip ) * m_outGain;
|
||||
|
||||
@@ -6,6 +6,7 @@ ADD_SUBDIRECTORY(Bitcrush)
|
||||
ADD_SUBDIRECTORY(carlabase)
|
||||
ADD_SUBDIRECTORY(carlapatchbay)
|
||||
ADD_SUBDIRECTORY(carlarack)
|
||||
ADD_SUBDIRECTORY(CrossoverEQ)
|
||||
ADD_SUBDIRECTORY(delay)
|
||||
ADD_SUBDIRECTORY(DualFilter)
|
||||
ADD_SUBDIRECTORY(dynamics_processor)
|
||||
|
||||
3
plugins/CrossoverEQ/CMakeLists.txt
Normal file
3
plugins/CrossoverEQ/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(crossovereq CrossoverEQ.cpp CrossoverEQControls.cpp CrossoverEQControlDialog.cpp MOCFILES CrossoverEQControls.h CrossoverEQControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||
219
plugins/CrossoverEQ/CrossoverEQ.cpp
Normal file
219
plugins/CrossoverEQ/CrossoverEQ.cpp
Normal file
@@ -0,0 +1,219 @@
|
||||
/*
|
||||
* CrossoverEQ.cpp - A native 4-band Crossover Equalizer
|
||||
* good for simulating tonestacks or simple peakless (flat-band) equalization
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "CrossoverEQ.h"
|
||||
#include "lmms_math.h"
|
||||
#include "embed.cpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
Plugin::Descriptor PLUGIN_EXPORT crossovereq_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Crossover Equalizer",
|
||||
QT_TRANSLATE_NOOP( "pluginBrowser", "A 4-band Crossover Equalizer" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
CrossoverEQEffect::CrossoverEQEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ) :
|
||||
Effect( &crossovereq_plugin_descriptor, parent, key ),
|
||||
m_controls( this ),
|
||||
m_sampleRate( Engine::mixer()->processingSampleRate() ),
|
||||
m_lp1( m_sampleRate ),
|
||||
m_lp2( m_sampleRate ),
|
||||
m_lp3( m_sampleRate ),
|
||||
m_hp2( m_sampleRate ),
|
||||
m_hp3( m_sampleRate ),
|
||||
m_hp4( m_sampleRate ),
|
||||
m_needsUpdate( true )
|
||||
{
|
||||
m_tmp1 = MM_ALLOC( sampleFrame, Engine::mixer()->framesPerPeriod() );
|
||||
m_tmp2 = MM_ALLOC( sampleFrame, Engine::mixer()->framesPerPeriod() );
|
||||
m_work = MM_ALLOC( sampleFrame, Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
CrossoverEQEffect::~CrossoverEQEffect()
|
||||
{
|
||||
MM_FREE( m_tmp1 );
|
||||
MM_FREE( m_tmp2 );
|
||||
MM_FREE( m_work );
|
||||
}
|
||||
|
||||
void CrossoverEQEffect::sampleRateChanged()
|
||||
{
|
||||
m_sampleRate = Engine::mixer()->processingSampleRate();
|
||||
m_lp1.setSampleRate( m_sampleRate );
|
||||
m_lp2.setSampleRate( m_sampleRate );
|
||||
m_lp3.setSampleRate( m_sampleRate );
|
||||
m_hp2.setSampleRate( m_sampleRate );
|
||||
m_hp3.setSampleRate( m_sampleRate );
|
||||
m_hp4.setSampleRate( m_sampleRate );
|
||||
m_needsUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
bool CrossoverEQEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
{
|
||||
if( !isEnabled() || !isRunning () )
|
||||
{
|
||||
return( false );
|
||||
}
|
||||
|
||||
// filters update
|
||||
if( m_needsUpdate || m_controls.m_xover12.isValueChanged() )
|
||||
{
|
||||
m_lp1.setLowpass( m_controls.m_xover12.value() );
|
||||
m_lp1.clearHistory();
|
||||
m_hp2.setHighpass( m_controls.m_xover12.value() );
|
||||
m_hp2.clearHistory();
|
||||
}
|
||||
if( m_needsUpdate || m_controls.m_xover23.isValueChanged() )
|
||||
{
|
||||
m_lp2.setLowpass( m_controls.m_xover23.value() );
|
||||
m_lp2.clearHistory();
|
||||
m_hp3.setHighpass( m_controls.m_xover23.value() );
|
||||
m_hp3.clearHistory();
|
||||
}
|
||||
if( m_needsUpdate || m_controls.m_xover34.isValueChanged() )
|
||||
{
|
||||
m_lp3.setLowpass( m_controls.m_xover34.value() );
|
||||
m_lp3.clearHistory();
|
||||
m_hp4.setHighpass( m_controls.m_xover34.value() );
|
||||
m_hp4.clearHistory();
|
||||
}
|
||||
|
||||
// gain values update
|
||||
if( m_needsUpdate || m_controls.m_gain1.isValueChanged() )
|
||||
{
|
||||
m_gain1 = dbvToAmp( m_controls.m_gain1.value() );
|
||||
}
|
||||
if( m_needsUpdate || m_controls.m_gain2.isValueChanged() )
|
||||
{
|
||||
m_gain2 = dbvToAmp( m_controls.m_gain2.value() );
|
||||
}
|
||||
if( m_needsUpdate || m_controls.m_gain3.isValueChanged() )
|
||||
{
|
||||
m_gain3 = dbvToAmp( m_controls.m_gain3.value() );
|
||||
}
|
||||
if( m_needsUpdate || m_controls.m_gain4.isValueChanged() )
|
||||
{
|
||||
m_gain4 = dbvToAmp( m_controls.m_gain4.value() );
|
||||
}
|
||||
|
||||
// mute values update
|
||||
const bool mute1 = m_controls.m_mute1.value();
|
||||
const bool mute2 = m_controls.m_mute2.value();
|
||||
const bool mute3 = m_controls.m_mute3.value();
|
||||
const bool mute4 = m_controls.m_mute4.value();
|
||||
|
||||
m_needsUpdate = false;
|
||||
|
||||
memset( m_work, 0, sizeof( sampleFrame ) * frames );
|
||||
|
||||
// run temp bands
|
||||
for( int f = 0; f < frames; ++f )
|
||||
{
|
||||
m_tmp1[f][0] = m_lp2.update( buf[f][0], 0 );
|
||||
m_tmp1[f][1] = m_lp2.update( buf[f][1], 1 );
|
||||
m_tmp2[f][0] = m_hp3.update( buf[f][0], 0 );
|
||||
m_tmp2[f][1] = m_hp3.update( buf[f][1], 1 );
|
||||
}
|
||||
|
||||
// run band 1
|
||||
if( ! mute1 )
|
||||
{
|
||||
for( int f = 0; f < frames; ++f )
|
||||
{
|
||||
m_work[f][0] += m_lp1.update( m_tmp1[f][0], 0 ) * m_gain1;
|
||||
m_work[f][1] += m_lp1.update( m_tmp1[f][1], 1 ) * m_gain1;
|
||||
}
|
||||
}
|
||||
|
||||
// run band 2
|
||||
if( ! mute2 )
|
||||
{
|
||||
for( int f = 0; f < frames; ++f )
|
||||
{
|
||||
m_work[f][0] += m_hp2.update( m_tmp1[f][0], 0 ) * m_gain2;
|
||||
m_work[f][1] += m_hp2.update( m_tmp1[f][1], 1 ) * m_gain2;
|
||||
}
|
||||
}
|
||||
|
||||
// run band 3
|
||||
if( ! mute3 )
|
||||
{
|
||||
for( int f = 0; f < frames; ++f )
|
||||
{
|
||||
m_work[f][0] += m_lp3.update( m_tmp2[f][0], 0 ) * m_gain3;
|
||||
m_work[f][1] += m_lp3.update( m_tmp2[f][1], 1 ) * m_gain3;
|
||||
}
|
||||
}
|
||||
|
||||
// run band 4
|
||||
if( ! mute4 )
|
||||
{
|
||||
for( int f = 0; f < frames; ++f )
|
||||
{
|
||||
m_work[f][0] += m_hp4.update( m_tmp2[f][0], 0 ) * m_gain4;
|
||||
m_work[f][1] += m_hp4.update( m_tmp2[f][1], 1 ) * m_gain4;
|
||||
}
|
||||
}
|
||||
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
double outSum = 0.0;
|
||||
for( int f = 0; f < frames; ++f )
|
||||
{
|
||||
buf[f][0] = d * buf[f][0] + w * m_work[f][0];
|
||||
buf[f][1] = d * buf[f][1] + w * m_work[f][1];
|
||||
outSum = buf[f][0] * buf[f][0] + buf[f][1] * buf[f][1];
|
||||
}
|
||||
|
||||
checkGate( outSum );
|
||||
|
||||
return isRunning();
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new CrossoverEQEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
}
|
||||
77
plugins/CrossoverEQ/CrossoverEQ.h
Normal file
77
plugins/CrossoverEQ/CrossoverEQ.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* CrossoverEQ.h - A native 4-band Crossover Equalizer
|
||||
* good for simulating tonestacks or simple peakless (flat-band) equalization
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CROSSOVEREQ_H
|
||||
#define CROSSOVEREQ_H
|
||||
|
||||
#include "Effect.h"
|
||||
#include "CrossoverEQControls.h"
|
||||
#include "ValueBuffer.h"
|
||||
#include "lmms_math.h"
|
||||
#include "BasicFilters.h"
|
||||
|
||||
class CrossoverEQEffect : public Effect
|
||||
{
|
||||
public:
|
||||
CrossoverEQEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key );
|
||||
virtual ~CrossoverEQEffect();
|
||||
virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames );
|
||||
|
||||
virtual EffectControls* controls()
|
||||
{
|
||||
return &m_controls;
|
||||
}
|
||||
|
||||
private:
|
||||
CrossoverEQControls m_controls;
|
||||
|
||||
void sampleRateChanged();
|
||||
|
||||
float m_sampleRate;
|
||||
|
||||
float m_gain1;
|
||||
float m_gain2;
|
||||
float m_gain3;
|
||||
float m_gain4;
|
||||
|
||||
StereoLinkwitzRiley m_lp1;
|
||||
StereoLinkwitzRiley m_lp2;
|
||||
StereoLinkwitzRiley m_lp3;
|
||||
|
||||
StereoLinkwitzRiley m_hp2;
|
||||
StereoLinkwitzRiley m_hp3;
|
||||
StereoLinkwitzRiley m_hp4;
|
||||
|
||||
sampleFrame * m_tmp1;
|
||||
sampleFrame * m_tmp2;
|
||||
sampleFrame * m_work;
|
||||
|
||||
bool m_needsUpdate;
|
||||
|
||||
friend class CrossoverEQControls;
|
||||
};
|
||||
|
||||
#endif
|
||||
115
plugins/CrossoverEQ/CrossoverEQControlDialog.cpp
Normal file
115
plugins/CrossoverEQ/CrossoverEQControlDialog.cpp
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* CrossoverEQControlDialog.cpp - A native 4-band Crossover Equalizer
|
||||
* good for simulating tonestacks or simple peakless (flat-band) equalization
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <QLayout>
|
||||
#include <QLabel>
|
||||
|
||||
#include "CrossoverEQControlDialog.h"
|
||||
#include "CrossoverEQControls.h"
|
||||
#include "embed.h"
|
||||
#include "ToolTip.h"
|
||||
#include "LedCheckbox.h"
|
||||
#include "Knob.h"
|
||||
#include "Fader.h"
|
||||
|
||||
CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * controls ) :
|
||||
EffectControlDialog( controls )
|
||||
{
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 167, 188 );
|
||||
|
||||
// knobs
|
||||
Knob * xover12 = new Knob( knobBright_26, this );
|
||||
xover12->move( 29, 15 );
|
||||
xover12->setModel( & controls->m_xover12 );
|
||||
xover12->setLabel( "1/2" );
|
||||
xover12->setHintText( tr( "Band 1/2 Crossover:" ), " Hz" );
|
||||
|
||||
Knob * xover23 = new Knob( knobBright_26, this );
|
||||
xover23->move( 69, 15 );
|
||||
xover23->setModel( & controls->m_xover23 );
|
||||
xover23->setLabel( "2/3" );
|
||||
xover23->setHintText( tr( "Band 2/3 Crossover:" ), " Hz" );
|
||||
|
||||
Knob * xover34 = new Knob( knobBright_26, this );
|
||||
xover34->move( 109, 15 );
|
||||
xover34->setModel( & controls->m_xover34 );
|
||||
xover34->setLabel( "3/4" );
|
||||
xover34->setHintText( tr( "Band 3/4 Crossover:" ), " Hz" );
|
||||
|
||||
m_fader_bg = QPixmap( PLUGIN_NAME::getIconPixmap( "fader_bg" ) );
|
||||
m_fader_empty = QPixmap( PLUGIN_NAME::getIconPixmap( "fader_empty" ) );
|
||||
m_fader_knob = QPixmap( PLUGIN_NAME::getIconPixmap( "fader_knob2" ) );
|
||||
|
||||
// faders
|
||||
Fader * gain1 = new Fader( &controls->m_gain1, "Band 1 Gain", this,
|
||||
&m_fader_bg, &m_fader_empty, &m_fader_knob );
|
||||
gain1->move( 7, 56 );
|
||||
gain1->setDisplayConversion( false );
|
||||
gain1->setHintText( tr( "Band 1 Gain:" ), " dBV" );
|
||||
|
||||
Fader * gain2 = new Fader( &controls->m_gain2, "Band 2 Gain", this,
|
||||
&m_fader_bg, &m_fader_empty, &m_fader_knob );
|
||||
gain2->move( 47, 56 );
|
||||
gain2->setDisplayConversion( false );
|
||||
gain2->setHintText( tr( "Band 2 Gain:" ), " dBV" );
|
||||
|
||||
Fader * gain3 = new Fader( &controls->m_gain3, "Band 3 Gain", this,
|
||||
&m_fader_bg, &m_fader_empty, &m_fader_knob );
|
||||
gain3->move( 87, 56 );
|
||||
gain3->setDisplayConversion( false );
|
||||
gain3->setHintText( tr( "Band 3 Gain:" ), " dBV" );
|
||||
|
||||
Fader * gain4 = new Fader( &controls->m_gain4, "Band 4 Gain", this,
|
||||
&m_fader_bg, &m_fader_empty, &m_fader_knob );
|
||||
gain4->move( 127, 56 );
|
||||
gain4->setDisplayConversion( false );
|
||||
gain4->setHintText( tr( "Band 4 Gain:" ), " dBV" );
|
||||
|
||||
// leds
|
||||
LedCheckBox * mute1 = new LedCheckBox( "M", this, tr( "Band 1 Mute" ), LedCheckBox::Red );
|
||||
mute1->move( 11, 158 );
|
||||
mute1->setModel( & controls->m_mute1 );
|
||||
ToolTip::add( mute1, tr( "Mute Band 1" ) );
|
||||
|
||||
LedCheckBox * mute2 = new LedCheckBox( "M", this, tr( "Band 2 Mute" ), LedCheckBox::Red );
|
||||
mute2->move( 51, 158 );
|
||||
mute2->setModel( & controls->m_mute2 );
|
||||
ToolTip::add( mute2, tr( "Mute Band 2" ) );
|
||||
|
||||
LedCheckBox * mute3 = new LedCheckBox( "M", this, tr( "Band 3 Mute" ), LedCheckBox::Red );
|
||||
mute3->move( 91, 158 );
|
||||
mute3->setModel( & controls->m_mute3 );
|
||||
ToolTip::add( mute3, tr( "Mute Band 3" ) );
|
||||
|
||||
LedCheckBox * mute4 = new LedCheckBox( "M", this, tr( "Band 4 Mute" ), LedCheckBox::Red );
|
||||
mute4->move( 131, 158 );
|
||||
mute4->setModel( & controls->m_mute4 );
|
||||
ToolTip::add( mute4, tr( "Mute Band 4" ) );
|
||||
}
|
||||
50
plugins/CrossoverEQ/CrossoverEQControlDialog.h
Normal file
50
plugins/CrossoverEQ/CrossoverEQControlDialog.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* CrossoverEQControlDialog.h - A native 4-band Crossover Equalizer
|
||||
* good for simulating tonestacks or simple peakless (flat-band) equalization
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CROSSOVEREQ_CONTROL_DIALOG_H
|
||||
#define CROSSOVEREQ_CONTROL_DIALOG_H
|
||||
|
||||
#include <QPixmap>
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
class CrossoverEQControls;
|
||||
|
||||
class CrossoverEQControlDialog : public EffectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CrossoverEQControlDialog( CrossoverEQControls * controls );
|
||||
virtual ~CrossoverEQControlDialog()
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
QPixmap m_fader_bg;
|
||||
QPixmap m_fader_empty;
|
||||
QPixmap m_fader_knob;
|
||||
};
|
||||
|
||||
#endif
|
||||
116
plugins/CrossoverEQ/CrossoverEQControls.cpp
Normal file
116
plugins/CrossoverEQ/CrossoverEQControls.cpp
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* CrossoverEQControls.cpp - A native 4-band Crossover Equalizer
|
||||
* good for simulating tonestacks or simple peakless (flat-band) equalization
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "CrossoverEQControls.h"
|
||||
#include "CrossoverEQ.h"
|
||||
|
||||
CrossoverEQControls::CrossoverEQControls( CrossoverEQEffect * eff ) :
|
||||
EffectControls( eff ),
|
||||
m_effect( eff ),
|
||||
m_xover12( 125.f, 50.f, 10000.f, 1.0f, this, "Band 1/2 Crossover" ),
|
||||
m_xover23( 1250.f, 50.f, 20000.f, 1.0f, this, "Band 2/3 Crossover" ),
|
||||
m_xover34( 5000.f, 50.f, 20000.f, 1.0f, this, "Band 3/4 Crossover" ),
|
||||
m_gain1( 0.f, -60.f, 30.f, 0.1f, this, "Band 1 Gain" ),
|
||||
m_gain2( 0.f, -60.f, 30.f, 0.1f, this, "Band 2 Gain" ),
|
||||
m_gain3( 0.f, -60.f, 30.f, 0.1f, this, "Band 3 Gain" ),
|
||||
m_gain4( 0.f, -60.f, 30.f, 0.1f, this, "Band 4 Gain" ),
|
||||
m_mute1( false, this, "Mute Band 1" ),
|
||||
m_mute2( false, this, "Mute Band 2" ),
|
||||
m_mute3( false, this, "Mute Band 3" ),
|
||||
m_mute4( false, this, "Mute Band 4" )
|
||||
{
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
connect( &m_xover12, SIGNAL( dataChanged() ), this, SLOT( xover12Changed() ) );
|
||||
connect( &m_xover23, SIGNAL( dataChanged() ), this, SLOT( xover23Changed() ) );
|
||||
connect( &m_xover34, SIGNAL( dataChanged() ), this, SLOT( xover34Changed() ) );
|
||||
|
||||
m_xover12.setScaleLogarithmic( true );
|
||||
m_xover23.setScaleLogarithmic( true );
|
||||
m_xover34.setScaleLogarithmic( true );
|
||||
}
|
||||
|
||||
void CrossoverEQControls::saveSettings( QDomDocument & doc, QDomElement & elem )
|
||||
{
|
||||
m_xover12.saveSettings( doc, elem, "xover12" );
|
||||
m_xover23.saveSettings( doc, elem, "xover23" );
|
||||
m_xover34.saveSettings( doc, elem, "xover34" );
|
||||
|
||||
m_gain1.saveSettings( doc, elem, "gain1" );
|
||||
m_gain2.saveSettings( doc, elem, "gain2" );
|
||||
m_gain3.saveSettings( doc, elem, "gain3" );
|
||||
m_gain4.saveSettings( doc, elem, "gain4" );
|
||||
|
||||
m_mute1.saveSettings( doc, elem, "mute1" );
|
||||
m_mute2.saveSettings( doc, elem, "mute2" );
|
||||
m_mute3.saveSettings( doc, elem, "mute3" );
|
||||
m_mute4.saveSettings( doc, elem, "mute4" );
|
||||
}
|
||||
|
||||
void CrossoverEQControls::loadSettings( const QDomElement & elem )
|
||||
{
|
||||
m_xover12.loadSettings( elem, "xover12" );
|
||||
m_xover23.loadSettings( elem, "xover23" );
|
||||
m_xover34.loadSettings( elem, "xover34" );
|
||||
|
||||
m_gain1.loadSettings( elem, "gain1" );
|
||||
m_gain2.loadSettings( elem, "gain2" );
|
||||
m_gain3.loadSettings( elem, "gain3" );
|
||||
m_gain4.loadSettings( elem, "gain4" );
|
||||
|
||||
m_mute1.loadSettings( elem, "mute1" );
|
||||
m_mute2.loadSettings( elem, "mute2" );
|
||||
m_mute3.loadSettings( elem, "mute3" );
|
||||
m_mute4.loadSettings( elem, "mute4" );
|
||||
|
||||
m_effect->m_needsUpdate = true;
|
||||
}
|
||||
|
||||
void CrossoverEQControls::xover12Changed()
|
||||
{
|
||||
float v = m_xover12.value();
|
||||
if( m_xover23.value() < v ) { m_xover23.setValue( v ); }
|
||||
if( m_xover34.value() < v ) { m_xover34.setValue( v ); }
|
||||
}
|
||||
|
||||
void CrossoverEQControls::xover23Changed()
|
||||
{
|
||||
float v = m_xover23.value();
|
||||
if( m_xover12.value() > v ) { m_xover12.setValue( v ); }
|
||||
if( m_xover34.value() < v ) { m_xover34.setValue( v ); }
|
||||
}
|
||||
|
||||
void CrossoverEQControls::xover34Changed()
|
||||
{
|
||||
float v = m_xover34.value();
|
||||
if( m_xover12.value() > v ) { m_xover12.setValue( v ); }
|
||||
if( m_xover23.value() > v ) { m_xover23.setValue( v ); }
|
||||
}
|
||||
|
||||
|
||||
void CrossoverEQControls::sampleRateChanged()
|
||||
{
|
||||
m_effect->sampleRateChanged();
|
||||
}
|
||||
86
plugins/CrossoverEQ/CrossoverEQControls.h
Normal file
86
plugins/CrossoverEQ/CrossoverEQControls.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* CrossoverEQControls.h - A native 4-band Crossover Equalizer
|
||||
* good for simulating tonestacks or simple peakless (flat-band) equalization
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CROSSOVEREQ_CONTROLS_H
|
||||
#define CROSSOVEREQ_CONTROLS_H
|
||||
|
||||
#include "EffectControls.h"
|
||||
#include "CrossoverEQControlDialog.h"
|
||||
|
||||
class CrossoverEQEffect;
|
||||
|
||||
class CrossoverEQControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CrossoverEQControls( CrossoverEQEffect * eff );
|
||||
virtual ~CrossoverEQControls() {}
|
||||
|
||||
virtual void saveSettings( QDomDocument & doc, QDomElement & elem );
|
||||
virtual void loadSettings( const QDomElement & elem );
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
return( "crossoevereqcontrols" );
|
||||
}
|
||||
|
||||
virtual int controlCount()
|
||||
{
|
||||
return( 11 );
|
||||
}
|
||||
|
||||
virtual EffectControlDialog * createView()
|
||||
{
|
||||
return( new CrossoverEQControlDialog( this ) );
|
||||
}
|
||||
|
||||
private slots:
|
||||
void xover12Changed();
|
||||
void xover23Changed();
|
||||
void xover34Changed();
|
||||
void sampleRateChanged();
|
||||
|
||||
private:
|
||||
CrossoverEQEffect * m_effect;
|
||||
|
||||
FloatModel m_xover12;
|
||||
FloatModel m_xover23;
|
||||
FloatModel m_xover34;
|
||||
|
||||
FloatModel m_gain1;
|
||||
FloatModel m_gain2;
|
||||
FloatModel m_gain3;
|
||||
FloatModel m_gain4;
|
||||
|
||||
BoolModel m_mute1;
|
||||
BoolModel m_mute2;
|
||||
BoolModel m_mute3;
|
||||
BoolModel m_mute4;
|
||||
|
||||
friend class CrossoverEQControlDialog;
|
||||
friend class CrossoverEQEffect;
|
||||
};
|
||||
|
||||
#endif
|
||||
BIN
plugins/CrossoverEQ/artwork.png
Normal file
BIN
plugins/CrossoverEQ/artwork.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
BIN
plugins/CrossoverEQ/fader_bg.png
Normal file
BIN
plugins/CrossoverEQ/fader_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 234 B |
BIN
plugins/CrossoverEQ/fader_empty.png
Normal file
BIN
plugins/CrossoverEQ/fader_empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 198 B |
BIN
plugins/CrossoverEQ/fader_knob2.png
Normal file
BIN
plugins/CrossoverEQ/fader_knob2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 783 B |
@@ -38,7 +38,7 @@
|
||||
name -> move( x, y ); \
|
||||
name ->setModel( &controls-> model ); \
|
||||
name ->setLabel( tr( label ) ); \
|
||||
name ->setHintText( tr( hint ) + " ", unit );
|
||||
name ->setHintText( tr( hint ) , unit );
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,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, 14000.0f, 1.0f, this, tr( "Cutoff 1 frequency" ) ),
|
||||
m_cut1Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff 1 frequency" ) ),
|
||||
m_res1Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ),
|
||||
m_gain1Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 1" ) ),
|
||||
|
||||
@@ -47,7 +47,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, 14000.0f, 1.0f, this, tr( "Cutoff 2 frequency" ) ),
|
||||
m_cut2Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff 2 frequency" ) ),
|
||||
m_res2Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
|
||||
m_gain2Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 2" ) )
|
||||
{
|
||||
|
||||
@@ -82,19 +82,19 @@ MultitapEchoControlDialog::MultitapEchoControlDialog( MultitapEchoControls * con
|
||||
stepLength->move( 100, 245 );
|
||||
stepLength->setModel( & controls->m_stepLength );
|
||||
stepLength->setLabel( tr( "Length" ) );
|
||||
stepLength->setHintText( tr( "Step length:" ) + " ", " ms" );
|
||||
stepLength->setHintText( tr( "Step length:" ) , " ms" );
|
||||
|
||||
Knob * dryGain = new Knob( knobBright_26, this );
|
||||
dryGain->move( 150, 245 );
|
||||
dryGain->setModel( & controls->m_dryGain );
|
||||
dryGain->setLabel( tr( "Dry" ) );
|
||||
dryGain->setHintText( tr( "Dry Gain:" ) + " ", " dBV" );
|
||||
dryGain->setHintText( tr( "Dry Gain:" ) , " dBV" );
|
||||
|
||||
Knob * stages = new Knob( knobBright_26, this );
|
||||
stages->move( 200, 245 );
|
||||
stages->setModel( & controls->m_stages );
|
||||
stages->setLabel( tr( "Stages" ) );
|
||||
stages->setHintText( tr( "Lowpass stages:" ) + " ", "x" );
|
||||
stages->setHintText( tr( "Lowpass stages:" ) , "x" );
|
||||
// switch led
|
||||
|
||||
LedCheckBox * swapInputs = new LedCheckBox( "Swap inputs", this, tr( "Swap inputs" ), LedCheckBox::Green );
|
||||
|
||||
@@ -543,7 +543,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
m_ampKnob = new Knob( knobBright_26, this );
|
||||
m_ampKnob->setVolumeKnob( true );
|
||||
m_ampKnob->move( 5, 108 );
|
||||
m_ampKnob->setHintText( tr( "Amplify:" )+" ", "%" );
|
||||
m_ampKnob->setHintText( tr( "Amplify:" ), "%" );
|
||||
m_ampKnob->setWhatsThis(
|
||||
tr( "With this knob you can set the amplify ratio. When you "
|
||||
"set a value of 100% your sample isn't changed. "
|
||||
@@ -552,21 +552,21 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
|
||||
m_startKnob = new AudioFileProcessorWaveView::knob( this );
|
||||
m_startKnob->move( 45, 108 );
|
||||
m_startKnob->setHintText( tr( "Startpoint:" )+" ", "" );
|
||||
m_startKnob->setHintText( tr( "Startpoint:" ), "" );
|
||||
m_startKnob->setWhatsThis(
|
||||
tr( "With this knob you can set the point where "
|
||||
"AudioFileProcessor should begin playing your sample. " ) );
|
||||
|
||||
m_endKnob = new AudioFileProcessorWaveView::knob( this );
|
||||
m_endKnob->move( 125, 108 );
|
||||
m_endKnob->setHintText( tr( "Endpoint:" )+" ", "" );
|
||||
m_endKnob->setHintText( tr( "Endpoint:" ), "" );
|
||||
m_endKnob->setWhatsThis(
|
||||
tr( "With this knob you can set the point where "
|
||||
"AudioFileProcessor should stop playing your sample. " ) );
|
||||
|
||||
m_loopKnob = new AudioFileProcessorWaveView::knob( this );
|
||||
m_loopKnob->move( 85, 108 );
|
||||
m_loopKnob->setHintText( tr( "Loopback point:" )+" ", "" );
|
||||
m_loopKnob->setHintText( tr( "Loopback point:" ), "" );
|
||||
m_loopKnob->setWhatsThis(
|
||||
tr( "With this knob you can set the point where "
|
||||
"the loop starts. " ) );
|
||||
|
||||
@@ -335,7 +335,7 @@ bitInvaderView::bitInvaderView( Instrument * _instrument,
|
||||
|
||||
m_sampleLengthKnob = new Knob( knobDark_28, this );
|
||||
m_sampleLengthKnob->move( 6, 201 );
|
||||
m_sampleLengthKnob->setHintText( tr( "Sample Length" ) + " ", "" );
|
||||
m_sampleLengthKnob->setHintText( tr( "Sample Length" ), "" );
|
||||
|
||||
m_graph = new Graph( this, Graph::NearestStyle, 204, 134 );
|
||||
m_graph->move(23,59); // 55,120 - 2px border
|
||||
|
||||
@@ -251,16 +251,16 @@ intptr_t CarlaInstrument::handleDispatcher(const NativeHostDispatcherOpcode opco
|
||||
|
||||
switch (opcode)
|
||||
{
|
||||
case HOST_OPCODE_NULL:
|
||||
case NATIVE_HOST_OPCODE_NULL:
|
||||
break;
|
||||
case HOST_OPCODE_UPDATE_PARAMETER:
|
||||
case HOST_OPCODE_UPDATE_MIDI_PROGRAM:
|
||||
case HOST_OPCODE_RELOAD_PARAMETERS:
|
||||
case HOST_OPCODE_RELOAD_MIDI_PROGRAMS:
|
||||
case HOST_OPCODE_RELOAD_ALL:
|
||||
case NATIVE_HOST_OPCODE_UPDATE_PARAMETER:
|
||||
case NATIVE_HOST_OPCODE_UPDATE_MIDI_PROGRAM:
|
||||
case NATIVE_HOST_OPCODE_RELOAD_PARAMETERS:
|
||||
case NATIVE_HOST_OPCODE_RELOAD_MIDI_PROGRAMS:
|
||||
case NATIVE_HOST_OPCODE_RELOAD_ALL:
|
||||
// nothing
|
||||
break;
|
||||
case HOST_OPCODE_UI_UNAVAILABLE:
|
||||
case NATIVE_HOST_OPCODE_UI_UNAVAILABLE:
|
||||
handleUiClosed();
|
||||
break;
|
||||
}
|
||||
@@ -459,7 +459,7 @@ PluginView* CarlaInstrument::instantiateView(QWidget* parent)
|
||||
|
||||
void CarlaInstrument::sampleRateChanged()
|
||||
{
|
||||
fDescriptor->dispatcher(fHandle, PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, handleGetSampleRate());
|
||||
fDescriptor->dispatcher(fHandle, NATIVE_PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, handleGetSampleRate());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
DelayControls::DelayControls( DelayEffect* effect ):
|
||||
EffectControls( effect ),
|
||||
m_effect ( effect ),
|
||||
m_delayTimeModel( 2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Delay Samples" )) ,
|
||||
m_delayTimeModel( 0.5, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Delay Samples" )) ,
|
||||
m_feedbackModel(0.0f,0.0f,1.0f,0.01f,this,tr( "Feedback" ) ),
|
||||
m_lfoTimeModel(2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Lfo Frequency" ) ),
|
||||
m_lfoAmountModel(0.0, 0.0, 2.0, 0.0001, 2000.0, this, tr ( "Lfo Amount" ) )
|
||||
|
||||
@@ -31,40 +31,41 @@
|
||||
|
||||
|
||||
DelayControlsDialog::DelayControlsDialog( DelayControls *controls ) :
|
||||
EffectControlDialog( controls )
|
||||
EffectControlDialog( controls )
|
||||
{
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 200, 75 );
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 200, 75 );
|
||||
|
||||
TempoSyncKnob* sampleDelayKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
sampleDelayKnob->move( 20,10 );
|
||||
sampleDelayKnob->setVolumeKnob( false );
|
||||
sampleDelayKnob->setModel( &controls->m_delayTimeModel );
|
||||
sampleDelayKnob->setLabel( tr( "Delay" ) );
|
||||
sampleDelayKnob->setHintText( tr( "Delay Time Seconds:" ) + " ", "" );
|
||||
sampleDelayKnob->setHintText( tr( "Delay Time" ) + " ", " s" );
|
||||
|
||||
Knob * feedbackKnob = new Knob( knobBright_26, this );
|
||||
feedbackKnob->move( 63,10 );
|
||||
feedbackKnob->setVolumeKnob( true) ;
|
||||
feedbackKnob->setModel( &controls->m_feedbackModel);
|
||||
feedbackKnob->setLabel( tr( "Regen" ) );
|
||||
feedbackKnob->setHintText( tr ( "Feedback Amount:" ) + " ", "" );
|
||||
feedbackKnob->setHintText( tr ( "Feedback Amount" ) + " " , "" );
|
||||
|
||||
TempoSyncKnob * lfoFreqKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
lfoFreqKnob->move( 106,10 );
|
||||
lfoFreqKnob->setVolumeKnob( false );
|
||||
lfoFreqKnob->setModel( &controls->m_lfoTimeModel );
|
||||
lfoFreqKnob->setLabel( tr( "Rate" ) );
|
||||
lfoFreqKnob->setHintText( tr ( "Lfo Seconds:" ) + " ", "" );
|
||||
lfoFreqKnob->setHintText( tr ( "Lfo") + " ", " s" );
|
||||
|
||||
TempoSyncKnob * lfoAmtKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
lfoAmtKnob->move( 150,10 );
|
||||
lfoAmtKnob->setVolumeKnob( false );
|
||||
lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
|
||||
lfoAmtKnob->setLabel( tr( "Lfo" ) );
|
||||
lfoAmtKnob->setHintText( tr ( "Lfo Amt:" ) + " ", "" );
|
||||
lfoAmtKnob->setHintText( tr ( "Lfo Amt" ) + " " , " s" );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ dynProcControlDialog::dynProcControlDialog(
|
||||
inputKnob -> move( 14, 251 );
|
||||
inputKnob->setModel( &_controls->m_inputModel );
|
||||
inputKnob->setLabel( tr( "INPUT" ) );
|
||||
inputKnob->setHintText( tr( "Input gain:" ) + " ", "" );
|
||||
inputKnob->setHintText( tr( "Input gain:" ) , "" );
|
||||
|
||||
Knob * outputKnob = new Knob( knobBright_26, this );
|
||||
outputKnob -> setVolumeKnob( true );
|
||||
@@ -71,19 +71,19 @@ dynProcControlDialog::dynProcControlDialog(
|
||||
outputKnob -> move( 54, 251 );
|
||||
outputKnob->setModel( &_controls->m_outputModel );
|
||||
outputKnob->setLabel( tr( "OUTPUT" ) );
|
||||
outputKnob->setHintText( tr( "Output gain:" ) + " ", "" );
|
||||
outputKnob->setHintText( tr( "Output gain:" ) , "" );
|
||||
|
||||
Knob * attackKnob = new Knob( knobBright_26, this);
|
||||
attackKnob -> move( 11, 291 );
|
||||
attackKnob->setModel( &_controls->m_attackModel );
|
||||
attackKnob->setLabel( tr( "ATTACK" ) );
|
||||
attackKnob->setHintText( tr( "Peak attack time:" ) + " ", "ms" );
|
||||
attackKnob->setHintText( tr( "Peak attack time:" ) , "ms" );
|
||||
|
||||
Knob * releaseKnob = new Knob( knobBright_26, this );
|
||||
releaseKnob -> move( 52, 291 );
|
||||
releaseKnob->setModel( &_controls->m_releaseModel );
|
||||
releaseKnob->setLabel( tr( "RELEASE" ) );
|
||||
releaseKnob->setHintText( tr( "Peak release time:" ) + " ", "ms" );
|
||||
releaseKnob->setHintText( tr( "Peak release time:" ) , "ms" );
|
||||
|
||||
//waveform control buttons
|
||||
|
||||
|
||||
@@ -32,51 +32,51 @@
|
||||
|
||||
|
||||
FlangerControlsDialog::FlangerControlsDialog( FlangerControls *controls ) :
|
||||
EffectControlDialog( controls )
|
||||
EffectControlDialog( controls )
|
||||
{
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 200, 75 );
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 200, 75 );
|
||||
|
||||
Knob* delayKnob = new Knob( knobBright_26, this );
|
||||
delayKnob->move( 20,10 );
|
||||
delayKnob->setVolumeKnob( false );
|
||||
delayKnob->setModel( &controls->m_delayTimeModel );
|
||||
delayKnob->setLabel( tr( "Delay" ) );
|
||||
delayKnob->setHintText( tr( "Delay Time :" ) + " ", "" );
|
||||
Knob* delayKnob = new Knob( knobBright_26, this );
|
||||
delayKnob->move( 20,10 );
|
||||
delayKnob->setVolumeKnob( false );
|
||||
delayKnob->setModel( &controls->m_delayTimeModel );
|
||||
delayKnob->setLabel( tr( "Delay" ) );
|
||||
delayKnob->setHintText( tr( "Delay Time:" ) + " ", "" );
|
||||
|
||||
TempoSyncKnob * lfoFreqKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
lfoFreqKnob->move( 53,10 );
|
||||
lfoFreqKnob->setVolumeKnob( false );
|
||||
lfoFreqKnob->setModel( &controls->m_lfoFrequencyModel );
|
||||
lfoFreqKnob->setLabel( tr( "Lfo Hz" ) );
|
||||
lfoFreqKnob->setHintText( tr ( "Lfo Hz:" ) + " ", "" );
|
||||
TempoSyncKnob * lfoFreqKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
lfoFreqKnob->move( 53,10 );
|
||||
lfoFreqKnob->setVolumeKnob( false );
|
||||
lfoFreqKnob->setModel( &controls->m_lfoFrequencyModel );
|
||||
lfoFreqKnob->setLabel( tr( "Lfo Hz" ) );
|
||||
lfoFreqKnob->setHintText( tr ( "Lfo:" ) , "s" );
|
||||
|
||||
Knob * lfoAmtKnob = new Knob( knobBright_26, this );
|
||||
lfoAmtKnob->move( 86,10 );
|
||||
lfoAmtKnob->setVolumeKnob( false );
|
||||
lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
|
||||
lfoAmtKnob->setLabel( tr( "Amt" ) );
|
||||
lfoAmtKnob->setHintText( tr ( "Amt" ) + " ", "" );
|
||||
Knob * lfoAmtKnob = new Knob( knobBright_26, this );
|
||||
lfoAmtKnob->move( 86,10 );
|
||||
lfoAmtKnob->setVolumeKnob( false );
|
||||
lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
|
||||
lfoAmtKnob->setLabel( tr( "Amt" ) );
|
||||
lfoAmtKnob->setHintText( tr ( "Amt:" ) , "" );
|
||||
|
||||
Knob * feedbackKnob = new Knob( knobBright_26, this );
|
||||
feedbackKnob->move( 119,10 );
|
||||
feedbackKnob->setVolumeKnob( true) ;
|
||||
feedbackKnob->setModel( &controls->m_feedbackModel );
|
||||
feedbackKnob->setLabel( tr( "Regen" ) );
|
||||
feedbackKnob->setHintText( tr ( "Feedback Amount:" ) + " ", "" );
|
||||
Knob * feedbackKnob = new Knob( knobBright_26, this );
|
||||
feedbackKnob->move( 119,10 );
|
||||
feedbackKnob->setVolumeKnob( true) ;
|
||||
feedbackKnob->setModel( &controls->m_feedbackModel );
|
||||
feedbackKnob->setLabel( tr( "Regen" ) );
|
||||
feedbackKnob->setHintText( tr ( "Feedback Amount:" ) , "" );
|
||||
|
||||
Knob * whiteNoiseKnob = new Knob( knobBright_26, this );
|
||||
whiteNoiseKnob->move( 150,10 );
|
||||
whiteNoiseKnob->setVolumeKnob( true) ;
|
||||
whiteNoiseKnob->setModel( &controls->m_whiteNoiseAmountModel );
|
||||
whiteNoiseKnob->setLabel( tr( "Noise" ) );
|
||||
whiteNoiseKnob->setHintText( tr ( "White Noise Amount:" ) + " ", "" );
|
||||
Knob * whiteNoiseKnob = new Knob( knobBright_26, this );
|
||||
whiteNoiseKnob->move( 150,10 );
|
||||
whiteNoiseKnob->setVolumeKnob( true) ;
|
||||
whiteNoiseKnob->setModel( &controls->m_whiteNoiseAmountModel );
|
||||
whiteNoiseKnob->setLabel( tr( "Noise" ) );
|
||||
whiteNoiseKnob->setHintText( tr ( "White Noise Amount:" ) , "" );
|
||||
|
||||
LedCheckBox* invertCb = new LedCheckBox( tr( "" ), this );
|
||||
invertCb->move( 15,55 );
|
||||
LedCheckBox* invertCb = new LedCheckBox( tr( "" ), this );
|
||||
invertCb->move( 15,55 );
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -280,43 +280,43 @@ kickerInstrumentView::kickerInstrumentView( Instrument * _instrument,
|
||||
const int END_COL = COL1 + 48;
|
||||
|
||||
m_startFreqKnob = new kickerLargeKnob( this );
|
||||
m_startFreqKnob->setHintText( tr( "Start frequency:" ) + " ", "Hz" );
|
||||
m_startFreqKnob->setHintText( tr( "Start frequency:" ), "Hz" );
|
||||
m_startFreqKnob->move( COL1, ROW1 );
|
||||
|
||||
m_endFreqKnob = new kickerLargeKnob( this );
|
||||
m_endFreqKnob->setHintText( tr( "End frequency:" ) + " ", "Hz" );
|
||||
m_endFreqKnob->setHintText( tr( "End frequency:" ), "Hz" );
|
||||
m_endFreqKnob->move( END_COL, ROW1 );
|
||||
|
||||
m_slopeKnob = new kickerKnob( this );
|
||||
m_slopeKnob->setHintText( tr( "Frequency Slope:" ) + " ", "" );
|
||||
m_slopeKnob->setHintText( tr( "Frequency Slope:" ), "" );
|
||||
m_slopeKnob->move( COL3, ROW1 );
|
||||
|
||||
m_gainKnob = new kickerKnob( this );
|
||||
m_gainKnob->setHintText( tr( "Gain:" ) + " ", "" );
|
||||
m_gainKnob->setHintText( tr( "Gain:" ), "" );
|
||||
m_gainKnob->move( COL1, ROW3 );
|
||||
|
||||
m_decayKnob = new kickerEnvKnob( this );
|
||||
m_decayKnob->setHintText( tr( "Envelope Length:" ) + " ", "ms" );
|
||||
m_decayKnob->setHintText( tr( "Envelope Length:" ), "ms" );
|
||||
m_decayKnob->move( COL2, ROW3 );
|
||||
|
||||
m_envKnob = new kickerKnob( this );
|
||||
m_envKnob->setHintText( tr( "Envelope Slope:" ) + " ", "" );
|
||||
m_envKnob->setHintText( tr( "Envelope Slope:" ), "" );
|
||||
m_envKnob->move( COL3, ROW3 );
|
||||
|
||||
m_clickKnob = new kickerKnob( this );
|
||||
m_clickKnob->setHintText( tr( "Click:" ) + " ", "" );
|
||||
m_clickKnob->setHintText( tr( "Click:" ), "" );
|
||||
m_clickKnob->move( COL5, ROW1 );
|
||||
|
||||
m_noiseKnob = new kickerKnob( this );
|
||||
m_noiseKnob->setHintText( tr( "Noise:" ) + " ", "" );
|
||||
m_noiseKnob->setHintText( tr( "Noise:" ), "" );
|
||||
m_noiseKnob->move( COL5, ROW3 );
|
||||
|
||||
m_distKnob = new kickerKnob( this );
|
||||
m_distKnob->setHintText( tr( "Distortion Start:" ) + " ", "" );
|
||||
m_distKnob->setHintText( tr( "Distortion Start:" ), "" );
|
||||
m_distKnob->move( COL4, ROW2 );
|
||||
|
||||
m_distEndKnob = new kickerKnob( this );
|
||||
m_distEndKnob->setHintText( tr( "Distortion End:" ) + " ", "" );
|
||||
m_distEndKnob->setHintText( tr( "Distortion End:" ), "" );
|
||||
m_distEndKnob->move( COL5, ROW2 );
|
||||
|
||||
m_startNoteToggle = new LedCheckBox( "", this, "", LedCheckBox::Green );
|
||||
|
||||
@@ -788,16 +788,18 @@ void lb302Synth::processNote( NotePlayHandle * _n )
|
||||
|
||||
void lb302Synth::play( sampleFrame * _working_buffer )
|
||||
{
|
||||
m_notesMutex.lock();
|
||||
while( ! m_notes.isEmpty() )
|
||||
{
|
||||
processNote( m_notes.takeFirst() );
|
||||
};
|
||||
m_notesMutex.unlock();
|
||||
|
||||
const fpp_t frames = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
process( _working_buffer, frames );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, NULL );
|
||||
release_frame = 0;
|
||||
// release_frame = 0; //removed for issue # 1432
|
||||
}
|
||||
|
||||
|
||||
@@ -824,22 +826,22 @@ lb302SynthView::lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
// GUI
|
||||
m_vcfCutKnob = new Knob( knobBright_26, this );
|
||||
m_vcfCutKnob->move( 75, 130 );
|
||||
m_vcfCutKnob->setHintText( tr( "Cutoff Freq:" ) + " ", "" );
|
||||
m_vcfCutKnob->setHintText( tr( "Cutoff Freq:" ), "" );
|
||||
m_vcfCutKnob->setLabel( "" );
|
||||
|
||||
m_vcfResKnob = new Knob( knobBright_26, this );
|
||||
m_vcfResKnob->move( 120, 130 );
|
||||
m_vcfResKnob->setHintText( tr( "Resonance:" ) + " ", "" );
|
||||
m_vcfResKnob->setHintText( tr( "Resonance:" ), "" );
|
||||
m_vcfResKnob->setLabel( "" );
|
||||
|
||||
m_vcfModKnob = new Knob( knobBright_26, this );
|
||||
m_vcfModKnob->move( 165, 130 );
|
||||
m_vcfModKnob->setHintText( tr( "Env Mod:" ) + " ", "" );
|
||||
m_vcfModKnob->setHintText( tr( "Env Mod:" ), "" );
|
||||
m_vcfModKnob->setLabel( "" );
|
||||
|
||||
m_vcfDecKnob = new Knob( knobBright_26, this );
|
||||
m_vcfDecKnob->move( 210, 130 );
|
||||
m_vcfDecKnob->setHintText( tr( "Decay:" ) + " ", "" );
|
||||
m_vcfDecKnob->setHintText( tr( "Decay:" ), "" );
|
||||
m_vcfDecKnob->setLabel( "" );
|
||||
|
||||
m_slideToggle = new LedCheckBox( "", this );
|
||||
@@ -860,12 +862,12 @@ lb302SynthView::lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
|
||||
m_slideDecKnob = new Knob( knobBright_26, this );
|
||||
m_slideDecKnob->move( 210, 75 );
|
||||
m_slideDecKnob->setHintText( tr( "Slide Decay:" ) + " ", "" );
|
||||
m_slideDecKnob->setHintText( tr( "Slide Decay:" ), "" );
|
||||
m_slideDecKnob->setLabel( "");
|
||||
|
||||
m_distKnob = new Knob( knobBright_26, this );
|
||||
m_distKnob->move( 210, 190 );
|
||||
m_distKnob->setHintText( tr( "DIST:" ) + " ", "" );
|
||||
m_distKnob->setHintText( tr( "DIST:" ), "" );
|
||||
m_distKnob->setLabel( tr( ""));
|
||||
|
||||
|
||||
|
||||
@@ -46,14 +46,14 @@
|
||||
#define makeknob( name, x, y, hint, unit, oname ) \
|
||||
name = new Knob( knobStyled, view ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( tr( hint ) + " ", unit ); \
|
||||
name ->setHintText( tr( hint ), unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
name ->setFixedSize( 20, 20 );
|
||||
|
||||
#define maketsknob( name, x, y, hint, unit, oname ) \
|
||||
name = new TempoSyncKnob( knobStyled, view ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( tr( hint ) + " ", unit ); \
|
||||
name ->setHintText( tr( hint ), unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
name ->setFixedSize( 20, 20 );
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#define makeknob( name, x, y, hint, unit, oname ) \
|
||||
name = new Knob( knobStyled, this ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( tr( hint ) + " ", unit ); \
|
||||
name ->setHintText( tr( hint ), unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
name ->setFixedSize( 29, 29 );
|
||||
|
||||
|
||||
@@ -497,7 +497,7 @@ void opl2instrument::loadPatch(unsigned char inst[14]) {
|
||||
void opl2instrument::tuneEqual(int center, float Hz) {
|
||||
float tmp;
|
||||
for(int n=0; n<128; ++n) {
|
||||
tmp = Hz*pow( 2, ( n - center ) / 12.0 + pitchbend / 1200.0 );
|
||||
tmp = Hz*pow( 2.0, ( n - center ) * ( 1.0 / 12.0 ) + pitchbend * ( 1.0 / 1200.0 ) );
|
||||
fnums[n] = Hz2fnum( tmp );
|
||||
}
|
||||
}
|
||||
@@ -505,7 +505,7 @@ void opl2instrument::tuneEqual(int center, float Hz) {
|
||||
// Find suitable F number in lowest possible block
|
||||
int opl2instrument::Hz2fnum(float Hz) {
|
||||
for(int block=0; block<8; ++block) {
|
||||
unsigned int fnum = Hz * pow(2, 20-block) / 49716;
|
||||
unsigned int fnum = Hz * pow( 2.0, 20.0 - (double)block ) * ( 1.0 / 49716.0 );
|
||||
if(fnum<1023) {
|
||||
return fnum + (block << 10);
|
||||
}
|
||||
@@ -586,7 +586,7 @@ opl2instrumentView::opl2instrumentView( Instrument * _instrument,
|
||||
|
||||
#define KNOB_GEN(knobname, hinttext, hintunit,xpos,ypos) \
|
||||
knobname = new Knob( knobStyled, this );\
|
||||
knobname->setHintText( tr(hinttext) + "", hintunit );\
|
||||
knobname->setHintText( tr(hinttext), hintunit );\
|
||||
knobname->setFixedSize(22,22);\
|
||||
knobname->setCenterPointX(11.0);\
|
||||
knobname->setCenterPointY(11.0);\
|
||||
|
||||
@@ -433,7 +433,7 @@ organicInstrumentView::organicInstrumentView( Instrument * _instrument,
|
||||
m_fx1Knob = new organicKnob( this );
|
||||
m_fx1Knob->move( 15, 201 );
|
||||
m_fx1Knob->setFixedSize( 37, 47 );
|
||||
m_fx1Knob->setHintText( tr( "Distortion:" ) + " ", QString() );
|
||||
m_fx1Knob->setHintText( tr( "Distortion:" ), QString() );
|
||||
m_fx1Knob->setObjectName( "fx1Knob" );
|
||||
m_fx1Knob->setWhatsThis( tr( "The distortion knob adds distortion to the output of the instrument. " ) );
|
||||
|
||||
@@ -442,7 +442,7 @@ organicInstrumentView::organicInstrumentView( Instrument * _instrument,
|
||||
m_volKnob->setVolumeKnob( true );
|
||||
m_volKnob->move( 60, 201 );
|
||||
m_volKnob->setFixedSize( 37, 47 );
|
||||
m_volKnob->setHintText( tr( "Volume:" ) + " ", "%" );
|
||||
m_volKnob->setHintText( tr( "Volume:" ), "%" );
|
||||
m_volKnob->setObjectName( "volKnob" );
|
||||
m_volKnob->setWhatsThis( tr( "The volume knob controls the volume of the output of the instrument. "
|
||||
"It is cumulative with the instrument window's volume control. " ) );
|
||||
@@ -513,7 +513,7 @@ void organicInstrumentView::modelChanged()
|
||||
connect( &oi->m_osc[i]->m_oscModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( updateKnobHint() ) );
|
||||
|
||||
oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg( i + 1 ) + " ", QString() );
|
||||
oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg( i + 1 ), QString() );
|
||||
|
||||
// setup volume-knob
|
||||
Knob * volKnob = new Knob( knobStyled, this );
|
||||
@@ -521,19 +521,19 @@ void organicInstrumentView::modelChanged()
|
||||
volKnob->move( x + i * colWidth, y + rowHeight*1 );
|
||||
volKnob->setFixedSize( 21, 21 );
|
||||
volKnob->setHintText( tr( "Osc %1 volume:" ).arg(
|
||||
i + 1 ) + " ", "%" );
|
||||
i + 1 ), "%" );
|
||||
|
||||
// setup panning-knob
|
||||
Knob * panKnob = new organicKnob( this );
|
||||
panKnob->move( x + i * colWidth, y + rowHeight*2 );
|
||||
panKnob->setHintText( tr("Osc %1 panning:").arg(
|
||||
i + 1 ) + " ", "" );
|
||||
i + 1 ), "" );
|
||||
|
||||
// setup knob for fine-detuning
|
||||
Knob * detuneKnob = new organicKnob( this );
|
||||
detuneKnob->move( x + i * colWidth, y + rowHeight*3 );
|
||||
detuneKnob->setHintText( tr( "Osc %1 stereo detuning" ).arg( i + 1 )
|
||||
+ " ", " " +
|
||||
, " " +
|
||||
tr( "cents" ) );
|
||||
|
||||
m_oscKnobs[i] = OscillatorKnobs( harmKnob, volKnob, oscKnob, panKnob, detuneKnob );
|
||||
@@ -557,9 +557,9 @@ void organicInstrumentView::updateKnobHint()
|
||||
const float harm = oi->m_osc[i]->m_harmModel.value();
|
||||
const float wave = oi->m_osc[i]->m_oscModel.value();
|
||||
|
||||
m_oscKnobs[i].m_harmKnob->setHintText( tr( "Osc %1 harmonic:" ) + " ", " (" +
|
||||
m_oscKnobs[i].m_harmKnob->setHintText( tr( "Osc %1 harmonic:" ), " (" +
|
||||
HARMONIC_NAMES[ static_cast<int>( harm ) ] + ")" );
|
||||
m_oscKnobs[i].m_oscKnob->setHintText( tr( "Osc %1 waveform:" ) + " ", " (" +
|
||||
m_oscKnobs[i].m_oscKnob->setHintText( tr( "Osc %1 waveform:" ), " (" +
|
||||
WAVEFORM_NAMES[ static_cast<int>( wave ) ] + ")" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,11 +361,11 @@ void papuInstrument::playNote( NotePlayHandle * _n,
|
||||
//PRNG Frequency = (1048576 Hz / (ratio + 1)) / 2 ^ (shiftclockfreq + 1)
|
||||
char sopt=0;
|
||||
char ropt=1;
|
||||
float fopt = 524288.0 / ( ropt * pow( 2, sopt+1 ) );
|
||||
float fopt = 524288.0 / ( ropt * pow( 2.0, sopt + 1.0 ) );
|
||||
float f;
|
||||
for ( char s=0; s<16; s++ )
|
||||
for ( char r=0; r<8; r++ ) {
|
||||
f = 524288.0 / ( r * pow( 2, s+1 ) );
|
||||
f = 524288.0 / ( r * pow( 2.0, s + 1.0 ) );
|
||||
if( fabs( freq-fopt ) > fabs( freq-f ) ) {
|
||||
fopt = f;
|
||||
ropt = r;
|
||||
@@ -456,7 +456,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
setPalette( pal );
|
||||
|
||||
m_ch1SweepTimeKnob = new papuKnob( this );
|
||||
m_ch1SweepTimeKnob->setHintText( tr( "Sweep Time:" ) + " ", "" );
|
||||
m_ch1SweepTimeKnob->setHintText( tr( "Sweep Time:" ), "" );
|
||||
m_ch1SweepTimeKnob->move( 5 + 4*32, 106 );
|
||||
ToolTip::add( m_ch1SweepTimeKnob, tr( "Sweep Time" ) );
|
||||
m_ch1SweepTimeKnob->setWhatsThis( tr( "The amount of increase or"
|
||||
@@ -464,7 +464,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
|
||||
m_ch1SweepRtShiftKnob = new papuKnob( this );
|
||||
m_ch1SweepRtShiftKnob->setHintText( tr( "Sweep RtShift amount:" )
|
||||
+ " ", "" );
|
||||
, "" );
|
||||
m_ch1SweepRtShiftKnob->move( 5 + 3*32, 106 );
|
||||
ToolTip::add( m_ch1SweepRtShiftKnob, tr( "Sweep RtShift amount" ) );
|
||||
m_ch1SweepRtShiftKnob->setWhatsThis( tr( "The rate at which increase or"
|
||||
@@ -472,7 +472,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
|
||||
m_ch1WavePatternDutyKnob = new papuKnob( this );
|
||||
m_ch1WavePatternDutyKnob->setHintText( tr( "Wave pattern duty:" )
|
||||
+ " ", "" );
|
||||
, "" );
|
||||
m_ch1WavePatternDutyKnob->move( 5 + 2*32, 106 );
|
||||
ToolTip::add( m_ch1WavePatternDutyKnob, tr( "Wave Pattern Duty" ) );
|
||||
m_ch1WavePatternDutyKnob->setWhatsThis( tr( "The duty cycle is the ratio of"
|
||||
@@ -481,14 +481,14 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
|
||||
m_ch1VolumeKnob = new papuKnob( this );
|
||||
m_ch1VolumeKnob->setHintText( tr( "Square Channel 1 Volume:" )
|
||||
+ " ", "" );
|
||||
, "" );
|
||||
m_ch1VolumeKnob->move( 5, 106 );
|
||||
ToolTip::add( m_ch1VolumeKnob, tr( "Square Channel 1 Volume:" ) );
|
||||
m_ch1VolumeKnob->setWhatsThis( tr( "Square Channel 1 Volume" ) );
|
||||
|
||||
m_ch1SweepStepLengthKnob = new papuKnob( this );
|
||||
m_ch1SweepStepLengthKnob->setHintText( tr( "Length of each step in sweep:" )
|
||||
+ " ", "" );
|
||||
, "" );
|
||||
m_ch1SweepStepLengthKnob->move( 5 + 32, 106 );
|
||||
ToolTip::add( m_ch1SweepStepLengthKnob, tr( "Length of each step in sweep" ) );
|
||||
m_ch1SweepStepLengthKnob->setWhatsThis( tr( "The delay between step change" ) );
|
||||
@@ -497,7 +497,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
|
||||
m_ch2WavePatternDutyKnob = new papuKnob( this );
|
||||
m_ch2WavePatternDutyKnob->setHintText( tr( "Wave pattern duty:" )
|
||||
+ " ", "" );
|
||||
, "" );
|
||||
m_ch2WavePatternDutyKnob->move( 5 + 2*32, 155 );
|
||||
ToolTip::add( m_ch2WavePatternDutyKnob, tr( "Wave pattern duty" ) );
|
||||
m_ch2WavePatternDutyKnob->setWhatsThis( tr( "The duty cycle is the ratio of"
|
||||
@@ -506,14 +506,14 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
|
||||
m_ch2VolumeKnob = new papuKnob( this );
|
||||
m_ch2VolumeKnob->setHintText( tr( "Square Channel 2 Volume:" )
|
||||
+ " ", "" );
|
||||
, "" );
|
||||
m_ch2VolumeKnob->move( 5, 155 );
|
||||
ToolTip::add( m_ch2VolumeKnob, tr( "Square Channel 2 Volume" ) );
|
||||
m_ch2VolumeKnob->setWhatsThis( tr( "Square Channel 2 Volume" ) );
|
||||
|
||||
m_ch2SweepStepLengthKnob = new papuKnob( this );
|
||||
m_ch2SweepStepLengthKnob->setHintText( tr( "Length of each step in sweep:" )
|
||||
+ " ", "" );
|
||||
, "" );
|
||||
m_ch2SweepStepLengthKnob->move( 5 + 32, 155 );
|
||||
ToolTip::add( m_ch2SweepStepLengthKnob, tr( "Length of each step in sweep" ) );
|
||||
m_ch2SweepStepLengthKnob->setWhatsThis( tr( "The delay between step change" ) );
|
||||
@@ -521,7 +521,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
|
||||
|
||||
m_ch3VolumeKnob = new papuKnob( this );
|
||||
m_ch3VolumeKnob->setHintText( tr( "Wave Channel Volume:" ) + " ", "" );
|
||||
m_ch3VolumeKnob->setHintText( tr( "Wave Channel Volume:" ), "" );
|
||||
m_ch3VolumeKnob->move( 5, 204 );
|
||||
ToolTip::add( m_ch3VolumeKnob, tr( "Wave Channel Volume" ) );
|
||||
m_ch3VolumeKnob->setWhatsThis( tr( "Wave Channel Volume" ) );
|
||||
@@ -529,14 +529,14 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
|
||||
|
||||
m_ch4VolumeKnob = new papuKnob( this );
|
||||
m_ch4VolumeKnob->setHintText( tr( "Noise Channel Volume:" ) + " ", "" );
|
||||
m_ch4VolumeKnob->setHintText( tr( "Noise Channel Volume:" ), "" );
|
||||
m_ch4VolumeKnob->move( 144, 155 );
|
||||
ToolTip::add( m_ch4VolumeKnob, tr( "Noise Channel Volume" ) );
|
||||
m_ch4VolumeKnob->setWhatsThis( tr( "Noise Channel Volume" ) );
|
||||
|
||||
m_ch4SweepStepLengthKnob = new papuKnob( this );
|
||||
m_ch4SweepStepLengthKnob->setHintText( tr( "Length of each step in sweep:" )
|
||||
+ " ", "" );
|
||||
, "" );
|
||||
m_ch4SweepStepLengthKnob->move( 144 + 32, 155 );
|
||||
ToolTip::add( m_ch4SweepStepLengthKnob, tr( "Length of each step in sweep" ) );
|
||||
m_ch4SweepStepLengthKnob->setWhatsThis( tr( "The delay between step change" ) );
|
||||
@@ -544,22 +544,22 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
|
||||
|
||||
m_so1VolumeKnob = new papuKnob( this );
|
||||
m_so1VolumeKnob->setHintText( tr( "SO1 Volume (Right):" ) + " ", "" );
|
||||
m_so1VolumeKnob->setHintText( tr( "SO1 Volume (Right):" ), "" );
|
||||
m_so1VolumeKnob->move( 5, 58 );
|
||||
ToolTip::add( m_so1VolumeKnob, tr( "SO1 Volume (Right)" ) );
|
||||
|
||||
m_so2VolumeKnob = new papuKnob( this );
|
||||
m_so2VolumeKnob->setHintText( tr( "SO2 Volume (Left):" ) + " ", "" );
|
||||
m_so2VolumeKnob->setHintText( tr( "SO2 Volume (Left):" ), "" );
|
||||
m_so2VolumeKnob->move( 5 + 32, 58 );
|
||||
ToolTip::add( m_so2VolumeKnob, tr( "SO2 Volume (Left)" ) );
|
||||
|
||||
m_trebleKnob = new papuKnob( this );
|
||||
m_trebleKnob->setHintText( tr( "Treble:" ) + " ", "" );
|
||||
m_trebleKnob->setHintText( tr( "Treble:" ), "" );
|
||||
m_trebleKnob->move( 5 + 2*32, 58 );
|
||||
ToolTip::add( m_trebleKnob, tr( "Treble" ) );
|
||||
|
||||
m_bassKnob = new papuKnob( this );
|
||||
m_bassKnob->setHintText( tr( "Bass:" ) + " ", "" );
|
||||
m_bassKnob->setHintText( tr( "Bass:" ), "" );
|
||||
m_bassKnob->move( 5 + 3*32, 58 );
|
||||
ToolTip::add( m_bassKnob, tr( "Bass" ) );
|
||||
|
||||
|
||||
@@ -53,32 +53,32 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
|
||||
m_baseKnob = new Knob( knobBright_26, this );
|
||||
m_baseKnob->setLabel( tr( "BASE" ) );
|
||||
m_baseKnob->setModel( &_controls->m_baseModel );
|
||||
m_baseKnob->setHintText( tr( "Base amount:" ) + " ", "" );
|
||||
m_baseKnob->setHintText( tr( "Base amount:" ) , "" );
|
||||
|
||||
m_amountKnob = new Knob( knobBright_26, this );
|
||||
m_amountKnob->setLabel( tr( "AMNT" ) );
|
||||
m_amountKnob->setModel( &_controls->m_amountModel );
|
||||
m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
|
||||
m_amountKnob->setHintText( tr( "Modulation amount:" ) , "" );
|
||||
|
||||
m_amountMultKnob = new Knob( knobBright_26, this );
|
||||
m_amountMultKnob->setLabel( tr( "MULT" ) );
|
||||
m_amountMultKnob->setModel( &_controls->m_amountMultModel );
|
||||
m_amountMultKnob->setHintText( tr( "Amount Multiplicator:" ) + " ", "" );
|
||||
m_amountMultKnob->setHintText( tr( "Amount Multiplicator:" ) , "" );
|
||||
|
||||
m_attackKnob = new Knob( knobBright_26, this );
|
||||
m_attackKnob->setLabel( tr( "ATCK" ) );
|
||||
m_attackKnob->setModel( &_controls->m_attackModel );
|
||||
m_attackKnob->setHintText( tr( "Attack:" ) + " ", "" );
|
||||
m_attackKnob->setHintText( tr( "Attack:" ) , "" );
|
||||
|
||||
m_decayKnob = new Knob( knobBright_26, this );
|
||||
m_decayKnob->setLabel( tr( "DCAY" ) );
|
||||
m_decayKnob->setModel( &_controls->m_decayModel );
|
||||
m_decayKnob->setHintText( tr( "Release:" ) + " ", "" );
|
||||
m_decayKnob->setHintText( tr( "Release:" ) , "" );
|
||||
|
||||
m_tresholdKnob = new Knob( knobBright_26, this );
|
||||
m_tresholdKnob->setLabel( tr( "TRES" ) );
|
||||
m_tresholdKnob->setModel( &_controls->m_tresholdModel );
|
||||
m_tresholdKnob->setHintText( tr( "Treshold:" ) + " ", "" );
|
||||
m_tresholdKnob->setHintText( tr( "Treshold:" ) , "" );
|
||||
|
||||
l->addWidget( m_baseKnob );
|
||||
l->addWidget( m_amountKnob );
|
||||
|
||||
@@ -870,7 +870,7 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _paren
|
||||
|
||||
// Gain
|
||||
m_gainKnob = new sf2Knob( this );
|
||||
m_gainKnob->setHintText( tr("Gain") + " ", "" );
|
||||
m_gainKnob->setHintText( tr("Gain"), "" );
|
||||
m_gainKnob->move( 86, 55 );
|
||||
// vl->addWidget( m_gainKnob );
|
||||
|
||||
@@ -891,19 +891,19 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _paren
|
||||
|
||||
|
||||
m_reverbRoomSizeKnob = new sf2Knob( this );
|
||||
m_reverbRoomSizeKnob->setHintText( tr("Reverb Roomsize:") + " ", "" );
|
||||
m_reverbRoomSizeKnob->setHintText( tr("Reverb Roomsize:"), "" );
|
||||
m_reverbRoomSizeKnob->move( 93, 160 );
|
||||
|
||||
m_reverbDampingKnob = new sf2Knob( this );
|
||||
m_reverbDampingKnob->setHintText( tr("Reverb Damping:") + " ", "" );
|
||||
m_reverbDampingKnob->setHintText( tr("Reverb Damping:"), "" );
|
||||
m_reverbDampingKnob->move( 130, 160 );
|
||||
|
||||
m_reverbWidthKnob = new sf2Knob( this );
|
||||
m_reverbWidthKnob->setHintText( tr("Reverb Width:") + " ", "" );
|
||||
m_reverbWidthKnob->setHintText( tr("Reverb Width:"), "" );
|
||||
m_reverbWidthKnob->move( 167, 160 );
|
||||
|
||||
m_reverbLevelKnob = new sf2Knob( this );
|
||||
m_reverbLevelKnob->setHintText( tr("Reverb Level:") + " ", "" );
|
||||
m_reverbLevelKnob->setHintText( tr("Reverb Level:"), "" );
|
||||
m_reverbLevelKnob->move( 204, 160 );
|
||||
|
||||
/* hl->addWidget( m_reverbOnLed );
|
||||
@@ -930,19 +930,19 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _paren
|
||||
"files that support it." ) );
|
||||
|
||||
m_chorusNumKnob = new sf2Knob( this );
|
||||
m_chorusNumKnob->setHintText( tr("Chorus Lines:") + " ", "" );
|
||||
m_chorusNumKnob->setHintText( tr("Chorus Lines:"), "" );
|
||||
m_chorusNumKnob->move( 93, 206 );
|
||||
|
||||
m_chorusLevelKnob = new sf2Knob( this );
|
||||
m_chorusLevelKnob->setHintText( tr("Chorus Level:") + " ", "" );
|
||||
m_chorusLevelKnob->setHintText( tr("Chorus Level:"), "" );
|
||||
m_chorusLevelKnob->move( 130 , 206 );
|
||||
|
||||
m_chorusSpeedKnob = new sf2Knob( this );
|
||||
m_chorusSpeedKnob->setHintText( tr("Chorus Speed:") + " ", "" );
|
||||
m_chorusSpeedKnob->setHintText( tr("Chorus Speed:"), "" );
|
||||
m_chorusSpeedKnob->move( 167 , 206 );
|
||||
|
||||
m_chorusDepthKnob = new sf2Knob( this );
|
||||
m_chorusDepthKnob->setHintText( tr("Chorus Depth:") + " ", "" );
|
||||
m_chorusDepthKnob->setHintText( tr("Chorus Depth:"), "" );
|
||||
m_chorusDepthKnob->move( 204 , 206 );
|
||||
/*
|
||||
hl->addWidget( m_chorusOnLed );
|
||||
|
||||
@@ -487,15 +487,15 @@ sidInstrumentView::sidInstrumentView( Instrument * _instrument,
|
||||
setPalette( pal );
|
||||
|
||||
m_volKnob = new sidKnob( this );
|
||||
m_volKnob->setHintText( tr( "Volume:" ) + " ", "" );
|
||||
m_volKnob->setHintText( tr( "Volume:" ), "" );
|
||||
m_volKnob->move( 7, 64 );
|
||||
|
||||
m_resKnob = new sidKnob( this );
|
||||
m_resKnob->setHintText( tr( "Resonance:" ) + " ", "" );
|
||||
m_resKnob->setHintText( tr( "Resonance:" ), "" );
|
||||
m_resKnob->move( 7 + 28, 64 );
|
||||
|
||||
m_cutKnob = new sidKnob( this );
|
||||
m_cutKnob->setHintText( tr( "Cutoff frequency:" ) + " ", "Hz" );
|
||||
m_cutKnob->setHintText( tr( "Cutoff frequency:" ), "Hz" );
|
||||
m_cutKnob->move( 7 + 2*28, 64 );
|
||||
|
||||
PixmapButton * hp_btn = new PixmapButton( this, NULL );
|
||||
@@ -547,32 +547,32 @@ sidInstrumentView::sidInstrumentView( Instrument * _instrument,
|
||||
for( int i = 0; i < 3; i++ )
|
||||
{
|
||||
Knob *ak = new sidKnob( this );
|
||||
ak->setHintText( tr("Attack:") + " ", "" );
|
||||
ak->setHintText( tr("Attack:"), "" );
|
||||
ak->move( 7, 114 + i*50 );
|
||||
ak->setWhatsThis( tr ( "Attack rate determines how rapidly the output "
|
||||
"of Voice %1 rises from zero to peak amplitude." ).arg( i+1 ) );
|
||||
|
||||
Knob *dk = new sidKnob( this );
|
||||
dk->setHintText( tr("Decay:") + " ", "" );
|
||||
dk->setHintText( tr("Decay:") , "" );
|
||||
dk->move( 7 + 28, 114 + i*50 );
|
||||
dk->setWhatsThis( tr ( "Decay rate determines how rapidly the output "
|
||||
"falls from the peak amplitude to the selected Sustain level." ) );
|
||||
|
||||
Knob *sk = new sidKnob( this );
|
||||
sk->setHintText( tr("Sustain:") + " ", "" );
|
||||
sk->setHintText( tr("Sustain:"), "" );
|
||||
sk->move( 7 + 2*28, 114 + i*50 );
|
||||
sk->setWhatsThis( tr ( "Output of Voice %1 will remain at the selected "
|
||||
"Sustain amplitude as long as the note is held." ).arg( i+1 ) );
|
||||
|
||||
Knob *rk = new sidKnob( this );
|
||||
rk->setHintText( tr("Release:") + " ", "" );
|
||||
rk->setHintText( tr("Release:"), "" );
|
||||
rk->move( 7 + 3*28, 114 + i*50 );
|
||||
rk->setWhatsThis( tr ( "The output of of Voice %1 will fall from "
|
||||
"Sustain amplitude to zero amplitude at the selected Release "
|
||||
"rate." ).arg( i+1 ) );
|
||||
|
||||
Knob *pwk = new sidKnob( this );
|
||||
pwk->setHintText( tr("Pulse Width:") + " ", "" );
|
||||
pwk->setHintText( tr("Pulse Width:"), "" );
|
||||
pwk->move( 7 + 4*28, 114 + i*50 );
|
||||
pwk->setWhatsThis( tr ( "The Pulse Width resolution allows the width "
|
||||
"to be smoothly swept with no discernable stepping. The Pulse "
|
||||
@@ -580,7 +580,7 @@ sidInstrumentView::sidInstrumentView( Instrument * _instrument,
|
||||
" effect." ).arg( i+1 ) );
|
||||
|
||||
Knob *crsk = new sidKnob( this );
|
||||
crsk->setHintText( tr("Coarse:") + " ", " semitones" );
|
||||
crsk->setHintText( tr("Coarse:"), " semitones" );
|
||||
crsk->move( 147, 114 + i*50 );
|
||||
crsk->setWhatsThis( tr ( "The Coarse detuning allows to detune Voice "
|
||||
"%1 one octave up or down." ).arg( i+1 ) );
|
||||
|
||||
@@ -40,7 +40,7 @@ stereoEnhancerControlDialog::stereoEnhancerControlDialog(
|
||||
Knob * widthKnob = new Knob( knobBright_26, this );
|
||||
widthKnob->setModel( &_controls->m_widthModel );
|
||||
widthKnob->setLabel( tr( "WIDE" ) );
|
||||
widthKnob->setHintText( tr( "Width:" ) + " ", "samples" );
|
||||
widthKnob->setHintText( tr( "Width:" ) , "samples" );
|
||||
|
||||
l->addWidget( widthKnob );
|
||||
|
||||
|
||||
@@ -49,22 +49,22 @@ stereoMatrixControlDialog::stereoMatrixControlDialog(
|
||||
|
||||
Knob * llKnob = new Knob( knobSmall_17, this );
|
||||
llKnob->setModel( &_controls->m_llModel );
|
||||
llKnob->setHintText( tr( "Left to Left Vol:" ) + " ", "" );
|
||||
llKnob->setHintText( tr( "Left to Left Vol:" ) , "" );
|
||||
llKnob->move( 40, 60 );
|
||||
|
||||
Knob * lrKnob = new Knob( knobSmall_17, this );
|
||||
lrKnob->setModel( &_controls->m_lrModel );
|
||||
lrKnob->setHintText( tr( "Left to Right Vol:" ) + " ", "" );
|
||||
lrKnob->setHintText( tr( "Left to Right Vol:" ) , "" );
|
||||
lrKnob->move( 40+28, 60);
|
||||
|
||||
Knob * rlKnob = new Knob( knobSmall_17, this );
|
||||
rlKnob->setModel( &_controls->m_rlModel );
|
||||
rlKnob->setHintText( tr( "Right to Left Vol:" ) + " ", "" );
|
||||
rlKnob->setHintText( tr( "Right to Left Vol:" ) , "" );
|
||||
rlKnob->move( 40, 60+28 );
|
||||
|
||||
Knob * rrKnob = new Knob( knobSmall_17, this );
|
||||
rrKnob->setModel( &_controls->m_rrModel );
|
||||
rrKnob->setHintText( tr( "Right to Right Vol:" ) + " ", "" );
|
||||
rrKnob->setHintText( tr( "Right to Right Vol:" ) , "" );
|
||||
rrKnob->move( 40+28, 60+28 );
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ malletsInstrumentView::malletsInstrumentView( malletsInstrument * _instrument,
|
||||
m_spreadKnob = new Knob( knobVintage_32, this );
|
||||
m_spreadKnob->setLabel( tr( "Spread" ) );
|
||||
m_spreadKnob->move( 190, 140 );
|
||||
m_spreadKnob->setHintText( tr( "Spread:" ) + " ", "" );
|
||||
m_spreadKnob->setHintText( tr( "Spread:" ), "" );
|
||||
}
|
||||
|
||||
|
||||
@@ -366,27 +366,27 @@ QWidget * malletsInstrumentView::setupModalBarControls( QWidget * _parent )
|
||||
m_hardnessKnob = new Knob( knobVintage_32, widget );
|
||||
m_hardnessKnob->setLabel( tr( "Hardness" ) );
|
||||
m_hardnessKnob->move( 30, 90 );
|
||||
m_hardnessKnob->setHintText( tr( "Hardness:" ) + " ", "" );
|
||||
m_hardnessKnob->setHintText( tr( "Hardness:" ), "" );
|
||||
|
||||
m_positionKnob = new Knob( knobVintage_32, widget );
|
||||
m_positionKnob->setLabel( tr( "Position" ) );
|
||||
m_positionKnob->move( 110, 90 );
|
||||
m_positionKnob->setHintText( tr( "Position:" ) + " ", "" );
|
||||
m_positionKnob->setHintText( tr( "Position:" ), "" );
|
||||
|
||||
m_vibratoGainKnob = new Knob( knobVintage_32, widget );
|
||||
m_vibratoGainKnob->setLabel( tr( "Vib Gain" ) );
|
||||
m_vibratoGainKnob->move( 30, 140 );
|
||||
m_vibratoGainKnob->setHintText( tr( "Vib Gain:" ) + " ", "" );
|
||||
m_vibratoGainKnob->setHintText( tr( "Vib Gain:" ), "" );
|
||||
|
||||
m_vibratoFreqKnob = new Knob( knobVintage_32, widget );
|
||||
m_vibratoFreqKnob->setLabel( tr( "Vib Freq" ) );
|
||||
m_vibratoFreqKnob->move( 110, 140 );
|
||||
m_vibratoFreqKnob->setHintText( tr( "Vib Freq:" ) + " ", "" );
|
||||
m_vibratoFreqKnob->setHintText( tr( "Vib Freq:" ), "" );
|
||||
|
||||
m_stickKnob = new Knob( knobVintage_32, widget );
|
||||
m_stickKnob->setLabel( tr( "Stick Mix" ) );
|
||||
m_stickKnob->move( 190, 90 );
|
||||
m_stickKnob->setHintText( tr( "Stick Mix:" ) + " ", "" );
|
||||
m_stickKnob->setHintText( tr( "Stick Mix:" ), "" );
|
||||
|
||||
return( widget );
|
||||
}
|
||||
@@ -402,27 +402,27 @@ QWidget * malletsInstrumentView::setupTubeBellControls( QWidget * _parent )
|
||||
m_modulatorKnob = new Knob( knobVintage_32, widget );
|
||||
m_modulatorKnob->setLabel( tr( "Modulator" ) );
|
||||
m_modulatorKnob->move( 30, 90 );
|
||||
m_modulatorKnob->setHintText( tr( "Modulator:" ) + " ", "" );
|
||||
m_modulatorKnob->setHintText( tr( "Modulator:" ), "" );
|
||||
|
||||
m_crossfadeKnob = new Knob( knobVintage_32, widget );
|
||||
m_crossfadeKnob->setLabel( tr( "Crossfade" ) );
|
||||
m_crossfadeKnob->move( 110, 90 );
|
||||
m_crossfadeKnob->setHintText( tr( "Crossfade:" ) + " ", "" );
|
||||
m_crossfadeKnob->setHintText( tr( "Crossfade:" ), "" );
|
||||
|
||||
m_lfoSpeedKnob = new Knob( knobVintage_32, widget );
|
||||
m_lfoSpeedKnob->setLabel( tr( "LFO Speed" ) );
|
||||
m_lfoSpeedKnob->move( 30, 140 );
|
||||
m_lfoSpeedKnob->setHintText( tr( "LFO Speed:" ) + " ", "" );
|
||||
m_lfoSpeedKnob->setHintText( tr( "LFO Speed:" ), "" );
|
||||
|
||||
m_lfoDepthKnob = new Knob( knobVintage_32, widget );
|
||||
m_lfoDepthKnob->setLabel( tr( "LFO Depth" ) );
|
||||
m_lfoDepthKnob->move( 110, 140 );
|
||||
m_lfoDepthKnob->setHintText( tr( "LFO Depth:" ) + " ", "" );
|
||||
m_lfoDepthKnob->setHintText( tr( "LFO Depth:" ), "" );
|
||||
|
||||
m_adsrKnob = new Knob( knobVintage_32, widget );
|
||||
m_adsrKnob->setLabel( tr( "ADSR" ) );
|
||||
m_adsrKnob->move( 190, 90 );
|
||||
m_adsrKnob->setHintText( tr( "ADSR:" ) + " ", "" );
|
||||
m_adsrKnob->setHintText( tr( "ADSR:" ), "" );
|
||||
|
||||
return( widget );
|
||||
}
|
||||
@@ -442,22 +442,22 @@ QWidget * malletsInstrumentView::setupBandedWGControls( QWidget * _parent )
|
||||
m_pressureKnob = new Knob( knobVintage_32, widget );
|
||||
m_pressureKnob->setLabel( tr( "Pressure" ) );
|
||||
m_pressureKnob->move( 30, 90 );
|
||||
m_pressureKnob->setHintText( tr( "Pressure:" ) + " ", "" );
|
||||
m_pressureKnob->setHintText( tr( "Pressure:" ), "" );
|
||||
|
||||
m_motionKnob = new Knob( knobVintage_32, widget );
|
||||
m_motionKnob->setLabel( tr( "Motion" ) );
|
||||
m_motionKnob->move( 110, 90 );
|
||||
m_motionKnob->setHintText( tr( "Motion:" ) + " ", "" );
|
||||
m_motionKnob->setHintText( tr( "Motion:" ), "" );
|
||||
|
||||
m_velocityKnob = new Knob( knobVintage_32, widget );
|
||||
m_velocityKnob->setLabel( tr( "Speed" ) );
|
||||
m_velocityKnob->move( 30, 140 );
|
||||
m_velocityKnob->setHintText( tr( "Speed:" ) + " ", "" );
|
||||
m_velocityKnob->setHintText( tr( "Speed:" ), "" );
|
||||
|
||||
m_vibratoKnob = new Knob( knobVintage_32, widget, tr( "Vibrato" ) );
|
||||
m_vibratoKnob->setLabel( tr( "Vibrato" ) );
|
||||
m_vibratoKnob->move( 110, 140 );
|
||||
m_vibratoKnob->setHintText( tr( "Vibrato:" ) + " ", "" );
|
||||
m_vibratoKnob->setHintText( tr( "Vibrato:" ), "" );
|
||||
|
||||
return( widget );
|
||||
}
|
||||
|
||||
@@ -555,7 +555,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
vk->setFixedSize( 28, 35 );
|
||||
vk->move( 6, knob_y );
|
||||
vk->setHintText( tr( "Osc %1 volume:" ).arg(
|
||||
i+1 ) + " ", "%" );
|
||||
i+1 ), "%" );
|
||||
vk->setWhatsThis(
|
||||
tr( "With this knob you can set the volume of "
|
||||
"oscillator %1. When setting a value of 0 the "
|
||||
@@ -566,7 +566,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
// setup panning-knob
|
||||
Knob * pk = new TripleOscKnob( this );
|
||||
pk->move( 35, knob_y );
|
||||
pk->setHintText( tr("Osc %1 panning:").arg( i + 1 ) + " ", "" );
|
||||
pk->setHintText( tr("Osc %1 panning:").arg( i + 1 ), "" );
|
||||
pk->setWhatsThis(
|
||||
tr( "With this knob you can set the panning of the "
|
||||
"oscillator %1. A value of -100 means 100% "
|
||||
@@ -576,8 +576,8 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
// setup coarse-knob
|
||||
Knob * ck = new TripleOscKnob( this );
|
||||
ck->move( 82, knob_y );
|
||||
ck->setHintText( tr( "Osc %1 coarse detuning:" ).arg( i + 1 ) +
|
||||
" ", " " + tr( "semitones" ) );
|
||||
ck->setHintText( tr( "Osc %1 coarse detuning:" ).arg( i + 1 )
|
||||
, " " + tr( "semitones" ) );
|
||||
ck->setWhatsThis(
|
||||
tr( "With this knob you can set the coarse detuning of "
|
||||
"oscillator %1. You can detune the oscillator "
|
||||
@@ -590,7 +590,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
Knob * flk = new TripleOscKnob( this );
|
||||
flk->move( 111, knob_y );
|
||||
flk->setHintText( tr( "Osc %1 fine detuning left:" ).
|
||||
arg( i + 1 ) + " ",
|
||||
arg( i + 1 ),
|
||||
" " + tr( "cents" ) );
|
||||
flk->setWhatsThis(
|
||||
tr( "With this knob you can set the fine detuning of "
|
||||
@@ -603,7 +603,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
Knob * frk = new TripleOscKnob( this );
|
||||
frk->move( 140, knob_y );
|
||||
frk->setHintText( tr( "Osc %1 fine detuning right:" ).
|
||||
arg( i + 1 ) + " ",
|
||||
arg( i + 1 ),
|
||||
" " + tr( "cents" ) );
|
||||
frk->setWhatsThis(
|
||||
tr( "With this knob you can set the fine detuning of "
|
||||
@@ -617,7 +617,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
Knob * pok = new TripleOscKnob( this );
|
||||
pok->move( 188, knob_y );
|
||||
pok->setHintText( tr( "Osc %1 phase-offset:" ).
|
||||
arg( i + 1 ) + " ",
|
||||
arg( i + 1 ),
|
||||
" " + tr( "degrees" ) );
|
||||
pok->setWhatsThis(
|
||||
tr( "With this knob you can set the phase-offset of "
|
||||
@@ -633,7 +633,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
Knob * spdk = new TripleOscKnob( this );
|
||||
spdk->move( 217, knob_y );
|
||||
spdk->setHintText( tr("Osc %1 stereo phase-detuning:" ).
|
||||
arg( i + 1 ) + " ",
|
||||
arg( i + 1 ),
|
||||
" " + tr( "degrees" ) );
|
||||
spdk->setWhatsThis(
|
||||
tr( "With this knob you can set the stereo phase-"
|
||||
|
||||
@@ -361,14 +361,14 @@ vibedView::vibedView( Instrument * _instrument,
|
||||
m_volumeKnob = new Knob( knobBright_26, this );
|
||||
m_volumeKnob->setVolumeKnob( true );
|
||||
m_volumeKnob->move( 103, 142 );
|
||||
m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "" );
|
||||
m_volumeKnob->setHintText( tr( "Volume:" ), "" );
|
||||
m_volumeKnob->setWhatsThis( tr( "The 'V' knob sets the volume "
|
||||
"of the selected string." ) );
|
||||
|
||||
m_stiffnessKnob = new Knob( knobBright_26, this );
|
||||
m_stiffnessKnob->move( 129, 142 );
|
||||
m_stiffnessKnob->setHintText( tr( "String stiffness:" ) +
|
||||
" ", "" );
|
||||
m_stiffnessKnob->setHintText( tr( "String stiffness:" )
|
||||
, "" );
|
||||
m_stiffnessKnob->setWhatsThis( tr(
|
||||
"The 'S' knob sets the stiffness of the selected string. The stiffness "
|
||||
"of the string affects how long the string will ring out. The lower "
|
||||
@@ -377,15 +377,15 @@ vibedView::vibedView( Instrument * _instrument,
|
||||
|
||||
m_pickKnob = new Knob( knobBright_26, this );
|
||||
m_pickKnob->move( 153, 142 );
|
||||
m_pickKnob->setHintText( tr( "Pick position:" ) + " ", "" );
|
||||
m_pickKnob->setHintText( tr( "Pick position:" ), "" );
|
||||
m_pickKnob->setWhatsThis( tr(
|
||||
"The 'P' knob sets the position where the selected string will be 'picked'. "
|
||||
"The lower the setting the closer the pick is to the bridge." ) );
|
||||
|
||||
m_pickupKnob = new Knob( knobBright_26, this );
|
||||
m_pickupKnob->move( 177, 142 );
|
||||
m_pickupKnob->setHintText( tr( "Pickup position:" ) +
|
||||
" ", "" );
|
||||
m_pickupKnob->setHintText( tr( "Pickup position:" )
|
||||
, "" );
|
||||
m_pickupKnob->setWhatsThis( tr(
|
||||
"The 'PU' knob sets the position where the vibrations will be monitored "
|
||||
"for the selected string. The lower the setting, the closer the "
|
||||
@@ -393,14 +393,14 @@ vibedView::vibedView( Instrument * _instrument,
|
||||
|
||||
m_panKnob = new Knob( knobBright_26, this );
|
||||
m_panKnob->move( 105, 187 );
|
||||
m_panKnob->setHintText( tr( "Pan:" ) + " ", "" );
|
||||
m_panKnob->setHintText( tr( "Pan:" ), "" );
|
||||
m_panKnob->setWhatsThis( tr(
|
||||
"The Pan knob determines the location of the selected string in the stereo "
|
||||
"field." ) );
|
||||
|
||||
m_detuneKnob = new Knob( knobBright_26, this );
|
||||
m_detuneKnob->move( 150, 187 );
|
||||
m_detuneKnob->setHintText( tr( "Detune:" ) + " ", "" );
|
||||
m_detuneKnob->setHintText( tr( "Detune:" ), "" );
|
||||
m_detuneKnob->setWhatsThis( tr(
|
||||
"The Detune knob modifies the pitch of the selected string. Settings less "
|
||||
"than zero will cause the string to sound flat. Settings greater than zero "
|
||||
@@ -408,8 +408,8 @@ vibedView::vibedView( Instrument * _instrument,
|
||||
|
||||
m_randomKnob = new Knob( knobBright_26, this );
|
||||
m_randomKnob->move( 194, 187 );
|
||||
m_randomKnob->setHintText( tr( "Fuzziness:" ) +
|
||||
" ", "" );
|
||||
m_randomKnob->setHintText( tr( "Fuzziness:" )
|
||||
, "" );
|
||||
m_randomKnob->setWhatsThis( tr(
|
||||
"The Slap knob adds a bit of fuzz to the selected string which is most "
|
||||
"apparent during the attack, though it can also be used to make the string "
|
||||
@@ -417,8 +417,8 @@ vibedView::vibedView( Instrument * _instrument,
|
||||
|
||||
m_lengthKnob = new Knob( knobBright_26, this );
|
||||
m_lengthKnob->move( 23, 193 );
|
||||
m_lengthKnob->setHintText( tr( "Length:" ) +
|
||||
" ", "" );
|
||||
m_lengthKnob->setHintText( tr( "Length:" )
|
||||
, "" );
|
||||
m_lengthKnob->setWhatsThis( tr(
|
||||
"The Length knob sets the length of the selected string. Longer strings "
|
||||
"will both ring longer and sound brighter, however, they will also eat up "
|
||||
@@ -427,7 +427,7 @@ vibedView::vibedView( Instrument * _instrument,
|
||||
m_impulse = new LedCheckBox( "", this );
|
||||
m_impulse->move( 23, 94 );
|
||||
ToolTip::add( m_impulse,
|
||||
tr( "Impulse or initial state" ) );
|
||||
tr( "Impulse or initial state" ) );
|
||||
m_impulse->setWhatsThis( tr(
|
||||
"The 'Imp' selector determines whether the waveform in the graph is to be "
|
||||
"treated as an impulse imparted to the string by the pick or the initial "
|
||||
|
||||
@@ -41,14 +41,14 @@
|
||||
#define makeknob( name, x, y, hint, unit, oname ) \
|
||||
name = new Knob( knobStyled, this ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( tr( hint ) + " ", unit ); \
|
||||
name ->setHintText( tr( hint ), unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
name ->setFixedSize( 19, 19 );
|
||||
|
||||
#define maketsknob( name, x, y, hint, unit, oname ) \
|
||||
name = new TempoSyncKnob( knobStyled, this ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( tr( hint ) + " ", unit ); \
|
||||
name ->setHintText( tr( hint ), unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
name ->setFixedSize( 19, 19 );
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ waveShaperControlDialog::waveShaperControlDialog(
|
||||
inputKnob -> move( 14, 251 );
|
||||
inputKnob->setModel( &_controls->m_inputModel );
|
||||
inputKnob->setLabel( tr( "INPUT" ) );
|
||||
inputKnob->setHintText( tr( "Input gain:" ) + " ", "" );
|
||||
inputKnob->setHintText( tr( "Input gain:" ) , "" );
|
||||
|
||||
Knob * outputKnob = new Knob( knobBright_26, this );
|
||||
outputKnob -> setVolumeKnob( true );
|
||||
@@ -71,7 +71,7 @@ waveShaperControlDialog::waveShaperControlDialog(
|
||||
outputKnob -> move( 54, 251 );
|
||||
outputKnob->setModel( &_controls->m_outputModel );
|
||||
outputKnob->setLabel( tr( "OUTPUT" ) );
|
||||
outputKnob->setHintText( tr( "Output gain:" ) + " ", "" );
|
||||
outputKnob->setHintText( tr( "Output gain:" ), "" );
|
||||
|
||||
PixmapButton * resetButton = new PixmapButton( this, tr("Reset waveform") );
|
||||
resetButton -> move( 164, 251 );
|
||||
|
||||
@@ -498,31 +498,31 @@ ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent )
|
||||
l->setHorizontalSpacing( 10 );
|
||||
|
||||
m_portamento = new Knob( knobBright_26, this );
|
||||
m_portamento->setHintText( tr( "Portamento:" ) + "", "" );
|
||||
m_portamento->setHintText( tr( "Portamento:" ), "" );
|
||||
m_portamento->setLabel( tr( "PORT" ) );
|
||||
|
||||
m_filterFreq = new Knob( knobBright_26, this );
|
||||
m_filterFreq->setHintText( tr( "Filter Frequency:" ) + "", "" );
|
||||
m_filterFreq->setHintText( tr( "Filter Frequency:" ), "" );
|
||||
m_filterFreq->setLabel( tr( "FREQ" ) );
|
||||
|
||||
m_filterQ = new Knob( knobBright_26, this );
|
||||
m_filterQ->setHintText( tr( "Filter Resonance:" ) + "", "" );
|
||||
m_filterQ->setHintText( tr( "Filter Resonance:" ), "" );
|
||||
m_filterQ->setLabel( tr( "RES" ) );
|
||||
|
||||
m_bandwidth = new Knob( knobBright_26, this );
|
||||
m_bandwidth->setHintText( tr( "Bandwidth:" ) + "", "" );
|
||||
m_bandwidth->setHintText( tr( "Bandwidth:" ), "" );
|
||||
m_bandwidth->setLabel( tr( "BW" ) );
|
||||
|
||||
m_fmGain = new Knob( knobBright_26, this );
|
||||
m_fmGain->setHintText( tr( "FM Gain:" ) + "", "" );
|
||||
m_fmGain->setHintText( tr( "FM Gain:" ), "" );
|
||||
m_fmGain->setLabel( tr( "FM GAIN" ) );
|
||||
|
||||
m_resCenterFreq = new Knob( knobBright_26, this );
|
||||
m_resCenterFreq->setHintText( tr( "Resonance center frequency:" ) + "", "" );
|
||||
m_resCenterFreq->setHintText( tr( "Resonance center frequency:" ), "" );
|
||||
m_resCenterFreq->setLabel( tr( "RES CF" ) );
|
||||
|
||||
m_resBandwidth = new Knob( knobBright_26, this );
|
||||
m_resBandwidth->setHintText( tr( "Resonance bandwidth:" ) + "", "" );
|
||||
m_resBandwidth->setHintText( tr( "Resonance bandwidth:" ), "" );
|
||||
m_resBandwidth->setLabel( tr( "RES BW" ) );
|
||||
|
||||
m_forwardMidiCC = new LedCheckBox( tr( "Forward MIDI Control Changes" ), this );
|
||||
|
||||
@@ -290,7 +290,13 @@ void ConfigManager::loadConfigFile()
|
||||
node = node.nextSibling();
|
||||
}
|
||||
|
||||
if( value( "paths", "artwork" ) != "" )
|
||||
// don't use dated theme folders as they break the UI (i.e. 0.4 != 1.0, etc)
|
||||
bool use_artwork_path =
|
||||
root.attribute( "version" ).startsWith(
|
||||
QString::number( LMMS_VERSION_MAJOR ) + "." +
|
||||
QString::number( LMMS_VERSION_MINOR ) );
|
||||
|
||||
if( use_artwork_path && value( "paths", "artwork" ) != "" )
|
||||
{
|
||||
m_artworkDir = value( "paths", "artwork" );
|
||||
if( !QDir( m_artworkDir ).exists() )
|
||||
|
||||
@@ -115,6 +115,7 @@ void Engine::init( const bool _has_gui )
|
||||
|
||||
void Engine::destroy()
|
||||
{
|
||||
s_projectJournal->stopAllJournalling();
|
||||
s_mixer->stopProcessing();
|
||||
|
||||
deleteHelper( &s_projectNotes );
|
||||
|
||||
@@ -100,7 +100,7 @@ inline void FxChannel::processed()
|
||||
void FxChannel::incrementDeps()
|
||||
{
|
||||
m_dependenciesMet.ref();
|
||||
if( m_dependenciesMet >= m_receives.size() )
|
||||
if( m_dependenciesMet >= m_receives.size() && ! m_queued )
|
||||
{
|
||||
m_queued = true;
|
||||
MixerWorkerThread::addJob( this );
|
||||
@@ -600,9 +600,6 @@ void FxMixer::masterMix( sampleFrame * _buf )
|
||||
: m_fxChannels[0]->m_volumeModel.value();
|
||||
MixHelpers::addSanitizedMultiplied( _buf, m_fxChannels[0]->m_buffer, v, fpp );
|
||||
|
||||
m_fxChannels[0]->m_peakLeft *= Engine::mixer()->masterGain();
|
||||
m_fxChannels[0]->m_peakRight *= Engine::mixer()->masterGain();
|
||||
|
||||
// clear all channel buffers and
|
||||
// reset channel process state
|
||||
for( int i = 0; i < numChannels(); ++i)
|
||||
|
||||
@@ -70,14 +70,19 @@ void JournallingObject::addJournalCheckPoint()
|
||||
QDomElement JournallingObject::saveState( QDomDocument & _doc,
|
||||
QDomElement & _parent )
|
||||
{
|
||||
QDomElement _this = SerializingObject::saveState( _doc, _parent );
|
||||
if( isJournalling() )
|
||||
{
|
||||
QDomElement _this = SerializingObject::saveState( _doc, _parent );
|
||||
|
||||
QDomElement journalNode = _doc.createElement( "journallingObject" );
|
||||
journalNode.setAttribute( "id", id() );
|
||||
journalNode.setAttribute( "metadata", true );
|
||||
_this.appendChild( journalNode );
|
||||
QDomElement journalNode = _doc.createElement( "journallingObject" );
|
||||
journalNode.setAttribute( "id", id() );
|
||||
journalNode.setAttribute( "metadata", true );
|
||||
_this.appendChild( journalNode );
|
||||
|
||||
return _this;
|
||||
return _this;
|
||||
} else {
|
||||
return QDomElement();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -168,5 +168,17 @@ void ProjectJournal::clearJournal()
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectJournal::stopAllJournalling()
|
||||
{
|
||||
for( JoIdMap::Iterator it = m_joIDs.begin(); it != m_joIDs.end(); ++it)
|
||||
{
|
||||
if( it.value() != NULL )
|
||||
{
|
||||
it.value()->setJournalling(false);
|
||||
}
|
||||
}
|
||||
setJournalling(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -957,6 +957,7 @@ void SampleBuffer::visualize( QPainter & _p, const QRect & _dr,
|
||||
_p.drawPolyline( l, nb_frames / fpp );
|
||||
_p.drawPolyline( r, nb_frames / fpp );
|
||||
delete[] l;
|
||||
delete[] r;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -194,12 +194,13 @@ void FxMixerView::refreshDisplay()
|
||||
for( int i = 1; i<m_fxChannelViews.size(); ++i )
|
||||
{
|
||||
chLayout->removeWidget(m_fxChannelViews[i]->m_fxLine);
|
||||
m_racksLayout->removeWidget( m_fxChannelViews[i]->m_rackView );
|
||||
delete m_fxChannelViews[i]->m_fader;
|
||||
delete m_fxChannelViews[i]->m_muteBtn;
|
||||
delete m_fxChannelViews[i]->m_soloBtn;
|
||||
delete m_fxChannelViews[i]->m_fxLine;
|
||||
delete m_fxChannelViews[i]->m_rackView;
|
||||
delete m_fxChannelViews[i];
|
||||
m_racksLayout->removeWidget( m_fxChannelViews[i]->m_rackView );
|
||||
}
|
||||
m_channelAreaWidget->adjustSize();
|
||||
|
||||
@@ -363,16 +364,15 @@ void FxMixerView::deleteChannel(int index)
|
||||
|
||||
// delete the view
|
||||
chLayout->removeWidget(m_fxChannelViews[index]->m_fxLine);
|
||||
m_racksLayout->removeWidget( m_fxChannelViews[index]->m_rackView );
|
||||
delete m_fxChannelViews[index]->m_fader;
|
||||
delete m_fxChannelViews[index]->m_muteBtn;
|
||||
delete m_fxChannelViews[index]->m_soloBtn;
|
||||
delete m_fxChannelViews[index]->m_fxLine;
|
||||
delete m_fxChannelViews[index]->m_rackView;
|
||||
delete m_fxChannelViews[index];
|
||||
m_channelAreaWidget->adjustSize();
|
||||
|
||||
// delete the fx rack
|
||||
m_racksLayout->removeWidget( m_fxChannelViews[index]->m_rackView );
|
||||
|
||||
// make sure every channel knows what index it is
|
||||
for(int i=0; i<m_fxChannelViews.size(); ++i)
|
||||
{
|
||||
@@ -503,6 +503,11 @@ void FxMixerView::clear()
|
||||
void FxMixerView::updateFaders()
|
||||
{
|
||||
FxMixer * m = Engine::fxMixer();
|
||||
|
||||
// apply master gain
|
||||
m->m_fxChannels[0]->m_peakLeft *= Engine::mixer()->masterGain();
|
||||
m->m_fxChannels[0]->m_peakRight *= Engine::mixer()->masterGain();
|
||||
|
||||
for( int i = 0; i < m_fxChannelViews.size(); ++i )
|
||||
{
|
||||
const float opl = m_fxChannelViews[i]->m_fader->getPeak_L();
|
||||
|
||||
@@ -75,14 +75,14 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent
|
||||
m_baseKnob = new Knob( knobBright_26, this );
|
||||
m_baseKnob->setLabel( tr( "BASE" ) );
|
||||
m_baseKnob->move( CD_LFO_BASE_CD_KNOB_X, CD_LFO_CD_KNOB_Y );
|
||||
m_baseKnob->setHintText( tr( "Base amount:" ) + " ", "" );
|
||||
m_baseKnob->setHintText( tr( "Base amount:" ), "" );
|
||||
m_baseKnob->setWhatsThis( tr("todo") );
|
||||
|
||||
|
||||
m_speedKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
m_speedKnob->setLabel( tr( "SPD" ) );
|
||||
m_speedKnob->move( CD_LFO_SPEED_CD_KNOB_X, CD_LFO_CD_KNOB_Y );
|
||||
m_speedKnob->setHintText( tr( "LFO-speed:" ) + " ", "" );
|
||||
m_speedKnob->setHintText( tr( "LFO-speed:" ), "" );
|
||||
m_speedKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting speed of the LFO. The "
|
||||
"bigger this value the faster the LFO oscillates and "
|
||||
@@ -92,7 +92,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent
|
||||
m_amountKnob = new Knob( knobBright_26, this );
|
||||
m_amountKnob->setLabel( tr( "AMT" ) );
|
||||
m_amountKnob->move( CD_LFO_AMOUNT_CD_KNOB_X, CD_LFO_CD_KNOB_Y );
|
||||
m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
|
||||
m_amountKnob->setHintText( tr( "Modulation amount:" ), "" );
|
||||
m_amountKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting modulation amount of the "
|
||||
"LFO. The bigger this value, the more the connected "
|
||||
@@ -102,7 +102,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent
|
||||
m_phaseKnob = new Knob( knobBright_26, this );
|
||||
m_phaseKnob->setLabel( tr( "PHS" ) );
|
||||
m_phaseKnob->move( CD_LFO_PHASE_CD_KNOB_X, CD_LFO_CD_KNOB_Y );
|
||||
m_phaseKnob->setHintText( tr( "Phase offset:" ) + " ", "" + tr( "degrees" ) );
|
||||
m_phaseKnob->setHintText( tr( "Phase offset:" ) , "" + tr( "degrees" ) );
|
||||
m_phaseKnob->setWhatsThis(
|
||||
tr( "With this knob you can set the phase offset of "
|
||||
"the LFO. That means you can move the "
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include <QScrollArea>
|
||||
|
||||
#include "PluginBrowser.h"
|
||||
#include <algorithm> // for std::sort
|
||||
|
||||
#include "embed.h"
|
||||
#include "debug.h"
|
||||
#include "templates.h"
|
||||
|
||||
@@ -71,6 +71,11 @@
|
||||
#include "TextFloat.h"
|
||||
|
||||
|
||||
#if QT_VERSION < 0x040800
|
||||
#define MiddleButton MidButton
|
||||
#endif
|
||||
|
||||
|
||||
typedef AutomationPattern::timeMap timeMap;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* AutomatableSlider.cpp - implementation of class automatableSlider
|
||||
* AutomatableSlider.cpp - implementation of class AutomatableSlider
|
||||
*
|
||||
* Copyright (c) 2006-2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2007-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
|
||||
@@ -67,7 +67,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
|
||||
m_wetDry->setLabel( tr( "W/D" ) );
|
||||
m_wetDry->move( 27, 5 );
|
||||
m_wetDry->setEnabled( isEnabled );
|
||||
m_wetDry->setHintText( tr( "Wet Level:" ) + " ", "" );
|
||||
m_wetDry->setHintText( tr( "Wet Level:" ), "" );
|
||||
m_wetDry->setWhatsThis( tr( "The Wet/Dry knob sets the ratio between "
|
||||
"the input signal and the effect signal that "
|
||||
"forms the output." ) );
|
||||
@@ -77,7 +77,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
|
||||
m_autoQuit->setLabel( tr( "DECAY" ) );
|
||||
m_autoQuit->move( 60, 5 );
|
||||
m_autoQuit->setEnabled( isEnabled );
|
||||
m_autoQuit->setHintText( tr( "Time:" ) + " ", "ms" );
|
||||
m_autoQuit->setHintText( tr( "Time:" ), "ms" );
|
||||
m_autoQuit->setWhatsThis( tr(
|
||||
"The Decay knob controls how many buffers of silence must pass before the "
|
||||
"plugin stops processing. Smaller values will reduce the CPU overhead but "
|
||||
@@ -88,7 +88,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
|
||||
m_gate->setLabel( tr( "GATE" ) );
|
||||
m_gate->move( 93, 5 );
|
||||
m_gate->setEnabled( isEnabled );
|
||||
m_gate->setHintText( tr( "Gate:" ) + " ", "" );
|
||||
m_gate->setHintText( tr( "Gate:" ), "" );
|
||||
m_gate->setWhatsThis( tr(
|
||||
"The Gate knob controls the signal level that is considered to be 'silence' "
|
||||
"while deciding when to stop processing signals." ) );
|
||||
|
||||
@@ -97,7 +97,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_predelayKnob = new Knob( knobBright_26, this );
|
||||
m_predelayKnob->setLabel( tr( "DEL" ) );
|
||||
m_predelayKnob->move( PREDELAY_KNOB_X, ENV_KNOBS_Y );
|
||||
m_predelayKnob->setHintText( tr( "Predelay:" ) + " ", "" );
|
||||
m_predelayKnob->setHintText( tr( "Predelay:" ), "" );
|
||||
m_predelayKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting predelay of the current "
|
||||
"envelope. The bigger this value the longer the time "
|
||||
@@ -107,7 +107,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_attackKnob = new Knob( knobBright_26, this );
|
||||
m_attackKnob->setLabel( tr( "ATT" ) );
|
||||
m_attackKnob->move( ATTACK_KNOB_X, ENV_KNOBS_Y );
|
||||
m_attackKnob->setHintText( tr( "Attack:" )+" ", "" );
|
||||
m_attackKnob->setHintText( tr( "Attack:" ), "" );
|
||||
m_attackKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting attack-time of the current "
|
||||
"envelope. The bigger this value the longer the "
|
||||
@@ -118,7 +118,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_holdKnob = new Knob( knobBright_26, this );
|
||||
m_holdKnob->setLabel( tr( "HOLD" ) );
|
||||
m_holdKnob->move( HOLD_KNOB_X, ENV_KNOBS_Y );
|
||||
m_holdKnob->setHintText( tr( "Hold:" ) + " ", "" );
|
||||
m_holdKnob->setHintText( tr( "Hold:" ), "" );
|
||||
m_holdKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting hold-time of the current "
|
||||
"envelope. The bigger this value the longer the "
|
||||
@@ -128,7 +128,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_decayKnob = new Knob( knobBright_26, this );
|
||||
m_decayKnob->setLabel( tr( "DEC" ) );
|
||||
m_decayKnob->move( DECAY_KNOB_X, ENV_KNOBS_Y );
|
||||
m_decayKnob->setHintText( tr( "Decay:" ) + " ", "" );
|
||||
m_decayKnob->setHintText( tr( "Decay:" ), "" );
|
||||
m_decayKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting decay-time of the current "
|
||||
"envelope. The bigger this value the longer the "
|
||||
@@ -140,7 +140,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_sustainKnob = new Knob( knobBright_26, this );
|
||||
m_sustainKnob->setLabel( tr( "SUST" ) );
|
||||
m_sustainKnob->move( SUSTAIN_KNOB_X, ENV_KNOBS_Y );
|
||||
m_sustainKnob->setHintText( tr( "Sustain:" ) + " ", "" );
|
||||
m_sustainKnob->setHintText( tr( "Sustain:" ), "" );
|
||||
m_sustainKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting sustain-level of the current "
|
||||
"envelope. The bigger this value the higher the level "
|
||||
@@ -151,7 +151,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_releaseKnob = new Knob( knobBright_26, this );
|
||||
m_releaseKnob->setLabel( tr( "REL" ) );
|
||||
m_releaseKnob->move( RELEASE_KNOB_X, ENV_KNOBS_Y );
|
||||
m_releaseKnob->setHintText( tr( "Release:" ) + " ", "" );
|
||||
m_releaseKnob->setHintText( tr( "Release:" ), "" );
|
||||
m_releaseKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting release-time of the current "
|
||||
"envelope. The bigger this value the longer the "
|
||||
@@ -163,7 +163,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_amountKnob = new Knob( knobBright_26, this );
|
||||
m_amountKnob->setLabel( tr( "AMT" ) );
|
||||
m_amountKnob->move( AMOUNT_KNOB_X, ENV_GRAPH_Y );
|
||||
m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
|
||||
m_amountKnob->setHintText( tr( "Modulation amount:" ), "" );
|
||||
m_amountKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting modulation amount of the "
|
||||
"current envelope. The bigger this value the more the "
|
||||
@@ -176,7 +176,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_lfoPredelayKnob = new Knob( knobBright_26, this );
|
||||
m_lfoPredelayKnob->setLabel( tr( "DEL" ) );
|
||||
m_lfoPredelayKnob->move( LFO_PREDELAY_KNOB_X, LFO_KNOB_Y );
|
||||
m_lfoPredelayKnob->setHintText( tr( "LFO predelay:" ) + " ", "" );
|
||||
m_lfoPredelayKnob->setHintText( tr( "LFO predelay:" ), "" );
|
||||
m_lfoPredelayKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting predelay-time of the current "
|
||||
"LFO. The bigger this value the the time until the "
|
||||
@@ -186,7 +186,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_lfoAttackKnob = new Knob( knobBright_26, this );
|
||||
m_lfoAttackKnob->setLabel( tr( "ATT" ) );
|
||||
m_lfoAttackKnob->move( LFO_ATTACK_KNOB_X, LFO_KNOB_Y );
|
||||
m_lfoAttackKnob->setHintText( tr( "LFO- attack:" ) + " ", "" );
|
||||
m_lfoAttackKnob->setHintText( tr( "LFO- attack:" ), "" );
|
||||
m_lfoAttackKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting attack-time of the current LFO. "
|
||||
"The bigger this value the longer the LFO needs to "
|
||||
@@ -196,7 +196,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_lfoSpeedKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
m_lfoSpeedKnob->setLabel( tr( "SPD" ) );
|
||||
m_lfoSpeedKnob->move( LFO_SPEED_KNOB_X, LFO_KNOB_Y );
|
||||
m_lfoSpeedKnob->setHintText( tr( "LFO speed:" ) + " ", "" );
|
||||
m_lfoSpeedKnob->setHintText( tr( "LFO speed:" ), "" );
|
||||
m_lfoSpeedKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting speed of the current LFO. The "
|
||||
"bigger this value the faster the LFO oscillates and "
|
||||
@@ -206,7 +206,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
|
||||
m_lfoAmountKnob = new Knob( knobBright_26, this );
|
||||
m_lfoAmountKnob->setLabel( tr( "AMT" ) );
|
||||
m_lfoAmountKnob->move( LFO_AMOUNT_KNOB_X, LFO_KNOB_Y );
|
||||
m_lfoAmountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
|
||||
m_lfoAmountKnob->setHintText( tr( "Modulation amount:" ), "" );
|
||||
m_lfoAmountKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting modulation amount of the "
|
||||
"current LFO. The bigger this value the more the "
|
||||
|
||||
@@ -74,6 +74,7 @@ Fader::Fader( FloatModel * _model, const QString & _name, QWidget * _parent ) :
|
||||
m_persistentPeak_R( 0.0 ),
|
||||
m_fMinPeak( 0.01f ),
|
||||
m_fMaxPeak( 1.1 ),
|
||||
m_displayConversion( true ),
|
||||
m_moveStartPoint( -1 ),
|
||||
m_startValue( 0 ),
|
||||
m_peakGreen( 0, 0, 0 ),
|
||||
@@ -95,16 +96,55 @@ Fader::Fader( FloatModel * _model, const QString & _name, QWidget * _parent ) :
|
||||
{
|
||||
s_knob = new QPixmap( embed::getIconPixmap( "fader_knob" ) );
|
||||
}
|
||||
|
||||
|
||||
m_back = s_back;
|
||||
m_leds = s_leds;
|
||||
m_knob = s_knob;
|
||||
|
||||
setWindowTitle( _name );
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, false );
|
||||
setMinimumSize( 23, 116 );
|
||||
setMaximumSize( 23, 116);
|
||||
resize( 23, 116 );
|
||||
setModel( _model );
|
||||
setHintText( "Volume:","%");
|
||||
}
|
||||
|
||||
|
||||
Fader::Fader( FloatModel * model, const QString & name, QWidget * parent, QPixmap * back, QPixmap * leds, QPixmap * knob ) :
|
||||
QWidget( parent ),
|
||||
FloatModelView( model, this ),
|
||||
m_model( model ),
|
||||
m_fPeakValue_L( 0.0 ),
|
||||
m_fPeakValue_R( 0.0 ),
|
||||
m_persistentPeak_L( 0.0 ),
|
||||
m_persistentPeak_R( 0.0 ),
|
||||
m_fMinPeak( 0.01f ),
|
||||
m_fMaxPeak( 1.1 ),
|
||||
m_displayConversion( false ),
|
||||
m_moveStartPoint( -1 ),
|
||||
m_startValue( 0 ),
|
||||
m_peakGreen( 0, 0, 0 ),
|
||||
m_peakRed( 0, 0, 0 )
|
||||
{
|
||||
if( s_textFloat == NULL )
|
||||
{
|
||||
s_textFloat = new TextFloat;
|
||||
}
|
||||
|
||||
m_back = back;
|
||||
m_leds = leds;
|
||||
m_knob = knob;
|
||||
|
||||
setWindowTitle( name );
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, false );
|
||||
setMinimumSize( m_back->width(), m_back->height() );
|
||||
setMaximumSize( m_back->width(), m_back->height() );
|
||||
resize( m_back->width(), m_back->height() );
|
||||
setModel( model );
|
||||
setHintText( "Volume:","%");
|
||||
}
|
||||
|
||||
|
||||
Fader::~Fader()
|
||||
{
|
||||
@@ -130,7 +170,7 @@ void Fader::mouseMoveEvent( QMouseEvent *mouseEvent )
|
||||
{
|
||||
int dy = m_moveStartPoint - mouseEvent->globalY();
|
||||
|
||||
float delta = dy * ( m_model->maxValue() - m_model->minValue() ) / (float) ( height() - ( *s_knob ).height() );
|
||||
float delta = dy * ( m_model->maxValue() - m_model->minValue() ) / (float) ( height() - ( *m_knob ).height() );
|
||||
|
||||
model()->setValue( m_startValue + delta );
|
||||
|
||||
@@ -146,7 +186,7 @@ void Fader::mousePressEvent( QMouseEvent* mouseEvent )
|
||||
if( mouseEvent->button() == Qt::LeftButton &&
|
||||
! ( mouseEvent->modifiers() & Qt::ControlModifier ) )
|
||||
{
|
||||
if( mouseEvent->y() >= knobPosY() - ( *s_knob ).height() && mouseEvent->y() < knobPosY() )
|
||||
if( mouseEvent->y() >= knobPosY() - ( *m_knob ).height() && mouseEvent->y() < knobPosY() )
|
||||
{
|
||||
updateTextFloat();
|
||||
s_textFloat->show();
|
||||
@@ -172,19 +212,33 @@ void Fader::mousePressEvent( QMouseEvent* mouseEvent )
|
||||
void Fader::mouseDoubleClickEvent( QMouseEvent* mouseEvent )
|
||||
{
|
||||
bool ok;
|
||||
float newValue;
|
||||
|
||||
// TODO: dbV handling
|
||||
int newValue = QInputDialog::getInt( this, windowTitle(),
|
||||
tr( "Please enter a new value between %1 and %2:" ).
|
||||
arg( model()->minValue()*100 ).
|
||||
arg( model()->maxValue()*100 ),
|
||||
model()->value()*100,
|
||||
model()->minValue()*100,
|
||||
model()->maxValue()*100, 1, &ok );
|
||||
if( m_displayConversion )
|
||||
{
|
||||
newValue = QInputDialog::getDouble( this, windowTitle(),
|
||||
tr( "Please enter a new value between %1 and %2:" ).
|
||||
arg( model()->minValue() * 100 ).
|
||||
arg( model()->maxValue() * 100 ),
|
||||
model()->value() * 100,
|
||||
model()->minValue() * 100,
|
||||
model()->maxValue() * 100, 4, &ok ) * 0.01f;
|
||||
}
|
||||
else
|
||||
{
|
||||
newValue = QInputDialog::getDouble( this, windowTitle(),
|
||||
tr( "Please enter a new value between %1 and %2:" ).
|
||||
arg( model()->minValue() ).
|
||||
arg( model()->maxValue() ),
|
||||
model()->value(),
|
||||
model()->minValue(),
|
||||
model()->maxValue(), 4, &ok );
|
||||
}
|
||||
|
||||
if( ok )
|
||||
{
|
||||
model()->setValue( newValue / 100.0f );
|
||||
model()->setValue( newValue );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,25 +319,24 @@ void Fader::setPeak_R( float fPeak )
|
||||
// update tooltip showing value and adjust position while changing fader value
|
||||
void Fader::updateTextFloat()
|
||||
{
|
||||
if( ConfigManager::inst()->value( "app", "displaydbv" ).toInt() )
|
||||
if( ConfigManager::inst()->value( "app", "displaydbv" ).toInt() && m_displayConversion )
|
||||
{
|
||||
s_textFloat->setText( QString("Volume: %1 dBV").
|
||||
arg( 20.0 * log10( model()->value() ), 3, 'f', 2 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
s_textFloat->setText( QString("Volume: %1 %").arg( m_model->value() * 100 ) );
|
||||
s_textFloat->setText( m_description + " " + QString("%1 ").arg( m_displayConversion ? m_model->value() * 100 : m_model->value() ) + " " + m_unit );
|
||||
}
|
||||
s_textFloat->moveGlobal( this, QPoint( width() - ( *s_knob ).width() - 5, knobPosY() - 46 ) );
|
||||
s_textFloat->moveGlobal( this, QPoint( width() - ( *m_knob ).width() - 5, knobPosY() - 46 ) );
|
||||
}
|
||||
|
||||
|
||||
inline int Fader::calculateDisplayPeak( float fPeak )
|
||||
{
|
||||
int peak = (int)( 116 - ( fPeak / ( m_fMaxPeak - m_fMinPeak ) ) * 116.0 );
|
||||
int peak = (int)( m_back->height() - ( fPeak / ( m_fMaxPeak - m_fMinPeak ) ) * m_back->height() );
|
||||
|
||||
if ( peak > 116 ) return 116;
|
||||
else return peak;
|
||||
return qMin( peak, m_back->height() );
|
||||
}
|
||||
|
||||
void Fader::paintEvent( QPaintEvent * ev)
|
||||
@@ -291,36 +344,39 @@ void Fader::paintEvent( QPaintEvent * ev)
|
||||
QPainter painter(this);
|
||||
|
||||
// background
|
||||
painter.drawPixmap( ev->rect(), *s_back, ev->rect() );
|
||||
|
||||
painter.drawPixmap( ev->rect(), *m_back, ev->rect() );
|
||||
|
||||
// peak leds
|
||||
//float fRange = abs( m_fMaxPeak ) + abs( m_fMinPeak );
|
||||
|
||||
int height = m_back->height();
|
||||
int width = m_back->width() / 2;
|
||||
int center = m_back->width() - width;
|
||||
|
||||
int peak_L = calculateDisplayPeak( m_fPeakValue_L - m_fMinPeak );
|
||||
int persistentPeak_L = qMax<int>( 3, calculateDisplayPeak( m_persistentPeak_L - m_fMinPeak ) );
|
||||
painter.drawPixmap( QRect( 0, peak_L, 11, 116 - peak_L ), *s_leds, QRect( 0, peak_L, 11, 116 - peak_L ) );
|
||||
painter.drawPixmap( QRect( 0, peak_L, width, height - peak_L ), *m_leds, QRect( 0, peak_L, width, height - peak_L ) );
|
||||
|
||||
if( m_persistentPeak_L > 0.05 )
|
||||
{
|
||||
painter.fillRect( QRect( 2, persistentPeak_L, 7, 1 ), ( m_persistentPeak_L < 1.0 )
|
||||
? peakGreen()
|
||||
? peakGreen()
|
||||
: peakRed() );
|
||||
}
|
||||
|
||||
int peak_R = calculateDisplayPeak( m_fPeakValue_R - m_fMinPeak );
|
||||
int persistentPeak_R = qMax<int>( 3, calculateDisplayPeak( m_persistentPeak_R - m_fMinPeak ) );
|
||||
painter.drawPixmap( QRect( 11, peak_R, 11, 116 - peak_R ), *s_leds, QRect( 11, peak_R, 11, 116 - peak_R ) );
|
||||
painter.drawPixmap( QRect( center, peak_R, width, height - peak_R ), *m_leds, QRect( center, peak_R, width, height - peak_R ) );
|
||||
|
||||
if( m_persistentPeak_R > 0.05 )
|
||||
{
|
||||
painter.fillRect( QRect( 14, persistentPeak_R, 7, 1 ), ( m_persistentPeak_R < 1.0 )
|
||||
? peakGreen()
|
||||
? peakGreen()
|
||||
: peakRed() );
|
||||
}
|
||||
|
||||
// knob
|
||||
painter.drawPixmap( 0, knobPosY() - ( *s_knob ).height(), *s_knob );
|
||||
painter.drawPixmap( 0, knobPosY() - m_knob->height(), *m_knob );
|
||||
}
|
||||
|
||||
|
||||
@@ -333,12 +389,12 @@ QColor Fader::peakRed() const
|
||||
{
|
||||
return m_peakRed;
|
||||
}
|
||||
|
||||
|
||||
void Fader::setPeakGreen( const QColor & c )
|
||||
{
|
||||
m_peakGreen = c;
|
||||
}
|
||||
|
||||
|
||||
void Fader::setPeakRed( const QColor & c )
|
||||
{
|
||||
m_peakRed = c;
|
||||
|
||||
@@ -60,7 +60,7 @@ InstrumentFunctionNoteStackingView::InstrumentFunctionNoteStackingView( Instrume
|
||||
chordLabel->setFont( pointSize<8>( chordLabel->font() ) );
|
||||
|
||||
m_chordRangeKnob->setLabel( tr( "RANGE" ) );
|
||||
m_chordRangeKnob->setHintText( tr( "Chord range:" ) + " ", " " + tr( "octave(s)" ) );
|
||||
m_chordRangeKnob->setHintText( tr( "Chord range:" ), " " + tr( "octave(s)" ) );
|
||||
m_chordRangeKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting the chord range in octaves. "
|
||||
"The selected chord will be played within specified "
|
||||
@@ -130,7 +130,7 @@ InstrumentFunctionArpeggioView::InstrumentFunctionArpeggioView( InstrumentFuncti
|
||||
|
||||
|
||||
m_arpRangeKnob->setLabel( tr( "RANGE" ) );
|
||||
m_arpRangeKnob->setHintText( tr( "Arpeggio range:" ) + " ", " " + tr( "octave(s)" ) );
|
||||
m_arpRangeKnob->setHintText( tr( "Arpeggio range:" ), " " + tr( "octave(s)" ) );
|
||||
m_arpRangeKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting the arpeggio range in octaves. "
|
||||
"The selected arpeggio will be played within specified "
|
||||
@@ -138,7 +138,7 @@ InstrumentFunctionArpeggioView::InstrumentFunctionArpeggioView( InstrumentFuncti
|
||||
|
||||
|
||||
m_arpTimeKnob->setLabel( tr( "TIME" ) );
|
||||
m_arpTimeKnob->setHintText( tr( "Arpeggio time:" ) + " ", " " + tr( "ms" ) );
|
||||
m_arpTimeKnob->setHintText( tr( "Arpeggio time:" ), " " + tr( "ms" ) );
|
||||
m_arpTimeKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting the arpeggio time in "
|
||||
"milliseconds. The arpeggio time specifies how long "
|
||||
@@ -146,7 +146,7 @@ InstrumentFunctionArpeggioView::InstrumentFunctionArpeggioView( InstrumentFuncti
|
||||
|
||||
|
||||
m_arpGateKnob->setLabel( tr( "GATE" ) );
|
||||
m_arpGateKnob->setHintText( tr( "Arpeggio gate:" ) + " ", tr( "%" ) );
|
||||
m_arpGateKnob->setHintText( tr( "Arpeggio gate:" ), tr( "%" ) );
|
||||
m_arpGateKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting the arpeggio gate. The "
|
||||
"arpeggio gate specifies the percent of a whole "
|
||||
|
||||
@@ -99,7 +99,7 @@ InstrumentSoundShapingView::InstrumentSoundShapingView( QWidget * _parent ) :
|
||||
m_filterCutKnob = new Knob( knobBright_26, m_filterGroupBox );
|
||||
m_filterCutKnob->setLabel( tr( "FREQ" ) );
|
||||
m_filterCutKnob->move( 140, 18 );
|
||||
m_filterCutKnob->setHintText( tr( "cutoff frequency:" ) + " ", " " + tr( "Hz" ) );
|
||||
m_filterCutKnob->setHintText( tr( "cutoff frequency:" ), " " + tr( "Hz" ) );
|
||||
m_filterCutKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting the cutoff frequency for the "
|
||||
"selected filter. The cutoff frequency specifies the "
|
||||
@@ -112,7 +112,7 @@ InstrumentSoundShapingView::InstrumentSoundShapingView( QWidget * _parent ) :
|
||||
m_filterResKnob = new Knob( knobBright_26, m_filterGroupBox );
|
||||
m_filterResKnob->setLabel( tr( "RESO" ) );
|
||||
m_filterResKnob->move( 196, 18 );
|
||||
m_filterResKnob->setHintText( tr( "Resonance:" ) + " ", "" );
|
||||
m_filterResKnob->setHintText( tr( "Resonance:" ), "" );
|
||||
m_filterResKnob->setWhatsThis(
|
||||
tr( "Use this knob for setting Q/Resonance for the selected "
|
||||
"filter. Q/Resonance tells the filter how much it "
|
||||
|
||||
@@ -100,7 +100,7 @@ LadspaControlView::LadspaControlView( QWidget * _parent,
|
||||
knb->setModel( m_ctl->tempoSyncKnobModel() );
|
||||
}
|
||||
knb->setLabel( m_ctl->port()->name );
|
||||
knb->setHintText( tr( "Value:" ) + " ", "" );
|
||||
knb->setHintText( tr( "Value:" ), "" );
|
||||
knb->setWhatsThis( tr( "Sorry, no help available." ) );
|
||||
layout->addWidget( knb );
|
||||
if( link != NULL )
|
||||
|
||||
@@ -87,7 +87,7 @@ const char * volume_help = QT_TRANSLATE_NOOP( "InstrumentTrack",
|
||||
|
||||
const int INSTRUMENT_WIDTH = 254;
|
||||
const int INSTRUMENT_HEIGHT = INSTRUMENT_WIDTH;
|
||||
const int PIANO_HEIGHT = 84;
|
||||
const int PIANO_HEIGHT = 82;
|
||||
const int INSTRUMENT_WINDOW_CACHE_SIZE = 8;
|
||||
|
||||
|
||||
@@ -849,7 +849,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV
|
||||
tr( "Volume" ) );
|
||||
m_volumeKnob->setVolumeKnob( true );
|
||||
m_volumeKnob->setModel( &_it->m_volumeModel );
|
||||
m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "%" );
|
||||
m_volumeKnob->setHintText( tr( "Volume:" ), "%" );
|
||||
m_volumeKnob->move( widgetWidth-2*24, 2 );
|
||||
m_volumeKnob->setLabel( tr( "VOL" ) );
|
||||
m_volumeKnob->show();
|
||||
@@ -858,7 +858,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV
|
||||
m_panningKnob = new Knob( knobSmall_17, getTrackSettingsWidget(),
|
||||
tr( "Panning" ) );
|
||||
m_panningKnob->setModel( &_it->m_panningModel );
|
||||
m_panningKnob->setHintText( tr( "Panning:" ) + " ", "%" );
|
||||
m_panningKnob->setHintText( tr( "Panning:" ), "%" );
|
||||
m_panningKnob->move( widgetWidth-24, 2 );
|
||||
m_panningKnob->setLabel( tr( "PAN" ) );
|
||||
m_panningKnob->show();
|
||||
@@ -1176,7 +1176,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
|
||||
// set up volume knob
|
||||
m_volumeKnob = new Knob( knobBright_26, NULL, tr( "Instrument volume" ) );
|
||||
m_volumeKnob->setVolumeKnob( true );
|
||||
m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "%" );
|
||||
m_volumeKnob->setHintText( tr( "Volume:" ), "%" );
|
||||
m_volumeKnob->setLabel( tr( "VOL" ) );
|
||||
|
||||
m_volumeKnob->setWhatsThis( tr( volume_help ) );
|
||||
@@ -1185,7 +1185,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
|
||||
|
||||
// set up panning knob
|
||||
m_panningKnob = new Knob( knobBright_26, NULL, tr( "Panning" ) );
|
||||
m_panningKnob->setHintText( tr( "Panning:" ) + " ", "" );
|
||||
m_panningKnob->setHintText( tr( "Panning:" ), "" );
|
||||
m_panningKnob->setLabel( tr( "PAN" ) );
|
||||
|
||||
basicControlsLayout->addWidget( m_panningKnob );
|
||||
@@ -1193,7 +1193,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
|
||||
|
||||
// set up pitch knob
|
||||
m_pitchKnob = new Knob( knobBright_26, NULL, tr( "Pitch" ) );
|
||||
m_pitchKnob->setHintText( tr( "Pitch:" ) + " ", " " + tr( "cents" ) );
|
||||
m_pitchKnob->setHintText( tr( "Pitch:" ), " " + tr( "cents" ) );
|
||||
m_pitchKnob->setLabel( tr( "PITCH" ) );
|
||||
|
||||
basicControlsLayout->addWidget( m_pitchKnob );
|
||||
|
||||
@@ -537,7 +537,7 @@ SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) :
|
||||
tr( "Track volume" ) );
|
||||
m_volumeKnob->setVolumeKnob( true );
|
||||
m_volumeKnob->setModel( &_t->m_volumeModel );
|
||||
m_volumeKnob->setHintText( tr( "Channel volume:" ) + " ", "%" );
|
||||
m_volumeKnob->setHintText( tr( "Channel volume:" ), "%" );
|
||||
if( ConfigManager::inst()->value( "ui",
|
||||
"compacttrackbuttons" ).toInt() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user