Merge branch 'stable-1.1'

Conflicts:
	include/lmms_math.h
	plugins/delay/delaycontrolsdialog.cpp
	src/core/FxMixer.cpp
	src/gui/FxMixerView.cpp
This commit is contained in:
Vesa
2014-12-10 01:38:17 +02:00
10 changed files with 113 additions and 46 deletions

View File

@@ -15,7 +15,7 @@ INCLUDE(FindPkgConfig)
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "0")
SET(VERSION_PATCH "98")
SET(VERSION_PATCH "99")
#SET(VERSION_SUFFIX "")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
IF(VERSION_SUFFIX)

View 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>

View File

@@ -74,7 +74,7 @@ public:
}
void clearJournal();
void stopAllJournalling();
JournallingObject * journallingObject( const jo_id_t _id )
{
if( m_joIDs.contains( _id ) )

View File

@@ -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 );
}

View File

@@ -140,6 +140,43 @@ static inline float fastRandf( float range )
{
static const float fast_rand_ratio = 1.0f / FAST_RAND_MAX;
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/

View File

@@ -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" ) )

View File

@@ -39,32 +39,33 @@ DelayControlsDialog::DelayControlsDialog( DelayControls *controls ) :
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:" ) + " ", "" );
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" ) + " ", " 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:" ) + " ", "" );
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" ) + " " , "" );
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:" ) + " ", "" );
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") + " ", " 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" ) + " " , " 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:" ) + " ", "" );
}

View File

@@ -115,6 +115,7 @@ void Engine::init( const bool _has_gui )
void Engine::destroy()
{
s_projectJournal->stopAllJournalling();
s_mixer->stopProcessing();
deleteHelper( &s_projectNotes );

View File

@@ -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();
}
}

View File

@@ -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);
}