From 1d34e940c11f330d3d8d321c93d6d3e366db26aa Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 26 Feb 2018 09:24:23 -0600 Subject: [PATCH 01/38] Change Detune To Pitch Bend in Piano Roll The name of detuneAction is changed into pitchBendAction as well. Fixes Issue #4174 in order to give a clearer name to the mode in the Piano Roll. --- src/gui/editors/PianoRoll.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index ac9b0a89158..22f8be3f471 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -4077,14 +4077,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("Detune 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 " @@ -4112,7 +4112,7 @@ PianoRollWindow::PianoRollWindow() : #else "Ctrl" ) ); #endif - detuneAction->setWhatsThis( + pitchBendAction->setWhatsThis( tr( "Click here and detune mode will be activated. " "In this mode you can click a note to open its " "automation detuning. You can utilize this to slide " @@ -4127,7 +4127,7 @@ PianoRollWindow::PianoRollWindow() : notesActionsToolBar->addAction( drawAction ); notesActionsToolBar->addAction( eraseAction ); notesActionsToolBar->addAction( selectAction ); - notesActionsToolBar->addAction( detuneAction ); + notesActionsToolBar->addAction( pitchBendAction ); notesActionsToolBar->addSeparator(); notesActionsToolBar->addAction( quantizeAction ); From 37c5fdf037e42ecd6559e9ee5e2da53b03069d71 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 26 Feb 2018 13:19:48 -0600 Subject: [PATCH 02/38] Fix Detune Mode To Pitch Bend Mode Fi --- src/gui/editors/PianoRoll.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 22f8be3f471..8c452f5af22 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -4077,7 +4077,7 @@ 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* pitchBendAction = 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 ); @@ -4113,7 +4113,7 @@ PianoRollWindow::PianoRollWindow() : "Ctrl" ) ); #endif pitchBendAction->setWhatsThis( - tr( "Click here and detune mode will be activated. " + 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 " From 1f8a502d0da1e77057c50f15695651fa4cfaac12 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 26 Feb 2018 19:03:02 -0600 Subject: [PATCH 03/38] Decapitalize m in Pitch Bend Mode --- src/gui/editors/PianoRoll.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 8c452f5af22..3bbcdebf7a0 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -4077,7 +4077,7 @@ 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* pitchBendAction = editModeGroup->addAction( embed::getIconPixmap( "automation" ), tr("Pitch Bend Mode (Shift+T)" ) ); + QAction* pitchBendAction = editModeGroup->addAction( embed::getIconPixmap( "automation" ), tr("Pitch Bend mode (Shift+T)" ) ); drawAction->setChecked( true ); @@ -4113,7 +4113,7 @@ PianoRollWindow::PianoRollWindow() : "Ctrl" ) ); #endif pitchBendAction->setWhatsThis( - tr( "Click here and Pitch Bend Mode will be activated. " + 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 " From 238c824e12b7386076382a2b42654b750607e9d3 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Wed, 7 Mar 2018 09:11:25 -0600 Subject: [PATCH 04/38] Change internal references of detune to Pitch Bend in Piano Roll and DetuningHelper Rename DetuningHelper.h as PitchBendHelper.h: * Detune to PitchBend * detune to pitchBend PianoRoll.cpp: * detuning to pitchBend * Detuning to PitchBend --- .../{DetuningHelper.h => PitchBendHelper.h} | 12 +++---- src/gui/editors/PianoRoll.cpp | 34 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) rename include/{DetuningHelper.h => PitchBendHelper.h} (86%) diff --git a/include/DetuningHelper.h b/include/PitchBendHelper.h similarity index 86% rename from include/DetuningHelper.h rename to include/PitchBendHelper.h index de0acc82603..1cef968ef57 100644 --- a/include/DetuningHelper.h +++ b/include/PitchBendHelper.h @@ -1,5 +1,5 @@ /* - * DetuningHelper.h - detuning automation helper + * PitchBendHelper.h - pitch bend automation helper * * Copyright (c) 2007 Javier Serrano Polo * Copyright (c) 2008-2010 Tobias Doerffel @@ -29,17 +29,17 @@ #include "InlineAutomation.h" #include "MemoryManager.h" -class DetuningHelper : public InlineAutomation +class PitchBendHelper : public InlineAutomation { Q_OBJECT MM_OPERATORS public: - DetuningHelper() : + PitchBendHelper() : InlineAutomation() { } - virtual ~DetuningHelper() + virtual ~PitchBendHelper() { } @@ -50,12 +50,12 @@ class DetuningHelper : public InlineAutomation virtual QString displayName() const { - return tr( "Note detuning" ); + return tr( "Note pitch bend" ); } inline virtual QString nodeName() const { - return "detuning"; + return "pitch bend"; } } ; diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 3bbcdebf7a0..3e964df5c77 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -49,7 +49,7 @@ #include "Clipboard.h" #include "ComboBox.h" #include "debug.h" -#include "DetuningHelper.h" +#include "PitchBendHelper.h" #include "embed.h" #include "GuiApplication.h" #include "gui_templates.h" @@ -876,7 +876,7 @@ void PianoRoll::drawNoteRect( QPainter & p, int x, int y, -void PianoRoll::drawDetuningInfo( QPainter & _p, const Note * _n, int _x, +void PianoRoll::drawPitchBendInfo( QPainter & _p, const Note * _n, int _x, int _y ) const { int middle_y = _y + KEY_LINE_HEIGHT / 2; @@ -885,7 +885,7 @@ void PianoRoll::drawDetuningInfo( QPainter & _p, const Note * _n, int _x, int old_x = 0; int old_y = 0; - timeMap & map = _n->detuning()->automationPattern()->getTimeMap(); + timeMap & map = _n->pitchBend()->automationPattern()->getTimeMap(); for( timeMap::ConstIterator it = map.begin(); it != map.end(); ++it ) { int pos_ticks = it.key(); @@ -901,7 +901,7 @@ void PianoRoll::drawDetuningInfo( QPainter & _p, const Note * _n, int _x, if( old_x != 0 && old_y != 0 ) { - switch( _n->detuning()->automationPattern()->progressionType() ) + switch( _n->pitchBend()->automationPattern()->progressionType() ) { case AutomationPattern::DiscreteProgression: _p.drawLine( old_x, old_y, pos_x, old_y ); @@ -1336,21 +1336,21 @@ void PianoRoll::mousePressEvent(QMouseEvent * me ) return; } - if( m_editMode == ModeEditDetuning && noteUnderMouse() ) + if( m_editMode == ModeEditPitchBend && noteUnderMouse() ) { - static AutomationPattern* detuningPattern = nullptr; - if (detuningPattern != nullptr) + static AutomationPattern* pitchBendPattern = nullptr; + if (pitchBendPattern != nullptr) { - detuningPattern->disconnect(this); + pitchBendPattern->disconnect(this); } Note* n = noteUnderMouse(); - if (n->detuning() == nullptr) + if (n->pitchBend() == nullptr) { - n->createDetuning(); + n->createPitchBend(); } - detuningPattern = n->detuning()->automationPattern(); - connect(detuningPattern, SIGNAL(dataChanged()), this, SLOT(update())); - gui->automationEditor()->open(detuningPattern); + pitchBendPattern = n->pitchBend()->automationPattern(); + connect(pitchBendPattern, SIGNAL(dataChanged()), this, SLOT(update())); + gui->automationEditor()->open(pitchBendPattern); return; } @@ -3048,9 +3048,9 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) editHandles << QPoint ( x + noteEditLeft(), editHandleTop ); - if( note->hasDetuningInfo() ) + if( note->hasPitchBendInfo() ) { - drawDetuningInfo( p, note, + drawPitchBendInfo( p, note, x + WHITE_KEY_WIDTH, y_base - key * KEY_LINE_HEIGHT ); } @@ -3137,7 +3137,7 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) break; case ModeErase: cursor = s_toolErase; break; case ModeSelect: cursor = s_toolSelect; break; - case ModeEditDetuning: cursor = s_toolOpen; break; + case ModeEditPitchBend: cursor = s_toolOpen; break; } if( cursor != NULL ) { @@ -4115,7 +4115,7 @@ PianoRollWindow::PianoRollWindow() : 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 " + "automation pitch bend. You can utilize this to slide " "notes from one to another. You can also press " "'Shift+T' on your keyboard to activate this mode." ) ); From 4b57db26ce8b3490ea665ed17eefedcc59b660c1 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Wed, 7 Mar 2018 16:03:10 -0600 Subject: [PATCH 05/38] Add final detune to pitchbend replacements * I would reccomend testing to make sure all of the features still work. Any detune mention not pertaining to the pitch bend funtion remained detune. --- include/Note.h | 16 +++++----- include/NotePlayHandle.h | 10 +++--- src/core/Note.cpp | 48 ++++++++++++++-------------- src/core/NotePlayHandle.cpp | 26 +++++++-------- src/gui/editors/AutomationEditor.cpp | 2 +- src/tracks/InstrumentTrack.cpp | 4 +-- 6 files changed, 53 insertions(+), 53 deletions(-) diff --git a/include/Note.h b/include/Note.h index c14f9d93109..62eff5a333a 100644 --- a/include/Note.h +++ b/include/Note.h @@ -33,7 +33,7 @@ #include "MidiTime.h" #include "SerializingObject.h" -class DetuningHelper; +class PitchBendHelper; enum Keys @@ -74,7 +74,7 @@ const int KeysPerOctave = WhiteKeysPerOctave + BlackKeysPerOctave; const int NumKeys = NumOctaves * KeysPerOctave; const int DefaultKey = DefaultOctave*KeysPerOctave + Key_A; -const float MaxDetuning = 4 * 12.0f; +const float MaxPitchBend = 4 * 12.0f; @@ -86,7 +86,7 @@ class EXPORT Note : public SerializingObject int key = DefaultKey, volume_t volume = DefaultVolume, panning_t panning = DefaultPanning, - DetuningHelper * detuning = NULL ); + PitchBendHelper * pitchBend = NULL ); Note( const Note & note ); virtual ~Note(); @@ -207,14 +207,14 @@ class EXPORT Note : public SerializingObject static MidiTime quantized( const MidiTime & m, const int qGrid ); - DetuningHelper * detuning() const + PitchBendHelper * pitchBend() const { - return m_detuning; + return m_pitchBend; } - bool hasDetuningInfo() const; + bool hasPitchBendInfo() const; bool withinRange(int tickStart, int tickEnd) const; - void createDetuning(); + void createPitchBend(); protected: @@ -235,7 +235,7 @@ class EXPORT Note : public SerializingObject panning_t m_panning; MidiTime m_length; MidiTime m_pos; - DetuningHelper * m_detuning; + PitchBendHelper * m_pitchBend; }; diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index 768a74aa276..2c418f59464 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -239,13 +239,13 @@ class EXPORT NotePlayHandle : public PlayHandle, public Note m_bbTrack = t; } - /*! Process note detuning automation */ + /*! Process note pitch bend automation */ void processMidiTime( const MidiTime& time ); /*! Updates total length (m_frames) depending on a new tempo */ void resize( const bpm_t newTempo ); - /*! Set song-global offset (relative to containing pattern) in order to properly perform the note detuning */ + /*! Set song-global offset (relative to containing pattern) in order to properly perform the note pitch bend */ void setSongGlobalParentOffset( const MidiTime& offset ) { m_songGlobalParentOffset = offset; @@ -263,11 +263,11 @@ class EXPORT NotePlayHandle : public PlayHandle, public Note } private: - class BaseDetuning + class BasePitchBend { MM_OPERATORS public: - BaseDetuning( DetuningHelper* detuning ); + BasePitchBend( PitchBendHelper* pitchBend ); void setValue( float val ) { @@ -317,7 +317,7 @@ class EXPORT NotePlayHandle : public PlayHandle, public Note float m_frequency; float m_unpitchedFrequency; - BaseDetuning* m_baseDetuning; + BasePitchBend* m_basePitchBend; MidiTime m_songGlobalParentOffset; int m_midiChannel; diff --git a/src/core/Note.cpp b/src/core/Note.cpp index 389526bb9e0..5dc20ebb181 100644 --- a/src/core/Note.cpp +++ b/src/core/Note.cpp @@ -2,7 +2,7 @@ * Note.cpp - implementation of class note * * Copyright (c) 2004-2014 Tobias Doerffel - * + * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or @@ -28,12 +28,12 @@ #include #include "Note.h" -#include "DetuningHelper.h" +#include "PitchBendHelper.h" Note::Note( const MidiTime & length, const MidiTime & pos, int key, volume_t volume, panning_t panning, - DetuningHelper * detuning ) : + PitchBendHelper * pitchBend ) : m_selected( false ), m_oldKey( qBound( 0, key, NumKeys ) ), m_oldPos( pos ), @@ -44,15 +44,15 @@ Note::Note( const MidiTime & length, const MidiTime & pos, m_panning( qBound( PanningLeft, panning, PanningRight ) ), m_length( length ), m_pos( pos ), - m_detuning( NULL ) + m_pitchBend( NULL ) { - if( detuning ) + if( pitchBend ) { - m_detuning = sharedObject::ref( detuning ); + m_pitchBend = sharedObject::ref( pitchBend ); } else { - createDetuning(); + createPitchBend(); } } @@ -71,11 +71,11 @@ Note::Note( const Note & note ) : m_panning( note.m_panning ), m_length( note.m_length ), m_pos( note.m_pos ), - m_detuning( NULL ) + m_pitchBend( NULL ) { - if( note.m_detuning ) + if( note.m_pitchBend ) { - m_detuning = sharedObject::ref( note.m_detuning ); + m_pitchBend = sharedObject::ref( note.m_pitchBend ); } } @@ -84,9 +84,9 @@ Note::Note( const Note & note ) : Note::~Note() { - if( m_detuning ) + if( m_pitchBend ) { - sharedObject::unref( m_detuning ); + sharedObject::unref( m_pitchBend ); } } @@ -177,9 +177,9 @@ void Note::saveSettings( QDomDocument & doc, QDomElement & parent ) parent.setAttribute( "len", m_length ); parent.setAttribute( "pos", m_pos ); - if( m_detuning && m_length ) + if( m_pitchBend && m_length ) { - m_detuning->saveSettings( doc, parent ); + m_pitchBend->saveSettings( doc, parent ); } } @@ -197,8 +197,8 @@ void Note::loadSettings( const QDomElement & _this ) if( _this.hasChildNodes() ) { - createDetuning(); - m_detuning->loadSettings( _this ); + createPitchBend(); + m_pitchBend->loadSettings( _this ); } } @@ -206,23 +206,23 @@ void Note::loadSettings( const QDomElement & _this ) -void Note::createDetuning() +void Note::createPitchBend() { - if( m_detuning == NULL ) + if( m_pitchBend == NULL ) { - m_detuning = new DetuningHelper; - (void) m_detuning->automationPattern(); - m_detuning->setRange( -MaxDetuning, MaxDetuning, 0.5f ); - m_detuning->automationPattern()->setProgressionType( AutomationPattern::LinearProgression ); + m_pitchBend = new PitchBendHelper; + (void) m_pitchBend->automationPattern(); + m_pitchBend->setRange( -MaxPitchBend, MaxPitchBend, 0.5f ); + m_pitchBend->automationPattern()->setProgressionType( AutomationPattern::LinearProgression ); } } -bool Note::hasDetuningInfo() const +bool Note::hasPitchBendInfo() const { - return m_detuning && m_detuning->hasAutomation(); + return m_pitchBend && m_pitchBend->hasAutomation(); } diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index 11f71d8f19b..5debc1c64d5 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -25,7 +25,7 @@ #include "NotePlayHandle.h" #include "BasicFilters.h" -#include "DetuningHelper.h" +#include "PitchBendHelper.h" #include "InstrumentSoundShaping.h" #include "InstrumentTrack.h" #include "Instrument.h" @@ -33,8 +33,8 @@ #include "Song.h" -NotePlayHandle::BaseDetuning::BaseDetuning( DetuningHelper *detuning ) : - m_value( detuning ? detuning->automationPattern()->valueAt( 0 ) : 0 ) +NotePlayHandle::BasePitchBend::BasePitchBend( PitchBendHelper *pitchBend ) : + m_value( pitchBend ? pitchBend->automationPattern()->valueAt( 0 ) : 0 ) { } @@ -51,7 +51,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack, int midiEventChannel, Origin origin ) : PlayHandle( TypeNotePlayHandle, _offset ), - Note( n.length(), n.pos(), n.key(), n.getVolume(), n.getPanning(), n.detuning() ), + Note( n.length(), n.pos(), n.key(), n.getVolume(), n.getPanning(), n.pitchBend() ), m_pluginData( NULL ), m_filter( NULL ), m_instrumentTrack( instrumentTrack ), @@ -72,7 +72,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack, m_origBaseNote( instrumentTrack->baseNote() ), m_frequency( 0 ), m_unpitchedFrequency( 0 ), - m_baseDetuning( NULL ), + m_basePitchBend( NULL ), m_songGlobalParentOffset( 0 ), m_midiChannel( midiEventChannel >= 0 ? midiEventChannel : instrumentTrack->midiPort()->realOutputChannel() ), m_origin( origin ), @@ -81,12 +81,12 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack, lock(); if( hasParent() == false ) { - m_baseDetuning = new BaseDetuning( detuning() ); + m_basePitchBend = new BasePitchBend( pitchBend() ); m_instrumentTrack->m_processHandles.push_back( this ); } else { - m_baseDetuning = parent->m_baseDetuning; + m_basePitchBend = parent->m_basePitchBend; parent->m_subNotes.push_back( this ); parent->m_hadChildren = true; @@ -135,7 +135,7 @@ NotePlayHandle::~NotePlayHandle() if( hasParent() == false ) { - delete m_baseDetuning; + delete m_basePitchBend; m_instrumentTrack->m_processHandles.removeAll( this ); } else @@ -508,7 +508,7 @@ void NotePlayHandle::updateFrequency() ( key() - m_instrumentTrack->baseNoteModel()->value() + mp + - m_baseDetuning->value() ) + m_basePitchBend->value() ) / 12.0f; m_frequency = BaseFreq * powf( 2.0f, pitch + m_instrumentTrack->pitchModel()->value() / ( 100 * 12.0f ) ); m_unpitchedFrequency = BaseFreq * powf( 2.0f, pitch ); @@ -524,12 +524,12 @@ void NotePlayHandle::updateFrequency() void NotePlayHandle::processMidiTime( const MidiTime& time ) { - if( detuning() && time >= songGlobalParentOffset()+pos() ) + if( pitchBend() && time >= songGlobalParentOffset()+pos() ) { - const float v = detuning()->automationPattern()->valueAt( time - songGlobalParentOffset() - pos() ); - if( !typeInfo::isEqual( v, m_baseDetuning->value() ) ) + const float v = pitchBend()->automationPattern()->valueAt( time - songGlobalParentOffset() - pos() ); + if( !typeInfo::isEqual( v, m_basePitchBend->value() ) ) { - m_baseDetuning->setValue( v ); + m_basePitchBend->setValue( v ); updateFrequency(); } } diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index 3d4407e5148..fcf74f79c79 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -341,7 +341,7 @@ void AutomationEditor::update() QWidget::update(); QMutexLocker m( &m_patternMutex ); - // Note detuning? + // Note pitch bend? if( m_pattern && !m_pattern->getTrack() ) { gui->pianoRoll()->update(); diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 90dbf11a684..91e566c6ae8 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -628,7 +628,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, _frames / frames_per_tick ) ); } - // Handle automation: detuning + // Handle automation: pitch bend for( NotePlayHandleList::Iterator it = m_processHandles.begin(); it != m_processHandles.end(); ++it ) { @@ -688,7 +688,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, if( _tco_num < 0 ) { // then set song-global offset of pattern in order to - // properly perform the note detuning + // properly perform the note pitch bend notePlayHandle->setSongGlobalParentOffset( p->startPosition() ); } From 76f182b055ae32de9e23ca2dd169126c4a6ddf97 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 14:02:06 -0600 Subject: [PATCH 06/38] Replace DETUNING with PITCHBEND --- include/PitchBendHelper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/PitchBendHelper.h b/include/PitchBendHelper.h index 1cef968ef57..dfd41caa980 100644 --- a/include/PitchBendHelper.h +++ b/include/PitchBendHelper.h @@ -23,8 +23,8 @@ * */ -#ifndef DETUNING_HELPER_H -#define DETUNING_HELPER_H +#ifndef PITCHBEND_HELPER_H +#define PITCHBEND_HELPER_H #include "InlineAutomation.h" #include "MemoryManager.h" From 9dfea355a6b0243f79dbef17fdc766efefcda57a Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 17:32:58 -0600 Subject: [PATCH 07/38] Fix InstrumentFunctions.cpp fix references to detuning to pitchBend --- src/core/InstrumentFunctions.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index 2860045b8df..45bdc20dc7d 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -45,7 +45,7 @@ InstrumentFunctionNoteStacking::ChordTable::Init InstrumentFunctionNoteStacking: { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "aug" ), { 0, 4, 8, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "augsus4" ), { 0, 5, 8, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "tri" ), { 0, 3, 6, 9, -1 } }, - + { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "6" ), { 0, 4, 7, 9, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "6sus4" ), { 0, 5, 7, 9, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "6add9" ), { 0, 4, 7, 9, 14, -1 } }, @@ -133,7 +133,7 @@ InstrumentFunctionNoteStacking::ChordTable::Init InstrumentFunctionNoteStacking: { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Minor" ), { 0, 2, 3, 5, 7, 8, 10, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Chromatic" ), { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Half-Whole Diminished" ), { 0, 1, 3, 4, 6, 7, 9, 10, -1 } }, - + { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "5" ), { 0, 7, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Phrygian dominant" ), { 0, 1, 4, 5, 7, 8, 10, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Persian" ), { 0, 1, 4, 5, 6, 8, 11, -1 } } @@ -258,11 +258,11 @@ void InstrumentFunctionNoteStacking::processNote( NotePlayHandle * _n ) break; } // create copy of base-note - Note note_copy( _n->length(), 0, sub_note_key, _n->getVolume(), _n->getPanning(), _n->detuning() ); + Note note_copy( _n->length(), 0, sub_note_key, _n->getVolume(), _n->getPanning(), _n->pitchBend() ); // create sub-note-play-handle, only note is // different - Engine::mixer()->addPlayHandle( + Engine::mixer()->addPlayHandle( NotePlayHandleManager::acquire( _n->instrumentTrack(), _n->offset(), _n->frames(), note_copy, _n, -1, NotePlayHandle::OriginNoteStacking ) ); @@ -516,7 +516,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) frames_processed, gated_frames, Note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, (volume_t) qRound( _n->getVolume() * vol_level ), - _n->getPanning(), _n->detuning() ), + _n->getPanning(), _n->pitchBend() ), _n, -1, NotePlayHandle::OriginArpeggio ) ); @@ -569,13 +569,10 @@ void InstrumentFunctionArpeggio::loadSettings( const QDomElement & _this ) // Keep compatibility with version 0.2.1 file format if( _this.hasAttribute( "arpsyncmode" ) ) { - m_arpTimeKnob->setSyncMode( + m_arpTimeKnob->setSyncMode( ( tempoSyncKnob::tempoSyncMode ) _this.attribute( "arpsyncmode" ).toInt() ); }*/ m_arpModeModel.loadSettings( _this, "arpmode" ); } - - - From 748c69a285c1d0d2bf1af32696b055c2e749ddfc Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 17:44:44 -0600 Subject: [PATCH 08/38] Fix DetuningReferences (again) I'm at the point where I am hoping that AI will be able to carry out this repetitively tedious task of refactoring. It's simple enough for reptitiveness, but just a tad bit complex to require a human(for now) --- include/PianoRoll.h | 2 +- tests/src/tracks/AutomationTrackTest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 9167804ae43..31fd0927aa8 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -74,7 +74,7 @@ class PianoRoll : public QWidget ModeDraw, ModeErase, ModeSelect, - ModeEditDetuning, + ModeEditPitchBend, }; /*! \brief Resets settings to default when e.g. creating a new project */ diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index bd5257253fd..91726ef14b1 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -30,7 +30,7 @@ #include "AutomationTrack.h" #include "BBTrack.h" #include "BBTrackContainer.h" -#include "DetuningHelper.h" +#include "PitchBendHelper.h" #include "InstrumentTrack.h" #include "Pattern.h" #include "TrackContainer.h" From 34fd80689ca37e00f4d1b01edc9257c83cce9c0f Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 18:01:17 -0600 Subject: [PATCH 09/38] Another fix I feel like a while true do loop --- include/PianoRoll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 31fd0927aa8..79b51f6eb1d 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -365,7 +365,7 @@ protected slots: void copyToClipboard(const NoteVector & notes ) const; - void drawDetuningInfo( QPainter & _p, const Note * _n, int _x, int _y ) const; + void drawPitchBendInfo( QPainter & _p, const Note * _n, int _x, int _y ) const; bool mouseOverNote(); Note * noteUnderMouse(); From 59b39985a85710d224e32b876f89da8de84b70c7 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 18:15:48 -0600 Subject: [PATCH 10/38] Audio File Processor reference fix --- .../audio_file_processor/audio_file_processor.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 2fdb8e459b8..4f128a28c01 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -97,13 +97,13 @@ audioFileProcessor::audioFileProcessor( InstrumentTrack * _instrument_track ) : this, SLOT( loopPointChanged() ) ); connect( &m_stutterModel, SIGNAL( dataChanged() ), this, SLOT( stutterModelChanged() ) ); - + //interpolation modes m_interpolationModel.addItem( tr( "None" ) ); m_interpolationModel.addItem( tr( "Linear" ) ); m_interpolationModel.addItem( tr( "Sinc" ) ); m_interpolationModel.setValue( 1 ); - + pointChanged(); } @@ -156,7 +156,7 @@ void audioFileProcessor::playNote( NotePlayHandle * _n, srcmode = SRC_SINC_MEDIUM_QUALITY; break; } - _n->m_pluginData = new handleState( _n->hasDetuningInfo(), srcmode ); + _n->m_pluginData = new handleState( _n->hasPitchBendInfo(), srcmode ); ((handleState *)_n->m_pluginData)->setFrameIndex( m_nextPlayStartPoint ); ((handleState *)_n->m_pluginData)->setBackwards( m_nextPlayBackwards ); @@ -364,7 +364,7 @@ void audioFileProcessor::stutterModelChanged() } -void audioFileProcessor::startPointChanged( void ) +void audioFileProcessor::startPointChanged( void ) { // check if start is over end and swap values if so if( m_startPointModel.value() > m_endPointModel.value() ) @@ -391,7 +391,7 @@ void audioFileProcessor::startPointChanged( void ) { m_endPointModel.setValue( qMin( m_endPointModel.value() + 0.001f, 1.0f ) ); } - + pointChanged(); } @@ -1327,7 +1327,3 @@ Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data ) } - - - - From 732f801bf2c368ae109133761f3650482d0f050f Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 18:28:09 -0600 Subject: [PATCH 11/38] Thank you programming gods Thank you for my dilligence of making this piece of softare better. Thank you for giving the strength on not leaving this branch behind to rot for 10 years and leave LMMS with the Pitch Bench feature instead of the Detune feature. Thank you for giving the strength to go on and get into the Bassline. Thank you for the fact that this is not a corporate setting where every commit has to be 100% serious. Thank you for --- include/PianoRoll.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 79b51f6eb1d..69dbabe3138 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -457,3 +457,17 @@ private slots: #endif + +/* Children, be grateful for all the devs that make your program. A nice guy named +Jehbar Niño Dolbas Ibarra (Anonymouqs on GitHub) renamed Detune to Pitch Bend so you have a more intuitive +gui. It wasn't easy, because it wasn't only the gui text that had to be fixed, but +entire filenames and every reference to the "detune feature", on top of that +another feature was named "detune" for the vst plugins which had to be left untouched, +so it was a bit *cough* a lot *cough* more tedious than doing a mass search and replace. +He also had to repetitively watch his Travis builds fail and wait 3 minutes at a time +to find the next error that had to be solved. +So after his dilligence, you now have a better piece of software via Pull Request #4194 + +P.S. Do not become a JavaScript programmer, you will loose your soul to the framework wars. +Of course, the future is always hopeful. +*/ From ae78a7bac4be1f2834dc3d73d61e7b5928665870 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 18:33:44 -0600 Subject: [PATCH 12/38] Fix Patman Reference glitch --- plugins/patman/patman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index 60cd6210cd4..6c7e486472a 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -420,7 +420,7 @@ void patmanInstrument::selectSample( NotePlayHandle * _n ) { hdata->sample = new SampleBuffer( NULL, 0 ); } - hdata->state = new SampleBuffer::handleState( _n->hasDetuningInfo() ); + hdata->state = new SampleBuffer::handleState( _n->hasPitchBendInfo() ); _n->m_pluginData = hdata; } From 953d4ad5dce37c20288680224b5e512c3149cab8 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 18:56:57 -0600 Subject: [PATCH 13/38] More references --- tests/src/tracks/AutomationTrackTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 91726ef14b1..7c793488d09 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -143,9 +143,9 @@ private slots: Pattern* notePattern = dynamic_cast(instrumentTrack->createTCO(0)); notePattern->changeLength(MidiTime(4, 0)); Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); - note->createDetuning(); + note->createPitchBend(); - DetuningHelper* dh = note->detuning(); + DetuningHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From c463660787918069c63eefde7e49f84a277df9cf Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 19:08:19 -0600 Subject: [PATCH 14/38] Fix automation track test --- tests/src/tracks/AutomationTrackTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 7c793488d09..35e8a90ed4d 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -145,7 +145,7 @@ private slots: Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createPitchBend(); - DetuningHelper* dh = note->pitchBend(); + PitchBendHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From 5c98f7923612aa771dfddcb08bd51156b1facb20 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 19:17:30 -0600 Subject: [PATCH 15/38] Revert "Thank you programming gods" This reverts commit 732f801bf2c368ae109133761f3650482d0f050f. --- include/PianoRoll.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 69dbabe3138..79b51f6eb1d 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -457,17 +457,3 @@ private slots: #endif - -/* Children, be grateful for all the devs that make your program. A nice guy named -Jehbar Niño Dolbas Ibarra (Anonymouqs on GitHub) renamed Detune to Pitch Bend so you have a more intuitive -gui. It wasn't easy, because it wasn't only the gui text that had to be fixed, but -entire filenames and every reference to the "detune feature", on top of that -another feature was named "detune" for the vst plugins which had to be left untouched, -so it was a bit *cough* a lot *cough* more tedious than doing a mass search and replace. -He also had to repetitively watch his Travis builds fail and wait 3 minutes at a time -to find the next error that had to be solved. -So after his dilligence, you now have a better piece of software via Pull Request #4194 - -P.S. Do not become a JavaScript programmer, you will loose your soul to the framework wars. -Of course, the future is always hopeful. -*/ From f49849b03e389ccf2f49e0da8a707dd2b9e79fee Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 19:18:23 -0600 Subject: [PATCH 16/38] Fix Automation Track Test --- src/core/AutomationPattern.cpp | 5 ----- tests/src/tracks/AutomationTrackTest.cpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index c307236d54e..1788f2c3273 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -892,8 +892,3 @@ void AutomationPattern::generateTangents( timeMap::const_iterator it, it++; } } - - - - - diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 35e8a90ed4d..7c793488d09 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -145,7 +145,7 @@ private slots: Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createPitchBend(); - PitchBendHelper* dh = note->pitchBend(); + DetuningHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From ef708098fc7a40c551118cc3f9ff9287e74ab715 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Thu, 8 Mar 2018 19:18:45 -0600 Subject: [PATCH 17/38] Final Fix --- tests/src/tracks/AutomationTrackTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 7c793488d09..35e8a90ed4d 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -145,7 +145,7 @@ private slots: Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createPitchBend(); - DetuningHelper* dh = note->pitchBend(); + PitchBendHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From 733853e84944c37f700ea40f27f60771d30221e5 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:12:11 -0500 Subject: [PATCH 18/38] Revert "Decapitalize m in Pitch Bend Mode" This reverts commit 1f8a502d0da1e77057c50f15695651fa4cfaac12. --- src/gui/editors/PianoRoll.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 3e964df5c77..7acf102acc3 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -4077,7 +4077,7 @@ 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* pitchBendAction = editModeGroup->addAction( embed::getIconPixmap( "automation" ), tr("Pitch Bend mode (Shift+T)" ) ); + QAction* pitchBendAction = editModeGroup->addAction( embed::getIconPixmap( "automation" ), tr("Pitch Bend Mode (Shift+T)" ) ); drawAction->setChecked( true ); @@ -4113,7 +4113,7 @@ PianoRollWindow::PianoRollWindow() : "Ctrl" ) ); #endif pitchBendAction->setWhatsThis( - tr( "Click here and Pitch Bend mode will be activated. " + tr( "Click here and Pitch Bend Mode will be activated. " "In this mode you can click a note to open its " "automation pitch bend. You can utilize this to slide " "notes from one to another. You can also press " From 2c8586d2598d68181e5991acdba9b79e74af5e0a Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:25:39 -0500 Subject: [PATCH 19/38] Revert "Change internal references of detune to Pitch Bend in Piano Roll and DetuningHelper" This reverts commit 238c824e12b7386076382a2b42654b750607e9d3. --- .../{PitchBendHelper.h => DetuningHelper.h} | 12 +++---- src/gui/editors/PianoRoll.cpp | 34 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) rename include/{PitchBendHelper.h => DetuningHelper.h} (86%) diff --git a/include/PitchBendHelper.h b/include/DetuningHelper.h similarity index 86% rename from include/PitchBendHelper.h rename to include/DetuningHelper.h index dfd41caa980..4c4f6c67212 100644 --- a/include/PitchBendHelper.h +++ b/include/DetuningHelper.h @@ -1,5 +1,5 @@ /* - * PitchBendHelper.h - pitch bend automation helper + * DetuningHelper.h - detuning automation helper * * Copyright (c) 2007 Javier Serrano Polo * Copyright (c) 2008-2010 Tobias Doerffel @@ -29,17 +29,17 @@ #include "InlineAutomation.h" #include "MemoryManager.h" -class PitchBendHelper : public InlineAutomation +class DetuningHelper : public InlineAutomation { Q_OBJECT MM_OPERATORS public: - PitchBendHelper() : + DetuningHelper() : InlineAutomation() { } - virtual ~PitchBendHelper() + virtual ~DetuningHelper() { } @@ -50,12 +50,12 @@ class PitchBendHelper : public InlineAutomation virtual QString displayName() const { - return tr( "Note pitch bend" ); + return tr( "Note detuning" ); } inline virtual QString nodeName() const { - return "pitch bend"; + return "detuning"; } } ; diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 7acf102acc3..8c452f5af22 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -49,7 +49,7 @@ #include "Clipboard.h" #include "ComboBox.h" #include "debug.h" -#include "PitchBendHelper.h" +#include "DetuningHelper.h" #include "embed.h" #include "GuiApplication.h" #include "gui_templates.h" @@ -876,7 +876,7 @@ void PianoRoll::drawNoteRect( QPainter & p, int x, int y, -void PianoRoll::drawPitchBendInfo( QPainter & _p, const Note * _n, int _x, +void PianoRoll::drawDetuningInfo( QPainter & _p, const Note * _n, int _x, int _y ) const { int middle_y = _y + KEY_LINE_HEIGHT / 2; @@ -885,7 +885,7 @@ void PianoRoll::drawPitchBendInfo( QPainter & _p, const Note * _n, int _x, int old_x = 0; int old_y = 0; - timeMap & map = _n->pitchBend()->automationPattern()->getTimeMap(); + timeMap & map = _n->detuning()->automationPattern()->getTimeMap(); for( timeMap::ConstIterator it = map.begin(); it != map.end(); ++it ) { int pos_ticks = it.key(); @@ -901,7 +901,7 @@ void PianoRoll::drawPitchBendInfo( QPainter & _p, const Note * _n, int _x, if( old_x != 0 && old_y != 0 ) { - switch( _n->pitchBend()->automationPattern()->progressionType() ) + switch( _n->detuning()->automationPattern()->progressionType() ) { case AutomationPattern::DiscreteProgression: _p.drawLine( old_x, old_y, pos_x, old_y ); @@ -1336,21 +1336,21 @@ void PianoRoll::mousePressEvent(QMouseEvent * me ) return; } - if( m_editMode == ModeEditPitchBend && noteUnderMouse() ) + if( m_editMode == ModeEditDetuning && noteUnderMouse() ) { - static AutomationPattern* pitchBendPattern = nullptr; - if (pitchBendPattern != nullptr) + static AutomationPattern* detuningPattern = nullptr; + if (detuningPattern != nullptr) { - pitchBendPattern->disconnect(this); + detuningPattern->disconnect(this); } Note* n = noteUnderMouse(); - if (n->pitchBend() == nullptr) + if (n->detuning() == nullptr) { - n->createPitchBend(); + n->createDetuning(); } - pitchBendPattern = n->pitchBend()->automationPattern(); - connect(pitchBendPattern, SIGNAL(dataChanged()), this, SLOT(update())); - gui->automationEditor()->open(pitchBendPattern); + detuningPattern = n->detuning()->automationPattern(); + connect(detuningPattern, SIGNAL(dataChanged()), this, SLOT(update())); + gui->automationEditor()->open(detuningPattern); return; } @@ -3048,9 +3048,9 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) editHandles << QPoint ( x + noteEditLeft(), editHandleTop ); - if( note->hasPitchBendInfo() ) + if( note->hasDetuningInfo() ) { - drawPitchBendInfo( p, note, + drawDetuningInfo( p, note, x + WHITE_KEY_WIDTH, y_base - key * KEY_LINE_HEIGHT ); } @@ -3137,7 +3137,7 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) break; case ModeErase: cursor = s_toolErase; break; case ModeSelect: cursor = s_toolSelect; break; - case ModeEditPitchBend: cursor = s_toolOpen; break; + case ModeEditDetuning: cursor = s_toolOpen; break; } if( cursor != NULL ) { @@ -4115,7 +4115,7 @@ PianoRollWindow::PianoRollWindow() : pitchBendAction->setWhatsThis( tr( "Click here and Pitch Bend Mode will be activated. " "In this mode you can click a note to open its " - "automation pitch bend. You can utilize this to slide " + "automation detuning. You can utilize this to slide " "notes from one to another. You can also press " "'Shift+T' on your keyboard to activate this mode." ) ); From 6ea5bd59d12bb6536c97f2f568cf07c87c72e70b Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:25:55 -0500 Subject: [PATCH 20/38] Revert "Add final detune to pitchbend replacements" This reverts commit 4b57db26ce8b3490ea665ed17eefedcc59b660c1. --- include/Note.h | 16 +++++----- include/NotePlayHandle.h | 10 +++--- src/core/Note.cpp | 48 ++++++++++++++-------------- src/core/NotePlayHandle.cpp | 26 +++++++-------- src/gui/editors/AutomationEditor.cpp | 2 +- src/tracks/InstrumentTrack.cpp | 4 +-- 6 files changed, 53 insertions(+), 53 deletions(-) diff --git a/include/Note.h b/include/Note.h index 62eff5a333a..c14f9d93109 100644 --- a/include/Note.h +++ b/include/Note.h @@ -33,7 +33,7 @@ #include "MidiTime.h" #include "SerializingObject.h" -class PitchBendHelper; +class DetuningHelper; enum Keys @@ -74,7 +74,7 @@ const int KeysPerOctave = WhiteKeysPerOctave + BlackKeysPerOctave; const int NumKeys = NumOctaves * KeysPerOctave; const int DefaultKey = DefaultOctave*KeysPerOctave + Key_A; -const float MaxPitchBend = 4 * 12.0f; +const float MaxDetuning = 4 * 12.0f; @@ -86,7 +86,7 @@ class EXPORT Note : public SerializingObject int key = DefaultKey, volume_t volume = DefaultVolume, panning_t panning = DefaultPanning, - PitchBendHelper * pitchBend = NULL ); + DetuningHelper * detuning = NULL ); Note( const Note & note ); virtual ~Note(); @@ -207,14 +207,14 @@ class EXPORT Note : public SerializingObject static MidiTime quantized( const MidiTime & m, const int qGrid ); - PitchBendHelper * pitchBend() const + DetuningHelper * detuning() const { - return m_pitchBend; + return m_detuning; } - bool hasPitchBendInfo() const; + bool hasDetuningInfo() const; bool withinRange(int tickStart, int tickEnd) const; - void createPitchBend(); + void createDetuning(); protected: @@ -235,7 +235,7 @@ class EXPORT Note : public SerializingObject panning_t m_panning; MidiTime m_length; MidiTime m_pos; - PitchBendHelper * m_pitchBend; + DetuningHelper * m_detuning; }; diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index 2c418f59464..768a74aa276 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -239,13 +239,13 @@ class EXPORT NotePlayHandle : public PlayHandle, public Note m_bbTrack = t; } - /*! Process note pitch bend automation */ + /*! Process note detuning automation */ void processMidiTime( const MidiTime& time ); /*! Updates total length (m_frames) depending on a new tempo */ void resize( const bpm_t newTempo ); - /*! Set song-global offset (relative to containing pattern) in order to properly perform the note pitch bend */ + /*! Set song-global offset (relative to containing pattern) in order to properly perform the note detuning */ void setSongGlobalParentOffset( const MidiTime& offset ) { m_songGlobalParentOffset = offset; @@ -263,11 +263,11 @@ class EXPORT NotePlayHandle : public PlayHandle, public Note } private: - class BasePitchBend + class BaseDetuning { MM_OPERATORS public: - BasePitchBend( PitchBendHelper* pitchBend ); + BaseDetuning( DetuningHelper* detuning ); void setValue( float val ) { @@ -317,7 +317,7 @@ class EXPORT NotePlayHandle : public PlayHandle, public Note float m_frequency; float m_unpitchedFrequency; - BasePitchBend* m_basePitchBend; + BaseDetuning* m_baseDetuning; MidiTime m_songGlobalParentOffset; int m_midiChannel; diff --git a/src/core/Note.cpp b/src/core/Note.cpp index 5dc20ebb181..389526bb9e0 100644 --- a/src/core/Note.cpp +++ b/src/core/Note.cpp @@ -2,7 +2,7 @@ * Note.cpp - implementation of class note * * Copyright (c) 2004-2014 Tobias Doerffel - * + * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or @@ -28,12 +28,12 @@ #include #include "Note.h" -#include "PitchBendHelper.h" +#include "DetuningHelper.h" Note::Note( const MidiTime & length, const MidiTime & pos, int key, volume_t volume, panning_t panning, - PitchBendHelper * pitchBend ) : + DetuningHelper * detuning ) : m_selected( false ), m_oldKey( qBound( 0, key, NumKeys ) ), m_oldPos( pos ), @@ -44,15 +44,15 @@ Note::Note( const MidiTime & length, const MidiTime & pos, m_panning( qBound( PanningLeft, panning, PanningRight ) ), m_length( length ), m_pos( pos ), - m_pitchBend( NULL ) + m_detuning( NULL ) { - if( pitchBend ) + if( detuning ) { - m_pitchBend = sharedObject::ref( pitchBend ); + m_detuning = sharedObject::ref( detuning ); } else { - createPitchBend(); + createDetuning(); } } @@ -71,11 +71,11 @@ Note::Note( const Note & note ) : m_panning( note.m_panning ), m_length( note.m_length ), m_pos( note.m_pos ), - m_pitchBend( NULL ) + m_detuning( NULL ) { - if( note.m_pitchBend ) + if( note.m_detuning ) { - m_pitchBend = sharedObject::ref( note.m_pitchBend ); + m_detuning = sharedObject::ref( note.m_detuning ); } } @@ -84,9 +84,9 @@ Note::Note( const Note & note ) : Note::~Note() { - if( m_pitchBend ) + if( m_detuning ) { - sharedObject::unref( m_pitchBend ); + sharedObject::unref( m_detuning ); } } @@ -177,9 +177,9 @@ void Note::saveSettings( QDomDocument & doc, QDomElement & parent ) parent.setAttribute( "len", m_length ); parent.setAttribute( "pos", m_pos ); - if( m_pitchBend && m_length ) + if( m_detuning && m_length ) { - m_pitchBend->saveSettings( doc, parent ); + m_detuning->saveSettings( doc, parent ); } } @@ -197,8 +197,8 @@ void Note::loadSettings( const QDomElement & _this ) if( _this.hasChildNodes() ) { - createPitchBend(); - m_pitchBend->loadSettings( _this ); + createDetuning(); + m_detuning->loadSettings( _this ); } } @@ -206,23 +206,23 @@ void Note::loadSettings( const QDomElement & _this ) -void Note::createPitchBend() +void Note::createDetuning() { - if( m_pitchBend == NULL ) + if( m_detuning == NULL ) { - m_pitchBend = new PitchBendHelper; - (void) m_pitchBend->automationPattern(); - m_pitchBend->setRange( -MaxPitchBend, MaxPitchBend, 0.5f ); - m_pitchBend->automationPattern()->setProgressionType( AutomationPattern::LinearProgression ); + m_detuning = new DetuningHelper; + (void) m_detuning->automationPattern(); + m_detuning->setRange( -MaxDetuning, MaxDetuning, 0.5f ); + m_detuning->automationPattern()->setProgressionType( AutomationPattern::LinearProgression ); } } -bool Note::hasPitchBendInfo() const +bool Note::hasDetuningInfo() const { - return m_pitchBend && m_pitchBend->hasAutomation(); + return m_detuning && m_detuning->hasAutomation(); } diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index 5debc1c64d5..11f71d8f19b 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -25,7 +25,7 @@ #include "NotePlayHandle.h" #include "BasicFilters.h" -#include "PitchBendHelper.h" +#include "DetuningHelper.h" #include "InstrumentSoundShaping.h" #include "InstrumentTrack.h" #include "Instrument.h" @@ -33,8 +33,8 @@ #include "Song.h" -NotePlayHandle::BasePitchBend::BasePitchBend( PitchBendHelper *pitchBend ) : - m_value( pitchBend ? pitchBend->automationPattern()->valueAt( 0 ) : 0 ) +NotePlayHandle::BaseDetuning::BaseDetuning( DetuningHelper *detuning ) : + m_value( detuning ? detuning->automationPattern()->valueAt( 0 ) : 0 ) { } @@ -51,7 +51,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack, int midiEventChannel, Origin origin ) : PlayHandle( TypeNotePlayHandle, _offset ), - Note( n.length(), n.pos(), n.key(), n.getVolume(), n.getPanning(), n.pitchBend() ), + Note( n.length(), n.pos(), n.key(), n.getVolume(), n.getPanning(), n.detuning() ), m_pluginData( NULL ), m_filter( NULL ), m_instrumentTrack( instrumentTrack ), @@ -72,7 +72,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack, m_origBaseNote( instrumentTrack->baseNote() ), m_frequency( 0 ), m_unpitchedFrequency( 0 ), - m_basePitchBend( NULL ), + m_baseDetuning( NULL ), m_songGlobalParentOffset( 0 ), m_midiChannel( midiEventChannel >= 0 ? midiEventChannel : instrumentTrack->midiPort()->realOutputChannel() ), m_origin( origin ), @@ -81,12 +81,12 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack, lock(); if( hasParent() == false ) { - m_basePitchBend = new BasePitchBend( pitchBend() ); + m_baseDetuning = new BaseDetuning( detuning() ); m_instrumentTrack->m_processHandles.push_back( this ); } else { - m_basePitchBend = parent->m_basePitchBend; + m_baseDetuning = parent->m_baseDetuning; parent->m_subNotes.push_back( this ); parent->m_hadChildren = true; @@ -135,7 +135,7 @@ NotePlayHandle::~NotePlayHandle() if( hasParent() == false ) { - delete m_basePitchBend; + delete m_baseDetuning; m_instrumentTrack->m_processHandles.removeAll( this ); } else @@ -508,7 +508,7 @@ void NotePlayHandle::updateFrequency() ( key() - m_instrumentTrack->baseNoteModel()->value() + mp + - m_basePitchBend->value() ) + m_baseDetuning->value() ) / 12.0f; m_frequency = BaseFreq * powf( 2.0f, pitch + m_instrumentTrack->pitchModel()->value() / ( 100 * 12.0f ) ); m_unpitchedFrequency = BaseFreq * powf( 2.0f, pitch ); @@ -524,12 +524,12 @@ void NotePlayHandle::updateFrequency() void NotePlayHandle::processMidiTime( const MidiTime& time ) { - if( pitchBend() && time >= songGlobalParentOffset()+pos() ) + if( detuning() && time >= songGlobalParentOffset()+pos() ) { - const float v = pitchBend()->automationPattern()->valueAt( time - songGlobalParentOffset() - pos() ); - if( !typeInfo::isEqual( v, m_basePitchBend->value() ) ) + const float v = detuning()->automationPattern()->valueAt( time - songGlobalParentOffset() - pos() ); + if( !typeInfo::isEqual( v, m_baseDetuning->value() ) ) { - m_basePitchBend->setValue( v ); + m_baseDetuning->setValue( v ); updateFrequency(); } } diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index fcf74f79c79..3d4407e5148 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -341,7 +341,7 @@ void AutomationEditor::update() QWidget::update(); QMutexLocker m( &m_patternMutex ); - // Note pitch bend? + // Note detuning? if( m_pattern && !m_pattern->getTrack() ) { gui->pianoRoll()->update(); diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 91e566c6ae8..90dbf11a684 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -628,7 +628,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, _frames / frames_per_tick ) ); } - // Handle automation: pitch bend + // Handle automation: detuning for( NotePlayHandleList::Iterator it = m_processHandles.begin(); it != m_processHandles.end(); ++it ) { @@ -688,7 +688,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, if( _tco_num < 0 ) { // then set song-global offset of pattern in order to - // properly perform the note pitch bend + // properly perform the note detuning notePlayHandle->setSongGlobalParentOffset( p->startPosition() ); } From beaf5f54977f3c73ba87ac70d29856a368853015 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:26:02 -0500 Subject: [PATCH 21/38] Revert "Replace DETUNING with PITCHBEND" This reverts commit 76f182b055ae32de9e23ca2dd169126c4a6ddf97. --- include/DetuningHelper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/DetuningHelper.h b/include/DetuningHelper.h index 4c4f6c67212..de0acc82603 100644 --- a/include/DetuningHelper.h +++ b/include/DetuningHelper.h @@ -23,8 +23,8 @@ * */ -#ifndef PITCHBEND_HELPER_H -#define PITCHBEND_HELPER_H +#ifndef DETUNING_HELPER_H +#define DETUNING_HELPER_H #include "InlineAutomation.h" #include "MemoryManager.h" From cac7552f0f266da833a218cc7cd08c3c40a19845 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:26:05 -0500 Subject: [PATCH 22/38] Revert "Fix DetuningReferences (again)" This reverts commit 748c69a285c1d0d2bf1af32696b055c2e749ddfc. --- include/PianoRoll.h | 2 +- tests/src/tracks/AutomationTrackTest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 79b51f6eb1d..1314615ca1f 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -74,7 +74,7 @@ class PianoRoll : public QWidget ModeDraw, ModeErase, ModeSelect, - ModeEditPitchBend, + ModeEditDetuning, }; /*! \brief Resets settings to default when e.g. creating a new project */ diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 35e8a90ed4d..3718cea1a90 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -30,7 +30,7 @@ #include "AutomationTrack.h" #include "BBTrack.h" #include "BBTrackContainer.h" -#include "PitchBendHelper.h" +#include "DetuningHelper.h" #include "InstrumentTrack.h" #include "Pattern.h" #include "TrackContainer.h" From dfdf8082f7bf1721bb32b00694476f4bdf2c1d2e Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:26:06 -0500 Subject: [PATCH 23/38] Revert "Another fix" This reverts commit 34fd80689ca37e00f4d1b01edc9257c83cce9c0f. --- include/PianoRoll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 1314615ca1f..9167804ae43 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -365,7 +365,7 @@ protected slots: void copyToClipboard(const NoteVector & notes ) const; - void drawPitchBendInfo( QPainter & _p, const Note * _n, int _x, int _y ) const; + void drawDetuningInfo( QPainter & _p, const Note * _n, int _x, int _y ) const; bool mouseOverNote(); Note * noteUnderMouse(); From 85958d2b1fc7750cefba1f34c3e0d1f80b210181 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:26:08 -0500 Subject: [PATCH 24/38] Revert "Audio File Processor reference fix" This reverts commit 59b39985a85710d224e32b876f89da8de84b70c7. --- .../audio_file_processor/audio_file_processor.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 4f128a28c01..2fdb8e459b8 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -97,13 +97,13 @@ audioFileProcessor::audioFileProcessor( InstrumentTrack * _instrument_track ) : this, SLOT( loopPointChanged() ) ); connect( &m_stutterModel, SIGNAL( dataChanged() ), this, SLOT( stutterModelChanged() ) ); - + //interpolation modes m_interpolationModel.addItem( tr( "None" ) ); m_interpolationModel.addItem( tr( "Linear" ) ); m_interpolationModel.addItem( tr( "Sinc" ) ); m_interpolationModel.setValue( 1 ); - + pointChanged(); } @@ -156,7 +156,7 @@ void audioFileProcessor::playNote( NotePlayHandle * _n, srcmode = SRC_SINC_MEDIUM_QUALITY; break; } - _n->m_pluginData = new handleState( _n->hasPitchBendInfo(), srcmode ); + _n->m_pluginData = new handleState( _n->hasDetuningInfo(), srcmode ); ((handleState *)_n->m_pluginData)->setFrameIndex( m_nextPlayStartPoint ); ((handleState *)_n->m_pluginData)->setBackwards( m_nextPlayBackwards ); @@ -364,7 +364,7 @@ void audioFileProcessor::stutterModelChanged() } -void audioFileProcessor::startPointChanged( void ) +void audioFileProcessor::startPointChanged( void ) { // check if start is over end and swap values if so if( m_startPointModel.value() > m_endPointModel.value() ) @@ -391,7 +391,7 @@ void audioFileProcessor::startPointChanged( void ) { m_endPointModel.setValue( qMin( m_endPointModel.value() + 0.001f, 1.0f ) ); } - + pointChanged(); } @@ -1327,3 +1327,7 @@ Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data ) } + + + + From f01cb7101d8f139f783d002cecbda54ce62eb20a Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:26:44 -0500 Subject: [PATCH 25/38] Revert "Fix Patman Reference glitch" This reverts commit ae78a7bac4be1f2834dc3d73d61e7b5928665870. --- plugins/patman/patman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index 6c7e486472a..60cd6210cd4 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -420,7 +420,7 @@ void patmanInstrument::selectSample( NotePlayHandle * _n ) { hdata->sample = new SampleBuffer( NULL, 0 ); } - hdata->state = new SampleBuffer::handleState( _n->hasPitchBendInfo() ); + hdata->state = new SampleBuffer::handleState( _n->hasDetuningInfo() ); _n->m_pluginData = hdata; } From 43162e6625197c822126808c9d564512949a2c6f Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:26:47 -0500 Subject: [PATCH 26/38] Revert "Fix automation track test" This reverts commit c463660787918069c63eefde7e49f84a277df9cf. --- tests/src/tracks/AutomationTrackTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 3718cea1a90..c3ecb994c5a 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -145,7 +145,7 @@ private slots: Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createPitchBend(); - PitchBendHelper* dh = note->pitchBend(); + DetuningHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From d85452d8914e0ddbdf5a0ed85e51cc468005d0b2 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:28:02 -0500 Subject: [PATCH 27/38] Revert "Fix Automation Track Test" This reverts commit f49849b03e389ccf2f49e0da8a707dd2b9e79fee. --- src/core/AutomationPattern.cpp | 5 +++++ tests/src/tracks/AutomationTrackTest.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index 1788f2c3273..c307236d54e 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -892,3 +892,8 @@ void AutomationPattern::generateTangents( timeMap::const_iterator it, it++; } } + + + + + diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index c3ecb994c5a..3718cea1a90 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -145,7 +145,7 @@ private slots: Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createPitchBend(); - DetuningHelper* dh = note->pitchBend(); + PitchBendHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From d6c1d9060654b085dea6919f9b3ada01dbb86786 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 09:28:06 -0500 Subject: [PATCH 28/38] Revert "Final Fix" This reverts commit ef708098fc7a40c551118cc3f9ff9287e74ab715. --- tests/src/tracks/AutomationTrackTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 3718cea1a90..c3ecb994c5a 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -145,7 +145,7 @@ private slots: Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createPitchBend(); - PitchBendHelper* dh = note->pitchBend(); + DetuningHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From c5cd01c25506299834cb0e16c197a0f55742c717 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 10:20:57 -0500 Subject: [PATCH 29/38] Revert "Fix InstrumentFunctions.cpp" This reverts commit 9dfea355a6b0243f79dbef17fdc766efefcda57a. --- src/core/InstrumentFunctions.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index 45bdc20dc7d..2860045b8df 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -45,7 +45,7 @@ InstrumentFunctionNoteStacking::ChordTable::Init InstrumentFunctionNoteStacking: { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "aug" ), { 0, 4, 8, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "augsus4" ), { 0, 5, 8, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "tri" ), { 0, 3, 6, 9, -1 } }, - + { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "6" ), { 0, 4, 7, 9, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "6sus4" ), { 0, 5, 7, 9, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "6add9" ), { 0, 4, 7, 9, 14, -1 } }, @@ -133,7 +133,7 @@ InstrumentFunctionNoteStacking::ChordTable::Init InstrumentFunctionNoteStacking: { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Minor" ), { 0, 2, 3, 5, 7, 8, 10, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Chromatic" ), { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Half-Whole Diminished" ), { 0, 1, 3, 4, 6, 7, 9, 10, -1 } }, - + { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "5" ), { 0, 7, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Phrygian dominant" ), { 0, 1, 4, 5, 7, 8, 10, -1 } }, { QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "Persian" ), { 0, 1, 4, 5, 6, 8, 11, -1 } } @@ -258,11 +258,11 @@ void InstrumentFunctionNoteStacking::processNote( NotePlayHandle * _n ) break; } // create copy of base-note - Note note_copy( _n->length(), 0, sub_note_key, _n->getVolume(), _n->getPanning(), _n->pitchBend() ); + Note note_copy( _n->length(), 0, sub_note_key, _n->getVolume(), _n->getPanning(), _n->detuning() ); // create sub-note-play-handle, only note is // different - Engine::mixer()->addPlayHandle( + Engine::mixer()->addPlayHandle( NotePlayHandleManager::acquire( _n->instrumentTrack(), _n->offset(), _n->frames(), note_copy, _n, -1, NotePlayHandle::OriginNoteStacking ) ); @@ -516,7 +516,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) frames_processed, gated_frames, Note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, (volume_t) qRound( _n->getVolume() * vol_level ), - _n->getPanning(), _n->pitchBend() ), + _n->getPanning(), _n->detuning() ), _n, -1, NotePlayHandle::OriginArpeggio ) ); @@ -569,10 +569,13 @@ void InstrumentFunctionArpeggio::loadSettings( const QDomElement & _this ) // Keep compatibility with version 0.2.1 file format if( _this.hasAttribute( "arpsyncmode" ) ) { - m_arpTimeKnob->setSyncMode( + m_arpTimeKnob->setSyncMode( ( tempoSyncKnob::tempoSyncMode ) _this.attribute( "arpsyncmode" ).toInt() ); }*/ m_arpModeModel.loadSettings( _this, "arpmode" ); } + + + From 699a12e61b3792111e0abd6fe685a7edb9837fd2 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 10:21:38 -0500 Subject: [PATCH 30/38] Revert "Revert "Fix automation track test"" This reverts commit 43162e6625197c822126808c9d564512949a2c6f. --- tests/src/tracks/AutomationTrackTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index c3ecb994c5a..3718cea1a90 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -145,7 +145,7 @@ private slots: Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createPitchBend(); - DetuningHelper* dh = note->pitchBend(); + PitchBendHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From c11905847e5f307b0b6b0d4eb1c33f2f8338acdb Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 10:22:50 -0500 Subject: [PATCH 31/38] Revert "Revert "Revert "Fix automation track test""" This reverts commit 699a12e61b3792111e0abd6fe685a7edb9837fd2. --- tests/src/tracks/AutomationTrackTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 3718cea1a90..c3ecb994c5a 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -145,7 +145,7 @@ private slots: Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createPitchBend(); - PitchBendHelper* dh = note->pitchBend(); + DetuningHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From c713d387897f5a2bb69873746fb932582c783203 Mon Sep 17 00:00:00 2001 From: Orbital Ink <31394502+Anonymouqs@users.noreply.github.com> Date: Mon, 19 Mar 2018 10:25:22 -0500 Subject: [PATCH 32/38] Reverts Internal Changes --- tests/src/tracks/AutomationTrackTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index c3ecb994c5a..15cc19a0e61 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -143,9 +143,10 @@ private slots: Pattern* notePattern = dynamic_cast(instrumentTrack->createTCO(0)); notePattern->changeLength(MidiTime(4, 0)); Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); - note->createPitchBend(); + note->createDetuning(); + + DetuningHelper* dh = note->detuning(); - DetuningHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From f95031a032750e17c606c83bf89e7010ea307672 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 10:25:45 -0500 Subject: [PATCH 33/38] Revert "Reverts Internal Changes" This reverts commit c713d387897f5a2bb69873746fb932582c783203. --- tests/src/tracks/AutomationTrackTest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 15cc19a0e61..c3ecb994c5a 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -143,10 +143,9 @@ private slots: Pattern* notePattern = dynamic_cast(instrumentTrack->createTCO(0)); notePattern->changeLength(MidiTime(4, 0)); Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); - note->createDetuning(); - - DetuningHelper* dh = note->detuning(); + note->createPitchBend(); + DetuningHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From 9ac2b3444cb13c1be11af3451242da793557feb7 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 10:26:34 -0500 Subject: [PATCH 34/38] Revert "Revert "Reverts Internal Changes"" This reverts commit f95031a032750e17c606c83bf89e7010ea307672. --- tests/src/tracks/AutomationTrackTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index c3ecb994c5a..15cc19a0e61 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -143,9 +143,10 @@ private slots: Pattern* notePattern = dynamic_cast(instrumentTrack->createTCO(0)); notePattern->changeLength(MidiTime(4, 0)); Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); - note->createPitchBend(); + note->createDetuning(); + + DetuningHelper* dh = note->detuning(); - DetuningHelper* dh = note->pitchBend(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From c0bd032c47da1ea70cd5db8570a5e44c9f658d8a Mon Sep 17 00:00:00 2001 From: Orbital Ink <31394502+Anonymouqs@users.noreply.github.com> Date: Mon, 19 Mar 2018 10:28:33 -0500 Subject: [PATCH 35/38] Fix --- tests/src/tracks/AutomationTrackTest.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 15cc19a0e61..743811479f4 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -146,7 +146,6 @@ private slots: note->createDetuning(); DetuningHelper* dh = note->detuning(); - auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From 2b04141151e332fe97c0f1e9aa97d23131d26d60 Mon Sep 17 00:00:00 2001 From: Orbital Ink <31394502+Anonymouqs@users.noreply.github.com> Date: Mon, 19 Mar 2018 10:29:06 -0500 Subject: [PATCH 36/38] FIx --- tests/src/tracks/AutomationTrackTest.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 743811479f4..0919e66ee4c 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -144,7 +144,6 @@ private slots: notePattern->changeLength(MidiTime(4, 0)); Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createDetuning(); - DetuningHelper* dh = note->detuning(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); From eb4cdb3d4185e0f65daaa734172411a747c54540 Mon Sep 17 00:00:00 2001 From: Orbital Ink <31394502+Anonymouqs@users.noreply.github.com> Date: Mon, 19 Mar 2018 10:31:47 -0500 Subject: [PATCH 37/38] Revert Changes --- tests/src/tracks/AutomationTrackTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 0919e66ee4c..bd5257253fd 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -144,7 +144,8 @@ private slots: notePattern->changeLength(MidiTime(4, 0)); Note* note = notePattern->addNote(Note(MidiTime(4, 0)), false); note->createDetuning(); - DetuningHelper* dh = note->detuning(); + + DetuningHelper* dh = note->detuning(); auto pattern = dh->automationPattern(); pattern->setProgressionType( AutomationPattern::LinearProgression ); pattern->putValue(MidiTime(0, 0), 0.0); From 9414e0cac1118f3d8407101f8dddc5d0b3ef8f61 Mon Sep 17 00:00:00 2001 From: Anonymouqs Date: Mon, 19 Mar 2018 10:51:06 -0500 Subject: [PATCH 38/38] Revert "Revert "Decapitalize m in Pitch Bend Mode"" This reverts commit 733853e84944c37f700ea40f27f60771d30221e5. --- src/gui/editors/PianoRoll.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 8c452f5af22..3bbcdebf7a0 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -4077,7 +4077,7 @@ 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* pitchBendAction = editModeGroup->addAction( embed::getIconPixmap( "automation" ), tr("Pitch Bend Mode (Shift+T)" ) ); + QAction* pitchBendAction = editModeGroup->addAction( embed::getIconPixmap( "automation" ), tr("Pitch Bend mode (Shift+T)" ) ); drawAction->setChecked( true ); @@ -4113,7 +4113,7 @@ PianoRollWindow::PianoRollWindow() : "Ctrl" ) ); #endif pitchBendAction->setWhatsThis( - tr( "Click here and Pitch Bend Mode will be activated. " + 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 "