Skip to content

Commit

Permalink
Change internal references of detune to Pitch Bend in Piano Roll and …
Browse files Browse the repository at this point in the history
…DetuningHelper

Rename DetuningHelper.h as PitchBendHelper.h:
* Detune to PitchBend
* detune to pitchBend

PianoRoll.cpp:
* detuning to pitchBend
* Detuning to PitchBend
  • Loading branch information
Anonymouqs committed Mar 7, 2018
1 parent 1f8a502 commit 238c824
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
12 changes: 6 additions & 6 deletions include/DetuningHelper.h → include/PitchBendHelper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* DetuningHelper.h - detuning automation helper
* PitchBendHelper.h - pitch bend automation helper
*
* Copyright (c) 2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
Expand Down Expand Up @@ -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()
{
}

Expand All @@ -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";
}

} ;
Expand Down
34 changes: 17 additions & 17 deletions src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand All @@ -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();
Expand All @@ -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 );
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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." ) );

Expand Down

0 comments on commit 238c824

Please sign in to comment.