From 76a1b8c2b6cd8359b6b79d860627e5a6d3dbf861 Mon Sep 17 00:00:00 2001 From: Dave French Date: Tue, 23 Dec 2014 16:29:04 +0000 Subject: [PATCH 1/4] Proposed fix for 929 AFP wave display --- .../audio_file_processor.cpp | 22 +++++++++++++++++++ .../audio_file_processor.h | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 5b5f1d4e1..a67b91ce7 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -630,6 +630,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()->m_sampleBuffer ); + m_waveView->move( 2, 172 ); + m_waveView->setKnobs( + dynamic_cast( m_startKnob ), + dynamic_cast( m_endKnob ), + dynamic_cast( m_loopKnob ) ); + m_waveView->show(); +} + + + + void AudioFileProcessorView::dropEvent( QDropEvent * _de ) { QString type = stringPairDrag::decodeKey( _de ); @@ -638,6 +657,7 @@ void AudioFileProcessorView::dropEvent( QDropEvent * _de ) { castModel()->setAudioFile( value ); _de->accept(); + newWaveView(); return; } else if( type == QString( "tco_%1" ).arg( track::SampleTrack ) ) @@ -691,6 +711,7 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * ) void AudioFileProcessorView::sampleUpdated( void ) { + newWaveView(); m_waveView->update(); update(); } @@ -707,6 +728,7 @@ void AudioFileProcessorView::openAudioFile( void ) { castModel()->setAudioFile( af ); engine::getSong()->setModified(); + newWaveView(); } } diff --git a/plugins/audio_file_processor/audio_file_processor.h b/plugins/audio_file_processor/audio_file_processor.h index aed376101..6ec9bc032 100644 --- a/plugins/audio_file_processor/audio_file_processor.h +++ b/plugins/audio_file_processor/audio_file_processor.h @@ -118,7 +118,7 @@ public: AudioFileProcessorView( Instrument * _instrument, QWidget * _parent ); virtual ~AudioFileProcessorView(); - + void newWaveView(); protected slots: void sampleUpdated(); void openAudioFile(); From 122b8451057c8cd629d9f5d5750ca781821df6bd Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Tue, 23 Dec 2014 12:48:41 -0500 Subject: [PATCH 2/4] Bump version for stable-1.1 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e30f417b8..1933f6a1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) From b5538c7da818cbcdde5ff1c885ce4eee5b626f3b Mon Sep 17 00:00:00 2001 From: Dave French Date: Tue, 23 Dec 2014 22:26:36 +0000 Subject: [PATCH 3/4] used newWaveView in constructor, to remove redundancy --- plugins/audio_file_processor/audio_file_processor.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index a67b91ce7..74a9354a5 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -575,13 +575,8 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, m_interpBox->setFont( pointSize<8>( m_interpBox->font() ) ); // wavegraph - m_waveView = new AudioFileProcessorWaveView( this, 245, 75, castModel()->m_sampleBuffer ); - m_waveView->move( 2, 172 ); - m_waveView->setKnobs( - dynamic_cast( m_startKnob ), - dynamic_cast( m_endKnob ), - dynamic_cast( m_loopKnob ) - ); + m_waveView = 0; + newWaveView(); connect( castModel(), SIGNAL( isPlaying( f_cnt_t ) ), m_waveView, SLOT( isPlaying( f_cnt_t ) ) ); From 62df7688961bac6892e82e8ba609ded058a75bc6 Mon Sep 17 00:00:00 2001 From: Vesa Date: Wed, 24 Dec 2014 19:53:05 +0200 Subject: [PATCH 4/4] Autoquit improvement: On effect plugins where it's possible for the FX to silence the output, measure the levels of the input signal for autoquit This so that the effect won't be turned off when there's input that the effect is muting (eg. when you use the Amplifier to temporarily mute a signal) --- plugins/Amplifier/Amplifier.cpp | 18 +++++++++--------- plugins/BassBooster/BassBooster.cpp | 4 ++-- plugins/DualFilter/DualFilter.cpp | 2 +- .../dynamics_processor/dynamics_processor.cpp | 3 +-- plugins/waveshaper/waveshaper.cpp | 3 +-- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/plugins/Amplifier/Amplifier.cpp b/plugins/Amplifier/Amplifier.cpp index b6d4a3ecf..e26caecaa 100644 --- a/plugins/Amplifier/Amplifier.cpp +++ b/plugins/Amplifier/Amplifier.cpp @@ -77,30 +77,30 @@ 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] }; // convert vol/pan values to left/right values - const float left1 = m_ampControls.m_volumeModel.value( f ) * - ( m_ampControls.m_panModel.value( f ) <= 0 + const float left1 = m_ampControls.m_volumeModel.value() * + ( m_ampControls.m_panModel.value() <= 0 ? 1.0 : 1.0 - m_ampControls.m_panModel.value( f ) / 100.0 ); - const float right1 = m_ampControls.m_volumeModel.value( f ) * - ( m_ampControls.m_panModel.value( f ) >= 0 + const float right1 = m_ampControls.m_volumeModel.value() * + ( m_ampControls.m_panModel.value() >= 0 ? 1.0 - : 1.0 + m_ampControls.m_panModel.value( f ) / 100.0 ); + : 1.0 + m_ampControls.m_panModel.value() / 100.0 ); // first stage amplification s[0] *= ( left1 / 100.0 ); s[1] *= ( right1 / 100.0 ); // second stage amplification - s[0] *= ( m_ampControls.m_leftModel.value( f ) / 100.0 ); - s[1] *= ( m_ampControls.m_rightModel.value( f ) / 100.0 ); + s[0] *= ( m_ampControls.m_leftModel.value() / 100.0 ); + s[1] *= ( m_ampControls.m_rightModel.value() / 100.0 ); 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 ); diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index 60c31ab1a..e50224163 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -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 ); diff --git a/plugins/DualFilter/DualFilter.cpp b/plugins/DualFilter/DualFilter.cpp index d20f3374b..9e42e978a 100644 --- a/plugins/DualFilter/DualFilter.cpp +++ b/plugins/DualFilter/DualFilter.cpp @@ -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 ); diff --git a/plugins/dynamics_processor/dynamics_processor.cpp b/plugins/dynamics_processor/dynamics_processor.cpp index fa7973dd1..6dcd357c1 100644 --- a/plugins/dynamics_processor/dynamics_processor.cpp +++ b/plugins/dynamics_processor/dynamics_processor.cpp @@ -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 ); diff --git a/plugins/waveshaper/waveshaper.cpp b/plugins/waveshaper/waveshaper.cpp index ab379d8d1..7389e27e1 100644 --- a/plugins/waveshaper/waveshaper.cpp +++ b/plugins/waveshaper/waveshaper.cpp @@ -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 );