Merge branch 'stable-1.1'

Conflicts:
	plugins/Amplifier/Amplifier.cpp
	plugins/audio_file_processor/audio_file_processor.cpp
This commit is contained in:
Vesa
2014-12-24 19:59:12 +02:00
8 changed files with 34 additions and 19 deletions

View File

@@ -14,8 +14,8 @@ INCLUDE(CheckIncludeFiles)
INCLUDE(FindPkgConfig)
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "0")
SET(VERSION_PATCH "100")
SET(VERSION_MINOR "1")
SET(VERSION_PATCH "0")
#SET(VERSION_SUFFIX "")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
IF(VERSION_SUFFIX)

View File

@@ -83,7 +83,8 @@ bool AmplifierEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
for( fpp_t f = 0; f < frames; ++f )
{
// qDebug( "offset %d, value %f", f, m_ampControls.m_volumeModel.value( f ) );
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
sample_t s[2] = { buf[f][0], buf[f][1] };
// vol knob
@@ -122,7 +123,6 @@ bool AmplifierEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
buf[f][0] = d * buf[f][0] + w * s[0];
buf[f][1] = d * buf[f][1] + w * s[1];
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
}
checkGate( outSum / frames );

View File

@@ -88,13 +88,13 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
const float w = wetLevel();
for( fpp_t f = 0; f < frames; ++f )
{
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
sample_t s[2] = { buf[f][0], buf[f][1] };
m_bbFX.nextSample( s[0], s[1] );
buf[f][0] = d * buf[f][0] + w * s[0];
buf[f][1] = d * buf[f][1] + w * s[1];
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
}
checkGate( outSum / frames );

View File

@@ -155,11 +155,11 @@ bool DualFilterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
s[0] += ( s2[0] * mix2 );
s[1] += ( s2[1] * mix2 );
}
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
// do another mix with dry signal
buf[f][0] = d * buf[f][0] + w * s[0];
buf[f][1] = d * buf[f][1] + w * s[1];
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
}
checkGate( outSum / frames );

View File

@@ -577,13 +577,8 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
m_interpBox->setFont( pointSize<8>( m_interpBox->font() ) );
// wavegraph
m_waveView = new AudioFileProcessorWaveView( this, 245, 75, castModel<audioFileProcessor>()->m_sampleBuffer );
m_waveView->move( 2, 172 );
m_waveView->setKnobs(
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_startKnob ),
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_endKnob ),
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_loopKnob )
);
m_waveView = 0;
newWaveView();
connect( castModel<audioFileProcessor>(), SIGNAL( isPlaying( f_cnt_t ) ),
m_waveView, SLOT( isPlaying( f_cnt_t ) ) );
@@ -632,6 +627,25 @@ void AudioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee )
void AudioFileProcessorView::newWaveView()
{
if ( m_waveView )
{
delete m_waveView;
m_waveView = 0;
}
m_waveView = new AudioFileProcessorWaveView( this, 245, 75, castModel<audioFileProcessor>()->m_sampleBuffer );
m_waveView->move( 2, 172 );
m_waveView->setKnobs(
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_startKnob ),
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_endKnob ),
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_loopKnob ) );
m_waveView->show();
}
void AudioFileProcessorView::dropEvent( QDropEvent * _de )
{
QString type = StringPairDrag::decodeKey( _de );
@@ -640,6 +654,7 @@ void AudioFileProcessorView::dropEvent( QDropEvent * _de )
{
castModel<audioFileProcessor>()->setAudioFile( value );
_de->accept();
newWaveView();
return;
}
else if( type == QString( "tco_%1" ).arg( Track::SampleTrack ) )
@@ -693,6 +708,7 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * )
void AudioFileProcessorView::sampleUpdated( void )
{
newWaveView();
m_waveView->update();
update();
}
@@ -709,6 +725,7 @@ void AudioFileProcessorView::openAudioFile( void )
{
castModel<audioFileProcessor>()->setAudioFile( af );
Engine::getSong()->setModified();
newWaveView();
}
}

View File

@@ -118,7 +118,7 @@ public:
AudioFileProcessorView( Instrument * _instrument, QWidget * _parent );
virtual ~AudioFileProcessorView();
void newWaveView();
protected slots:
void sampleUpdated();
void openAudioFile();

View File

@@ -214,11 +214,10 @@ bool dynProcEffect::processAudioBuffer( sampleFrame * _buf,
s[0] *= outputGain;
s[1] *= outputGain;
out_sum += _buf[f][0]*_buf[f][0] + _buf[f][1]*_buf[f][1];
// mix wet/dry signals
_buf[f][0] = d * _buf[f][0] + w * s[0];
_buf[f][1] = d * _buf[f][1] + w * s[1];
out_sum += _buf[f][0]*_buf[f][0] + _buf[f][1]*_buf[f][1];
}
checkGate( out_sum / _frames );

View File

@@ -130,11 +130,10 @@ bool waveShaperEffect::processAudioBuffer( sampleFrame * _buf,
s[0] *= output;
s[1] *= output;
out_sum += _buf[f][0]*_buf[f][0] + _buf[f][1]*_buf[f][1];
// mix wet/dry signals
_buf[f][0] = d * _buf[f][0] + w * s[0];
_buf[f][1] = d * _buf[f][1] + w * s[1];
out_sum += _buf[f][0]*_buf[f][0] + _buf[f][1]*_buf[f][1];
}
checkGate( out_sum / _frames );