From a54c54097f1d62fb4b2ac67d12ac322dedcf93bb Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Mon, 12 Mar 2018 14:49:45 +0100 Subject: [PATCH 01/26] Draw the entire length of a notes pitch bend info (#4233) --- src/gui/editors/PianoRoll.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index c2ab9feff..13b1dd4a7 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -889,10 +889,6 @@ void PianoRoll::drawDetuningInfo( QPainter & _p, const Note * _n, int _x, for( timeMap::ConstIterator it = map.begin(); it != map.end(); ++it ) { int pos_ticks = it.key(); - if( pos_ticks > _n->length() ) - { - break; - } int pos_x = _x + pos_ticks * m_ppt / MidiTime::ticksPerTact(); const float level = it.value(); From b4e78065e7fe043b2e423f81340d2b3b5fbc7e5a Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Wed, 14 Mar 2018 14:48:18 +0900 Subject: [PATCH 02/26] Fix some bugs with LFO waveform drag&drop (#4227) * Change to user-wave mode and update display after dropping a sample * Fix broken drag&drop from sample tracks --- src/gui/widgets/EnvelopeAndLfoView.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/EnvelopeAndLfoView.cpp b/src/gui/widgets/EnvelopeAndLfoView.cpp index 4d61e814c..4131a956e 100644 --- a/src/gui/widgets/EnvelopeAndLfoView.cpp +++ b/src/gui/widgets/EnvelopeAndLfoView.cpp @@ -393,14 +393,20 @@ void EnvelopeAndLfoView::dropEvent( QDropEvent * _de ) m_params->m_userWave.setAudioFile( StringPairDrag::decodeValue( _de ) ); m_userLfoBtn->model()->setValue( true ); + m_params->m_lfoWaveModel.setValue(EnvelopeAndLfoParameters::UserDefinedWave); _de->accept(); + update(); } else if( type == QString( "tco_%1" ).arg( Track::SampleTrack ) ) { DataFile dataFile( value.toUtf8() ); - m_params->m_userWave.setAudioFile( dataFile.content().firstChild().toElement(). attribute( "src" ) ); + m_params->m_userWave.setAudioFile( dataFile.content(). + firstChildElement().firstChildElement(). + firstChildElement().attribute( "src" ) ); m_userLfoBtn->model()->setValue( true ); + m_params->m_lfoWaveModel.setValue(EnvelopeAndLfoParameters::UserDefinedWave); _de->accept(); + update(); } } From 6cd5317e0980497b66a72f25c808be787b2c9f02 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Sun, 18 Mar 2018 13:36:05 -0400 Subject: [PATCH 03/26] Fix C++ standards library portability issue. (#4261) Fix C++ standards library portability issue. Cherry-pick of upstream 2.5 patches: zynaddsubfx/zynaddsubfx@417d49b, zynaddsubfx/zynaddsubfx@edca8ab Closes #4152 --- .../zynaddsubfx/src/DSP/FFTwrapper.h | 19 +++++++++++++++++++ .../src/Params/PADnoteParameters.cpp | 2 +- .../zynaddsubfx/src/Synth/OscilGen.cpp | 6 +++--- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/DSP/FFTwrapper.h b/plugins/zynaddsubfx/zynaddsubfx/src/DSP/FFTwrapper.h index 1d61e2e53..c79bd211b 100644 --- a/plugins/zynaddsubfx/zynaddsubfx/src/DSP/FFTwrapper.h +++ b/plugins/zynaddsubfx/zynaddsubfx/src/DSP/FFTwrapper.h @@ -49,5 +49,24 @@ class FFTwrapper fftwf_plan planfftw, planfftw_inv; }; +/* + * The "std::polar" template has no clear definition for the range of + * the input parameters, and some C++ standard library implementations + * don't accept negative amplitude among others. Define our own + * FFTpolar template, which works like we expect it to. + */ +template +std::complex<_Tp> +FFTpolar(const _Tp& __rho, const _Tp& __theta = _Tp(0)) +{ + _Tp __x = __rho * cos(__theta); + if (std::isnan(__x)) + __x = 0; + _Tp __y = __rho * sin(__theta); + if (std::isnan(__y)) + __y = 0; + return std::complex<_Tp>(__x, __y); +} + void FFT_cleanup(); #endif diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/Params/PADnoteParameters.cpp b/plugins/zynaddsubfx/zynaddsubfx/src/Params/PADnoteParameters.cpp index d0572cac3..136ee50e6 100644 --- a/plugins/zynaddsubfx/zynaddsubfx/src/Params/PADnoteParameters.cpp +++ b/plugins/zynaddsubfx/zynaddsubfx/src/Params/PADnoteParameters.cpp @@ -615,7 +615,7 @@ void PADnoteParameters::applyparameters(bool lockmutex) newsample.smp[0] = 0.0f; for(int i = 1; i < spectrumsize; ++i) //randomize the phases - fftfreqs[i] = std::polar(spectrum[i], (float)RND * 6.29f); + fftfreqs[i] = FFTpolar(spectrum[i], (float)RND * 6.29f); fft->freqs2smps(fftfreqs, newsample.smp); //that's all; here is the only ifft for the whole sample; no windows are used ;-) diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp b/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp index 6cd89dcc6..7e24a5a6b 100644 --- a/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp +++ b/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp @@ -533,7 +533,7 @@ void OscilGen::spectrumadjust() mag = 1.0f; break; } - oscilFFTfreqs[i] = std::polar(mag, phase); + oscilFFTfreqs[i] = FFTpolar(mag, phase); } } @@ -629,7 +629,7 @@ void OscilGen::prepare() int k = i * (j + 1); if(k >= synth->oscilsize / 2) break; - oscilFFTfreqs[k] += basefuncFFTfreqs[i] * std::polar( + oscilFFTfreqs[k] += basefuncFFTfreqs[i] * FFTpolar( hmag[j], hphase[j] * k); } @@ -857,7 +857,7 @@ short int OscilGen::get(float *smps, float freqHz, int resonance) const float rnd = PI * powf((Prand - 64.0f) / 64.0f, 2.0f); for(int i = 1; i < nyquist - 1; ++i) //to Nyquist only for AntiAliasing outoscilFFTfreqs[i] *= - std::polar(1.0f, (float)(rnd * i * RND)); + FFTpolar(1.0f, (float)(rnd * i * RND)); } //Harmonic Amplitude Randomness From 7a8a925b8358ad838e4c3addb53257a9d9099230 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Mon, 19 Mar 2018 12:18:47 -0400 Subject: [PATCH 04/26] Fix toFloat Qt5 regression (#4244) Closes #4241 --- plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp b/plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp index 3ceca31ef..3ebc2eeec 100644 --- a/plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp +++ b/plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp @@ -505,7 +505,7 @@ float QtXmlWrapper::getparreal(const char *name, float defaultpar) const return defaultpar; } - return tmp.attribute( "value" ).toFloat(); + return QLocale().toFloat( tmp.attribute( "value" ) ); } float QtXmlWrapper::getparreal(const char *name, From 0d1c874a60c9020ef9c1105937aa81c17487dc8b Mon Sep 17 00:00:00 2001 From: Umcaruje Date: Mon, 19 Mar 2018 17:35:15 +0100 Subject: [PATCH 05/26] Change selected notes color (#4243) --- data/themes/default/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/themes/default/style.css b/data/themes/default/style.css index 8da7522fd..314ca98c7 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -144,7 +144,7 @@ PianoRoll { qproperty-noteColor: #0bd556; qproperty-noteOpacity: 165; qproperty-noteBorders: false; /* boolean property, set false to have borderless notes */ - qproperty-selectedNoteColor: #006b65; + qproperty-selectedNoteColor: #064d79; qproperty-barColor: #078f3a; qproperty-markedSemitoneColor: #06170E; /* Grid colors */ From fc5fc1cbaaca799a73d9977e42b0cec4d65bdfd0 Mon Sep 17 00:00:00 2001 From: Orbital Ink <31394502+Anonymouqs@users.noreply.github.com> Date: Mon, 19 Mar 2018 12:23:00 -0500 Subject: [PATCH 06/26] Change Detune To Pitch Bend in Piano Roll (#4194) --- src/gui/editors/PianoRoll.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 13b1dd4a7..98c84a524 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -4076,14 +4076,14 @@ PianoRollWindow::PianoRollWindow() : QAction* drawAction = editModeGroup->addAction( embed::getIconPixmap( "edit_draw" ), tr( "Draw mode (Shift+D)" ) ); QAction* eraseAction = editModeGroup->addAction( embed::getIconPixmap( "edit_erase" ), tr("Erase mode (Shift+E)" ) ); QAction* selectAction = editModeGroup->addAction( embed::getIconPixmap( "edit_select" ), tr( "Select mode (Shift+S)" ) ); - QAction* detuneAction = editModeGroup->addAction( embed::getIconPixmap( "automation" ), tr("Detune mode (Shift+T)" ) ); + QAction* pitchBendAction = editModeGroup->addAction( embed::getIconPixmap( "automation" ), tr("Pitch Bend mode (Shift+T)" ) ); drawAction->setChecked( true ); drawAction->setShortcut( Qt::SHIFT | Qt::Key_D ); eraseAction->setShortcut( Qt::SHIFT | Qt::Key_E ); selectAction->setShortcut( Qt::SHIFT | Qt::Key_S ); - detuneAction->setShortcut( Qt::SHIFT | Qt::Key_T ); + pitchBendAction->setShortcut( Qt::SHIFT | Qt::Key_T ); drawAction->setWhatsThis( tr( "Click here and draw mode will be activated. In this " @@ -4111,8 +4111,8 @@ PianoRollWindow::PianoRollWindow() : #else "Ctrl" ) ); #endif - detuneAction->setWhatsThis( - tr( "Click here and detune mode will be activated. " + pitchBendAction->setWhatsThis( + tr( "Click here and Pitch Bend mode will be activated. " "In this mode you can click a note to open its " "automation detuning. You can utilize this to slide " "notes from one to another. You can also press " @@ -4126,7 +4126,7 @@ PianoRollWindow::PianoRollWindow() : notesActionsToolBar->addAction( drawAction ); notesActionsToolBar->addAction( eraseAction ); notesActionsToolBar->addAction( selectAction ); - notesActionsToolBar->addAction( detuneAction ); + notesActionsToolBar->addAction( pitchBendAction ); notesActionsToolBar->addSeparator(); notesActionsToolBar->addAction( quantizeAction ); From 87e6b48df73518b4c43db118374f2d94e034edde Mon Sep 17 00:00:00 2001 From: Noah Brecht Date: Tue, 20 Mar 2018 23:13:42 -0400 Subject: [PATCH 07/26] Fix ui glitch where track ticks did not line up (#4171) --- src/tracks/Pattern.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index e726ca2ee..01d51fbae 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -884,7 +884,7 @@ void PatternView::paintEvent( QPaintEvent * ) const float ppt = fixedTCOs() ? ( parentWidget()->width() - 2 * TCO_BORDER_WIDTH ) / (float) m_pat->length().getTact() : - ( width() - 2 * TCO_BORDER_WIDTH ) + ( width() - TCO_BORDER_WIDTH ) / (float) m_pat->length().getTact(); const int x_base = TCO_BORDER_WIDTH; From ac543ffc750d95023f1d58c41647402c9a3e1fc4 Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Thu, 22 Mar 2018 12:39:17 +0900 Subject: [PATCH 08/26] Play correct note when dragging left side of virtual keyboard (#4265) --- src/gui/PianoView.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/gui/PianoView.cpp b/src/gui/PianoView.cpp index 351806936..2a64e72dd 100644 --- a/src/gui/PianoView.cpp +++ b/src/gui/PianoView.cpp @@ -327,7 +327,9 @@ void PianoView::modelChanged() */ int PianoView::getKeyFromMouse( const QPoint & _p ) const { - int key_num = (int)( (float) _p.x() / (float) PW_WHITE_KEY_WIDTH ); + int offset = _p.x() % PW_WHITE_KEY_WIDTH; + if( offset < 0 ) offset += PW_WHITE_KEY_WIDTH; + int key_num = ( _p.x() - offset) / PW_WHITE_KEY_WIDTH; for( int i = 0; i <= key_num; ++i ) { @@ -336,6 +338,13 @@ int PianoView::getKeyFromMouse( const QPoint & _p ) const ++key_num; } } + for( int i = 0; i >= key_num; --i ) + { + if ( Piano::isBlackKey( m_startKey+i ) ) + { + --key_num; + } + } key_num += m_startKey; @@ -345,16 +354,14 @@ int PianoView::getKeyFromMouse( const QPoint & _p ) const // then do extra checking whether the mouse-cursor is over // a black key if( key_num > 0 && Piano::isBlackKey( key_num-1 ) && - _p.x() % PW_WHITE_KEY_WIDTH <= - ( PW_WHITE_KEY_WIDTH / 2 ) - - ( PW_BLACK_KEY_WIDTH / 2 ) ) + offset <= ( PW_WHITE_KEY_WIDTH / 2 ) - + ( PW_BLACK_KEY_WIDTH / 2 ) ) { --key_num; } if( key_num < NumKeys - 1 && Piano::isBlackKey( key_num+1 ) && - _p.x() % PW_WHITE_KEY_WIDTH >= - ( PW_WHITE_KEY_WIDTH - - PW_BLACK_KEY_WIDTH / 2 ) ) + offset >= ( PW_WHITE_KEY_WIDTH - + PW_BLACK_KEY_WIDTH / 2 ) ) { ++key_num; } From 3673e84ac12dd748b61f6ac1f8d5e6fdc2b86448 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Mon, 26 Mar 2018 21:51:55 -0400 Subject: [PATCH 09/26] Allow relative paths on non-existent directories (#4271) * Use cleanPath for calculating relative directories Closes #4267 --- src/core/ConfigManager.cpp | 2 +- src/core/SampleBuffer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index a99223a9d..2d89d76b1 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -227,7 +227,7 @@ bool ConfigManager::hasWorkingDir() const void ConfigManager::setWorkingDir( const QString & wd ) { - m_workingDir = ensureTrailingSlash( QFileInfo( wd ).canonicalFilePath() ); + m_workingDir = ensureTrailingSlash( QDir::cleanPath( wd ) ); } diff --git a/src/core/SampleBuffer.cpp b/src/core/SampleBuffer.cpp index 141085dd2..5fc640cb6 100644 --- a/src/core/SampleBuffer.cpp +++ b/src/core/SampleBuffer.cpp @@ -1416,7 +1416,7 @@ QString SampleBuffer::tryToMakeRelative( const QString & file ) if( QFileInfo( file ).isRelative() == false ) { // Normalize the path - QString f = QFileInfo( file ).canonicalFilePath().replace( QDir::separator(), '/' ); + QString f( QDir::cleanPath( file ) ); // First, look in factory samples // Isolate "samples/" from "data:/samples/" @@ -1425,7 +1425,7 @@ QString SampleBuffer::tryToMakeRelative( const QString & file ) // Iterate over all valid "data:/" searchPaths for ( const QString & path : QDir::searchPaths( "data" ) ) { - QString samplesPath = QString( path + samplesSuffix ).replace( QDir::separator(), '/' ); + QString samplesPath = QDir::cleanPath( path + samplesSuffix ) + "/"; if ( f.startsWith( samplesPath ) ) { return QString( f ).mid( samplesPath.length() ); From 1df461d64db73da03ee6c0df5bdb2e6f87c2a770 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Fri, 30 Mar 2018 14:13:31 -0400 Subject: [PATCH 10/26] Fix VSTs on Fedora 27 (#4276) --- cmake/modules/FindWine.cmake | 2 +- plugins/vst_base/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/modules/FindWine.cmake b/cmake/modules/FindWine.cmake index 458df0653..8771ff3f3 100644 --- a/cmake/modules/FindWine.cmake +++ b/cmake/modules/FindWine.cmake @@ -9,7 +9,7 @@ LIST(APPEND CMAKE_PREFIX_PATH /opt/wine-stable /opt/wine-devel /opt/wine-staging) -FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine) +FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine wine/wine) FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine i386-linux-gnu/wine) FIND_PROGRAM(WINE_CXX NAMES wineg++ winegcc winegcc64 winegcc32) diff --git a/plugins/vst_base/CMakeLists.txt b/plugins/vst_base/CMakeLists.txt index cd2f32fbd..67e52a9ff 100644 --- a/plugins/vst_base/CMakeLists.txt +++ b/plugins/vst_base/CMakeLists.txt @@ -52,6 +52,7 @@ SET(WINE_CXX_ARGS -I${CMAKE_BINARY_DIR} -I${CMAKE_SOURCE_DIR}/include -I${WINE_INCLUDE_BASE_DIR} + -I${WINE_INCLUDE_DIR}/windows -L${WINE_LIBRARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp -std=c++0x From ee910d38fec666cfac82ab9edc13bea25e730805 Mon Sep 17 00:00:00 2001 From: Umcaruje Date: Mon, 2 Apr 2018 19:33:01 +0200 Subject: [PATCH 11/26] Fix marked semitones in the piano roll (#4239) * Fix marked semitones in the piano roll * Don't draw in invalid patterns * update classic theme * Fix contrast * update classic theme --- data/themes/classic/style.css | 2 +- data/themes/default/style.css | 2 +- src/gui/editors/PianoRoll.cpp | 35 ++++++++++++++++------------------- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/data/themes/classic/style.css b/data/themes/classic/style.css index 21a3b1551..55f82e4b3 100644 --- a/data/themes/classic/style.css +++ b/data/themes/classic/style.css @@ -127,7 +127,7 @@ PianoRoll { qproperty-noteBorders: true; /* boolean property, set false to have borderless notes */ qproperty-selectedNoteColor: rgb( 0, 125, 255 ); qproperty-barColor: #4afd85; - qproperty-markedSemitoneColor: rgba( 40, 40, 40, 200 ); + qproperty-markedSemitoneColor: rgba( 0, 255, 200, 60 ); /* Grid colors */ qproperty-lineColor: rgba( 128, 128, 128, 80 ); qproperty-beatLineColor: rgba( 128, 128, 128, 160 ); diff --git a/data/themes/default/style.css b/data/themes/default/style.css index 314ca98c7..8493abbf3 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -146,7 +146,7 @@ PianoRoll { qproperty-noteBorders: false; /* boolean property, set false to have borderless notes */ qproperty-selectedNoteColor: #064d79; qproperty-barColor: #078f3a; - qproperty-markedSemitoneColor: #06170E; + qproperty-markedSemitoneColor: rgba(255, 255, 255, 30); /* Grid colors */ qproperty-lineColor: #292929; qproperty-beatLineColor: #2d6b45; diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 98c84a524..dbec84357 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -2633,23 +2633,6 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) int key = m_startKey; - // display note marks before drawing other lines - for( int i = 0; i < m_markedSemiTones.size(); i++ ) - { - const int key_num = m_markedSemiTones.at( i ); - const int y = keyAreaBottom() + 5 - - KEY_LINE_HEIGHT * ( key_num - m_startKey + 1 ); - - if( y > keyAreaBottom() ) - { - break; - } - - p.fillRect( WHITE_KEY_WIDTH + 1, y - KEY_LINE_HEIGHT / 2, width() - 10, KEY_LINE_HEIGHT, - markedSemitoneColor() ); - } - - // draw all white keys... for( int y = key_line_y + 1 + y_offset; y > PR_TOP_MARGIN; key_line_y -= KEY_LINE_HEIGHT, ++keys_processed ) @@ -2913,7 +2896,6 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) } } - // Draw the vertical beat lines int ticksPerBeat = DefaultTicksPerTact / Engine::getSong()->getTimeSigModel().getDenominator(); @@ -2934,8 +2916,23 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) p.setPen( barLineColor() ); p.drawLine( x, PR_TOP_MARGIN, x, height() - PR_BOTTOM_MARGIN ); } - } + // draw marked semitones after the grid + for( int i = 0; i < m_markedSemiTones.size(); i++ ) + { + const int key_num = m_markedSemiTones.at( i ); + const int y = keyAreaBottom() + 5 + - KEY_LINE_HEIGHT * ( key_num - m_startKey + 1 ); + + if( y > keyAreaBottom() ) + { + break; + } + + p.fillRect( WHITE_KEY_WIDTH + 1, y - KEY_LINE_HEIGHT / 2, width() - 10, KEY_LINE_HEIGHT + 1, + markedSemitoneColor() ); + } + } // following code draws all notes in visible area // and the note editing stuff (volume, panning, etc) From b77027d6fb7a935ee16695ef4ab7b8f4976659c5 Mon Sep 17 00:00:00 2001 From: Umcaruje Date: Mon, 2 Apr 2018 19:36:07 +0200 Subject: [PATCH 12/26] Fix MDI subwindow buttons contrast in the MenuBar (#4242) * Fix MDI subwindow buttons contrast in the MenuBar * Hard code the button color in LmmsStyle.cpp (thanks @PhysSong) * Fix code formatting --- src/gui/LmmsStyle.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/LmmsStyle.cpp b/src/gui/LmmsStyle.cpp index b883a2b2f..e57e29e47 100644 --- a/src/gui/LmmsStyle.cpp +++ b/src/gui/LmmsStyle.cpp @@ -177,6 +177,13 @@ void LmmsStyle::drawComplexControl( ComplexControl control, return; } } + else if (control == CC_MdiControls) + { + QStyleOptionComplex so(*option); + so.palette.setColor(QPalette::Button, QColor(223, 228, 236)); + QProxyStyle::drawComplexControl(control, &so, painter, widget); + return; + } /* else if( control == CC_ScrollBar ) { painter->fillRect( option->rect, QApplication::palette().color( QPalette::Active, @@ -365,4 +372,3 @@ void LmmsStyle::hoverColors( bool sunken, bool hover, bool active, QColor& color blend = QColor( 33, 33, 33 ); } } - From d30a22487e138c1e4c1fa2b3b62e0dc14f24fdd8 Mon Sep 17 00:00:00 2001 From: Dominic Clark Date: Tue, 3 Apr 2018 19:08:53 +0100 Subject: [PATCH 13/26] Don't call setParameter from audioMasterAutomate (#4279) --- plugins/vst_base/RemoteVstPlugin.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/vst_base/RemoteVstPlugin.cpp b/plugins/vst_base/RemoteVstPlugin.cpp index 04ff97731..71ebf74c0 100644 --- a/plugins/vst_base/RemoteVstPlugin.cpp +++ b/plugins/vst_base/RemoteVstPlugin.cpp @@ -1450,7 +1450,6 @@ intptr_t RemoteVstPlugin::hostCallback( AEffect * _effect, int32_t _opcode, case audioMasterAutomate: SHOW_CALLBACK( "amc: audioMasterAutomate\n" ); // index, value, returns 0 - _effect->setParameter( _effect, _index, _opt ); return 0; case audioMasterVersion: From 00f9590b18e3095425f440d4816964d36e9ef489 Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Wed, 4 Apr 2018 09:06:58 +0900 Subject: [PATCH 14/26] Fix preset preview issues with peak controllers (#3904) --- plugins/peak_controller_effect/peak_controller_effect.cpp | 3 ++- .../peak_controller_effect_controls.cpp | 7 ------- src/core/PeakController.cpp | 7 +------ 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/plugins/peak_controller_effect/peak_controller_effect.cpp b/plugins/peak_controller_effect/peak_controller_effect.cpp index 59c91f3d1..d4d81b137 100644 --- a/plugins/peak_controller_effect/peak_controller_effect.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect.cpp @@ -26,6 +26,7 @@ #include "Controller.h" #include "Song.h" +#include "PresetPreviewPlayHandle.h" #include "PeakController.h" #include "peak_controller_effect.h" #include "lmms_math.h" @@ -67,7 +68,7 @@ PeakControllerEffect::PeakControllerEffect( m_autoController( NULL ) { m_autoController = new PeakController( Engine::getSong(), this ); - if( !Engine::getSong()->isLoadingProject() ) + if( !Engine::getSong()->isLoadingProject() && !PresetPreviewPlayHandle::isPreviewing() ) { Engine::getSong()->addController( m_autoController ); } diff --git a/plugins/peak_controller_effect/peak_controller_effect_controls.cpp b/plugins/peak_controller_effect/peak_controller_effect_controls.cpp index 2f634cbea..3508f869a 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_controls.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect_controls.cpp @@ -29,7 +29,6 @@ #include "PeakController.h" #include "peak_controller_effect_controls.h" #include "peak_controller_effect.h" -#include "PresetPreviewPlayHandle.h" #include "Song.h" @@ -80,12 +79,6 @@ void PeakControllerEffectControls::loadSettings( const QDomElement & _this ) { m_effect->m_effectId = rand(); } - - if( m_effect->m_autoController && PresetPreviewPlayHandle::isPreviewing() == true ) - { - delete m_effect->m_autoController; - m_effect->m_autoController = 0; - } } diff --git a/src/core/PeakController.cpp b/src/core/PeakController.cpp index 976e3c96e..9e5e654a6 100644 --- a/src/core/PeakController.cpp +++ b/src/core/PeakController.cpp @@ -33,7 +33,6 @@ #include "Mixer.h" #include "EffectChain.h" #include "plugins/peak_controller_effect/peak_controller_effect.h" -#include "PresetPreviewPlayHandle.h" PeakControllerEffectVector PeakController::s_effects; int PeakController::m_getCount; @@ -64,11 +63,7 @@ PeakController::PeakController( Model * _parent, PeakController::~PeakController() { - //EffectChain::loadSettings() appends effect to EffectChain::m_effects - //When it's previewing, EffectChain::loadSettings() is not called - //Therefore, we shouldn't call removeEffect() as it is not even appended. - //NB: Most XML setting are loaded on preview, except controller fx. - if( m_peakEffect != NULL && m_peakEffect->effectChain() != NULL && PresetPreviewPlayHandle::isPreviewing() == false ) + if( m_peakEffect != NULL && m_peakEffect->effectChain() != NULL ) { m_peakEffect->effectChain()->removeEffect( m_peakEffect ); } From e554a4c4b093ea4c319cceed98f4495484da37b0 Mon Sep 17 00:00:00 2001 From: Hussam Eddin Alhomsi Date: Wed, 11 Apr 2018 13:39:43 +0300 Subject: [PATCH 15/26] Better behavior when left-clicking a TCO (#4290) Instead of calling MouseMoveEvent(), the TCO's "text float" text and position are updated. This prevents left-clicking the right edge of a resizable TCO from decreasing its size. Also, removed an unused variable: m_oldTime --- include/Track.h | 2 -- src/core/Track.cpp | 30 ++++++++++++++++++++---------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/include/Track.h b/include/Track.h index dcb1648e0..00ee5d0a6 100644 --- a/include/Track.h +++ b/include/Track.h @@ -290,8 +290,6 @@ private: TextFloat * m_hint; - MidiTime m_oldTime;// used for undo/redo while mouse-button is pressed - // qproperty fields QColor m_mutedColor; QColor m_mutedBackgroundColor; diff --git a/src/core/Track.cpp b/src/core/Track.cpp index 65187f552..88266d36c 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -701,10 +701,8 @@ void TrackContentObjectView::mousePressEvent( QMouseEvent * me ) if( me->x() < width() - RESIZE_GRIP_WIDTH ) { m_action = Move; - m_oldTime = m_tco->startPosition(); QCursor c( Qt::SizeAllCursor ); QApplication::setOverrideCursor( c ); - s_textFloat->setTitle( tr( "Current position" ) ); delete m_hint; m_hint = TextFloat::displayMessage( tr( "Hint" ), tr( "Press <%1> and drag to make " @@ -715,14 +713,18 @@ void TrackContentObjectView::mousePressEvent( QMouseEvent * me ) "Ctrl"), #endif embed::getIconPixmap( "hint" ), 0 ); + s_textFloat->setTitle( tr( "Current position" ) ); + s_textFloat->setText( QString( "%1:%2" ). + arg( m_tco->startPosition().getTact() + 1 ). + arg( m_tco->startPosition().getTicks() % + MidiTime::ticksPerTact() ) ); + s_textFloat->moveGlobal( this, QPoint( width() + 2, height() + 2 ) ); } else if( !m_tco->getAutoResize() ) { m_action = Resize; - m_oldTime = m_tco->length(); QCursor c( Qt::SizeHorCursor ); QApplication::setOverrideCursor( c ); - s_textFloat->setTitle( tr( "Current length" ) ); delete m_hint; m_hint = TextFloat::displayMessage( tr( "Hint" ), tr( "Press <%1> for free " @@ -733,10 +735,20 @@ void TrackContentObjectView::mousePressEvent( QMouseEvent * me ) "Ctrl"), #endif embed::getIconPixmap( "hint" ), 0 ); + s_textFloat->setTitle( tr( "Current length" ) ); + s_textFloat->setText( tr( "%1:%2 (%3:%4 to %5:%6)" ). + arg( m_tco->length().getTact() ). + arg( m_tco->length().getTicks() % + MidiTime::ticksPerTact() ). + arg( m_tco->startPosition().getTact() + 1 ). + arg( m_tco->startPosition().getTicks() % + MidiTime::ticksPerTact() ). + arg( m_tco->endPosition().getTact() + 1 ). + arg( m_tco->endPosition().getTicks() % + MidiTime::ticksPerTact() ) ); + s_textFloat->moveGlobal( this, QPoint( width() + 2, height() + 2) ); } // s_textFloat->reparent( this ); - // setup text-float as if TCO was already moved/resized - mouseMoveEvent( me ); s_textFloat->show(); } else if( me->button() == Qt::RightButton ) @@ -846,8 +858,7 @@ void TrackContentObjectView::mouseMoveEvent( QMouseEvent * me ) arg( m_tco->startPosition().getTact() + 1 ). arg( m_tco->startPosition().getTicks() % MidiTime::ticksPerTact() ) ); - s_textFloat->moveGlobal( this, QPoint( width() + 2, - height() + 2 ) ); + s_textFloat->moveGlobal( this, QPoint( width() + 2, height() + 2 ) ); } else if( m_action == MoveSelection ) { @@ -906,8 +917,7 @@ void TrackContentObjectView::mouseMoveEvent( QMouseEvent * me ) arg( m_tco->endPosition().getTact() + 1 ). arg( m_tco->endPosition().getTicks() % MidiTime::ticksPerTact() ) ); - s_textFloat->moveGlobal( this, QPoint( width() + 2, - height() + 2) ); + s_textFloat->moveGlobal( this, QPoint( width() + 2, height() + 2) ); } else { From 07a23c4e3b5c16c60ac6a5a89c9330bbd513cb49 Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Sun, 15 Apr 2018 15:44:38 +0200 Subject: [PATCH 16/26] Allways remove infs/nans (#3706) When exporting a project lmms performs extra tests for bad data. The tests are for infs and nans. Switching these tests on for all occasions as the extra performance hit would be in the order of only ~2% and the problems, when it hits the end user, are hard to debug and/or work around. After testing for inf/nan we clamp the sound to +/-4.0f as sometimes you will get large transients passing through (an issue that is currently only present when exporting). Fixes: #1048 --- src/core/EffectChain.cpp | 12 +++--------- src/core/FxMixer.cpp | 13 ++++--------- src/core/MixHelpers.cpp | 4 ++++ 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/core/EffectChain.cpp b/src/core/EffectChain.cpp index a1aea9d3a..efadca525 100644 --- a/src/core/EffectChain.cpp +++ b/src/core/EffectChain.cpp @@ -202,11 +202,8 @@ bool EffectChain::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames, b { return false; } - const bool exporting = Engine::getSong()->isExporting(); - if( exporting ) // strip infs/nans if exporting - { - MixHelpers::sanitize( _buf, _frames ); - } + + MixHelpers::sanitize( _buf, _frames ); bool moreEffects = false; for( EffectList::Iterator it = m_effects.begin(); it != m_effects.end(); ++it ) @@ -214,10 +211,7 @@ bool EffectChain::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames, b if( hasInputNoise || ( *it )->isRunning() ) { moreEffects |= ( *it )->processAudioBuffer( _buf, _frames ); - if( exporting ) // strip infs/nans if exporting - { - MixHelpers::sanitize( _buf, _frames ); - } + MixHelpers::sanitize( _buf, _frames ); } } diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index 5ac23639a..62b68b7a3 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -117,7 +117,6 @@ void FxChannel::unmuteForSolo() void FxChannel::doProcessing() { const fpp_t fpp = Engine::mixer()->framesPerPeriod(); - const bool exporting = Engine::getSong()->isExporting(); if( m_muted == false ) { @@ -140,25 +139,21 @@ void FxChannel::doProcessing() if( ! volBuf && ! sendBuf ) // neither volume nor send has sample-exact data... { const float v = sender->m_volumeModel.value() * sendModel->value(); - if( exporting ) { MixHelpers::addSanitizedMultiplied( m_buffer, ch_buf, v, fpp ); } - else { MixHelpers::addMultiplied( m_buffer, ch_buf, v, fpp ); } + MixHelpers::addSanitizedMultiplied( m_buffer, ch_buf, v, fpp ); } else if( volBuf && sendBuf ) // both volume and send have sample-exact data { - if( exporting ) { MixHelpers::addSanitizedMultipliedByBuffers( m_buffer, ch_buf, volBuf, sendBuf, fpp ); } - else { MixHelpers::addMultipliedByBuffers( m_buffer, ch_buf, volBuf, sendBuf, fpp ); } + MixHelpers::addSanitizedMultipliedByBuffers( m_buffer, ch_buf, volBuf, sendBuf, fpp ); } else if( volBuf ) // volume has sample-exact data but send does not { const float v = sendModel->value(); - if( exporting ) { MixHelpers::addSanitizedMultipliedByBuffer( m_buffer, ch_buf, v, volBuf, fpp ); } - else { MixHelpers::addMultipliedByBuffer( m_buffer, ch_buf, v, volBuf, fpp ); } + MixHelpers::addSanitizedMultipliedByBuffer( m_buffer, ch_buf, v, volBuf, fpp ); } else // vice versa { const float v = sender->m_volumeModel.value(); - if( exporting ) { MixHelpers::addSanitizedMultipliedByBuffer( m_buffer, ch_buf, v, sendBuf, fpp ); } - else { MixHelpers::addMultipliedByBuffer( m_buffer, ch_buf, v, sendBuf, fpp ); } + MixHelpers::addSanitizedMultipliedByBuffer( m_buffer, ch_buf, v, sendBuf, fpp ); } m_hasInput = true; } diff --git a/src/core/MixHelpers.cpp b/src/core/MixHelpers.cpp index 001aa05cc..60fa778af 100644 --- a/src/core/MixHelpers.cpp +++ b/src/core/MixHelpers.cpp @@ -82,6 +82,10 @@ bool sanitize( sampleFrame * src, int frames ) src[f][c] = 0.0f; found = true; } + else + { + src[f][c] = qBound( -4.0f, src[f][c], 4.0f ); + } } } return found; From 18a4346fd58207ddf23b5abfa081b809f07a88f6 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Fri, 20 Apr 2018 15:41:08 -0400 Subject: [PATCH 17/26] Better default working directory (#4288) * Better default working directory Closes #1135 --- src/core/ConfigManager.cpp | 15 ++++++++++++++- src/gui/GuiApplication.cpp | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index 2d89d76b1..177a90437 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -26,6 +26,11 @@ #include #include #include +#if QT_VERSION >= 0x050000 +#include +#else +#include +#endif #include #include "ConfigManager.h" @@ -50,7 +55,11 @@ ConfigManager * ConfigManager::s_instanceOfMe = NULL; ConfigManager::ConfigManager() : m_lmmsRcFile( QDir::home().absolutePath() +"/.lmmsrc.xml" ), - m_workingDir( QDir::home().absolutePath() + "/lmms/"), + #if QT_VERSION >= 0x050000 + m_workingDir( QStandardPaths::writableLocation( QStandardPaths::DocumentsLocation ) + "/lmms/"), + #else + m_workingDir( QDesktopServices::storageLocation( QDesktopServices::DocumentsLocation ) + "/lmms/"), + #endif m_dataDir( "data:/" ), m_artworkDir( defaultArtworkDir() ), m_vstDir( m_workingDir + "vst/" ), @@ -58,6 +67,10 @@ ConfigManager::ConfigManager() : m_sf2Dir( m_workingDir + SF2_PATH ), m_version( defaultVersion() ) { + // Detect < 1.2.0 working directory as a courtesy + if ( QFileInfo( QDir::home().absolutePath() + "/lmms/projects/" ).exists() ) + m_workingDir = QDir::home().absolutePath() + "/lmms/"; + if (! qgetenv("LMMS_DATA_DIR").isEmpty()) QDir::addSearchPath("data", QString::fromLocal8Bit(qgetenv("LMMS_DATA_DIR"))); diff --git a/src/gui/GuiApplication.cpp b/src/gui/GuiApplication.cpp index e82d95b9a..2c577868c 100644 --- a/src/gui/GuiApplication.cpp +++ b/src/gui/GuiApplication.cpp @@ -59,7 +59,7 @@ GuiApplication::GuiApplication() QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); #endif - // prompt the user to create the LMMS working directory (e.g. ~/lmms) if it doesn't exist + // prompt the user to create the LMMS working directory (e.g. ~/Documents/lmms) if it doesn't exist if ( !ConfigManager::inst()->hasWorkingDir() && QMessageBox::question( NULL, tr( "Working directory" ), From 22ca47abba996034f59e5e540eb728fe02161f47 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Fri, 20 Apr 2018 15:46:13 -0400 Subject: [PATCH 18/26] Disable fluidsynth audio backends if possible (#4300) Closes #649 Partially reverts #3446 --- .travis/osx..install.sh | 8 +----- cmake/apple/fluid-synth.rb | 42 ------------------------------- plugins/sf2_player/sf2_player.cpp | 6 +++++ 3 files changed, 7 insertions(+), 49 deletions(-) delete mode 100644 cmake/apple/fluid-synth.rb diff --git a/.travis/osx..install.sh b/.travis/osx..install.sh index 3fb1df701..45a6762d1 100644 --- a/.travis/osx..install.sh +++ b/.travis/osx..install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -PACKAGES="cmake pkgconfig fftw libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio stk portaudio node fltk" +PACKAGES="cmake pkgconfig fftw libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio stk fluid-synth portaudio node fltk" if [ $QT5 ]; then PACKAGES="$PACKAGES qt5" @@ -10,10 +10,4 @@ fi brew install $PACKAGES ccache -# Recompile fluid-synth without CoreAudio per issues #649 -# Changes to fluid-synth.rb must be pushed to URL prior to use -url=$(git remote get-url origin) -branch=$(git symbolic-ref --short HEAD) -brew install --build-from-source $url/raw/$branch/cmake/apple/fluid-synth.rb - sudo npm install -g appdmg diff --git a/cmake/apple/fluid-synth.rb b/cmake/apple/fluid-synth.rb deleted file mode 100644 index d05fb4d65..000000000 --- a/cmake/apple/fluid-synth.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2009-present, Homebrew contributors -# License: BSD 2-Clause - -class FluidSynth < Formula - desc "Real-time software synthesizer based on the SoundFont 2 specs" - homepage "http://www.fluidsynth.org" - url "https://downloads.sourceforge.net/project/fluidsynth/fluidsynth-1.1.6/fluidsynth-1.1.6.tar.gz" - sha256 "50853391d9ebeda9b4db787efb23f98b1e26b7296dd2bb5d0d96b5bccee2171c" - - bottle do - cellar :any - rebuild 1 - sha256 "ee86f0e263db0610a340592d725bd2c05bc5ed1bfa6eb496ae304297de261ae0" => :sierra - sha256 "dfe31491d27c3c29ff4686900984e5884f89cd249d82b3dba4ad077f7bbe9057" => :el_capitan - sha256 "6938c03a61b696870de92435dc0a6e6118fbb0d68adcd0d17ec8d30c2f7eee20" => :yosemite - sha256 "5c5e00f88e45dd661c15f0e13793f9cc96f285b08200145ce8b77982350a5625" => :mavericks - sha256 "83b972cf7aec57e78dc1c1a6b3e286d8b9bf2a2622e174bca42efa8576e36e5f" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "cmake" => :build - depends_on "glib" - depends_on "libsndfile" => :optional - depends_on "portaudio" => :optional - - def install - args = std_cmake_args - args << "-Denable-framework=OFF" << "-DLIB_SUFFIX=" - args << "-Denable-portaudio=ON" if build.with? "portaudio" - args << "-Denable-libsndfile=OFF" if build.without? "libsndfile" - args << "-Denable-coreaudio=OFF" # Per lmms/issues/649 - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - assert_match /#{version}/, shell_output("#{bin}/fluidsynth --version") - end -end diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 1ff7a5ae6..24551ac98 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -113,6 +113,12 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) : m_notesRunning[i] = 0; } + +#if FLUIDSYNTH_VERSION_MAJOR >= 1 && FLUIDSYNTH_VERSION_MINOR >= 1 && FLUIDSYNTH_VERSION_MICRO >= 9 + // Deactivate all audio drivers in fluidsynth + const char *none[] = { NULL }; + fluid_audio_driver_register( none ); +#endif m_settings = new_fluid_settings(); //fluid_settings_setint( m_settings, (char *) "audio.period-size", engine::mixer()->framesPerPeriod() ); From aaee2ecb1520cdc6523b49f0bb603226b80fddc5 Mon Sep 17 00:00:00 2001 From: tresf Date: Fri, 20 Apr 2018 21:50:59 -0400 Subject: [PATCH 19/26] Better fluidsynth version detection Per #4300 comment --- plugins/sf2_player/sf2_player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 24551ac98..742f5fb8e 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -114,7 +114,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) : } -#if FLUIDSYNTH_VERSION_MAJOR >= 1 && FLUIDSYNTH_VERSION_MINOR >= 1 && FLUIDSYNTH_VERSION_MICRO >= 9 +#if QT_VERSION_CHECK(FLUIDSYNTH_VERSION_MAJOR, FLUIDSYNTH_VERSION_MINOR, FLUIDSYNTH_VERSION_MICRO) >= QT_VERSION_CHECK(1,1,9) // Deactivate all audio drivers in fluidsynth const char *none[] = { NULL }; fluid_audio_driver_register( none ); From 33368bd9d05ce42a0cf5af1594b996548ecf12c3 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sat, 21 Apr 2018 13:31:14 +0200 Subject: [PATCH 20/26] Revert CONTRIBUTOR file removal This reverts commit 30f1e52be35ed35f8e0e40f876620ce49007be62. # Conflicts: # CMakeLists.txt --- CMakeLists.txt | 16 ++++++++++++++++ doc/CONTRIBUTORS | 0 src/CMakeLists.txt | 5 +---- 3 files changed, 17 insertions(+), 4 deletions(-) delete mode 100644 doc/CONTRIBUTORS diff --git a/CMakeLists.txt b/CMakeLists.txt index 858e310c1..f22e2dfa3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -497,6 +497,22 @@ FILE(REMOVE include/lmmsconfig.h) FILE(GLOB LMMS_INCLUDES "${CMAKE_SOURCE_DIR}/include/*.h") LIST(SORT LMMS_INCLUDES) +# Get list of all committers from git history, ordered by number of commits. +# The CONTRIBUTORS file is used by AboutDialog. This information can be provided +# with -DCONTRIBUTORS=/path/to/CONTRIBUTORS instead. For instance, to generate +# this file for version 1.1.3, the command is: +# git shortlog -sne v1.1.3 | cut -c8- +FIND_PACKAGE(Git) +IF(GIT_FOUND AND NOT CONTRIBUTORS) + SET(CONTRIBUTORS "${CMAKE_BINARY_DIR}/CONTRIBUTORS") + EXECUTE_PROCESS( + COMMAND "${GIT_EXECUTABLE}" shortlog -sne + COMMAND cut -c8- + OUTPUT_FILE "${CONTRIBUTORS}" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + TIMEOUT 1) +ENDIF() + # embedded resources stuff IF(WIN32 OR WIN64) # compile buildtools native diff --git a/doc/CONTRIBUTORS b/doc/CONTRIBUTORS deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 718a6fc1d..17695b5a0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,10 +43,7 @@ IF(WIN32) DEPENDS "${CMAKE_BINARY_DIR}/lmms.rc") ENDIF() -SET(lmms_EMBEDDED_RESOURCES - "${CMAKE_SOURCE_DIR}/doc/AUTHORS" - "${CMAKE_SOURCE_DIR}/LICENSE.txt" - "${CMAKE_SOURCE_DIR}/doc/CONTRIBUTORS") +SET(lmms_EMBEDDED_RESOURCES "${CMAKE_SOURCE_DIR}/doc/AUTHORS" "${CMAKE_SOURCE_DIR}/LICENSE.txt" "${CONTRIBUTORS}") SET(LMMS_ER_H "${CMAKE_CURRENT_BINARY_DIR}/embedded_resources.h") ADD_CUSTOM_COMMAND(OUTPUT "${LMMS_ER_H}" COMMAND "${BIN2RES}" ARGS ${lmms_EMBEDDED_RESOURCES} > "${LMMS_ER_H}" DEPENDS bin2res) From 50eada6b2b846f419509b40feef8702a24c349fe Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sat, 21 Apr 2018 13:33:35 +0200 Subject: [PATCH 21/26] Update project year --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f22e2dfa3..8f269ee64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,7 @@ INCLUDE(FindPkgConfig) STRING(TOUPPER "${CMAKE_PROJECT_NAME}" PROJECT_NAME_UCASE) -# Updated by maintenance tasks -SET(PROJECT_YEAR 2017) +SET(PROJECT_YEAR 2018) SET(PROJECT_AUTHOR "LMMS Developers") SET(PROJECT_URL "https://lmms.io") From d65fdd4ee6acde67ad0b8f0e3909eee3cd68efd9 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sun, 22 Apr 2018 08:34:46 +0200 Subject: [PATCH 22/26] Create no-response.yml --- .github/no-response.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/no-response.yml diff --git a/.github/no-response.yml b/.github/no-response.yml new file mode 100644 index 000000000..476165408 --- /dev/null +++ b/.github/no-response.yml @@ -0,0 +1,2 @@ +# Label requiring a response +responseRequiredLabel: "response required" From fce9326192ce99f48a1cd998a03e9d943544f07d Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 25 Apr 2018 11:00:13 +0200 Subject: [PATCH 23/26] Update rpmalloc to 1.3.0 Fixes #4055 --- src/3rdparty/rpmalloc/rpmalloc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/rpmalloc/rpmalloc b/src/3rdparty/rpmalloc/rpmalloc index 2e0479192..36b1942fb 160000 --- a/src/3rdparty/rpmalloc/rpmalloc +++ b/src/3rdparty/rpmalloc/rpmalloc @@ -1 +1 @@ -Subproject commit 2e0479192b8dfb15e0084969fdf06208cffbfd09 +Subproject commit 36b1942fbc309b139e56a03166ba19a87f28f26c From 386c471ed7fc1cc565be761927c2d7058512f4b9 Mon Sep 17 00:00:00 2001 From: Hussam Eddin Alhomsi Date: Thu, 26 Apr 2018 18:37:43 +0300 Subject: [PATCH 24/26] Limit the automation-editor scaled-level tooltip to the grid (#4308) --- src/gui/editors/AutomationEditor.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index 3d4407e51..0234be0ab 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -1076,8 +1076,8 @@ void AutomationEditor::mouseMoveEvent(QMouseEvent * mouseEvent ) inline void AutomationEditor::drawCross( QPainter & p ) { QPoint mouse_pos = mapFromGlobal( QCursor::pos() ); - float level = getLevel( mouse_pos.y() ); int grid_bottom = height() - SCROLLBAR_SIZE - 1; + float level = getLevel( mouse_pos.y() ); float cross_y = m_y_auto ? grid_bottom - ( ( grid_bottom - TOP_MARGIN ) * ( level - m_minLevel ) @@ -1086,13 +1086,23 @@ inline void AutomationEditor::drawCross( QPainter & p ) p.setPen( crossColor() ); p.drawLine( VALUES_WIDTH, (int) cross_y, width(), (int) cross_y ); - p.drawLine( mouse_pos.x(), TOP_MARGIN, mouse_pos.x(), - height() - SCROLLBAR_SIZE ); + p.drawLine( mouse_pos.x(), TOP_MARGIN, mouse_pos.x(), height() - SCROLLBAR_SIZE ); + + QPoint tt_pos = QCursor::pos(); - tt_pos.ry() -= 64; - tt_pos.rx() += 32; + tt_pos.ry() -= 51; + tt_pos.rx() += 26; + float scaledLevel = m_pattern->firstObject()->scaledValue( level ); - QToolTip::showText( tt_pos, QString::number( scaledLevel ), this ); + + // Limit the scaled-level tooltip to the grid + if( mouse_pos.x() >= 0 && + mouse_pos.x() <= width() - SCROLLBAR_SIZE && + mouse_pos.y() >= 0 && + mouse_pos.y() <= height() - SCROLLBAR_SIZE ) + { + QToolTip::showText( tt_pos, QString::number( scaledLevel ), this ); + } } From 832e87725a7071e5f3c9533218a2eb39237b3cb0 Mon Sep 17 00:00:00 2001 From: Hyunin Song Date: Sun, 29 Apr 2018 21:55:15 +0900 Subject: [PATCH 25/26] Add dummy CircleCI config file --- .circleci/config.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..7ad70d61a --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,11 @@ +# Dummy CircleCI Config File +version: 2 +jobs: + build: + machine: true + branches: + ignore: stable-1.2 + steps: + - run: + name: Dummy + command: echo "Dummy command to prevent error" \ No newline at end of file From 08573fc96db564283f8580ae79de48085665f9dc Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Mon, 30 Apr 2018 14:54:34 +0900 Subject: [PATCH 26/26] Fix detuning crash after deleting the note being edited (#4324) --- src/gui/editors/PianoRoll.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index dbec84357..888425ddc 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -1334,8 +1335,8 @@ void PianoRoll::mousePressEvent(QMouseEvent * me ) if( m_editMode == ModeEditDetuning && noteUnderMouse() ) { - static AutomationPattern* detuningPattern = nullptr; - if (detuningPattern != nullptr) + static QPointer detuningPattern = nullptr; + if (detuningPattern.data() != nullptr) { detuningPattern->disconnect(this); } @@ -1345,7 +1346,7 @@ void PianoRoll::mousePressEvent(QMouseEvent * me ) n->createDetuning(); } detuningPattern = n->detuning()->automationPattern(); - connect(detuningPattern, SIGNAL(dataChanged()), this, SLOT(update())); + connect(detuningPattern.data(), SIGNAL(dataChanged()), this, SLOT(update())); gui->automationEditor()->open(detuningPattern); return; }