Add basic ghost notes feature. (#4575)
Lets you set a melody pattern as visible in the background of the Piano Roll as support when building a new pattern. The pattern is visible throughout the session or until cleared via the provided button.
This commit is contained in:
committed by
Oskar Wallgren
parent
68cefc15c4
commit
5126070bb1
@@ -187,6 +187,7 @@ public slots:
|
||||
|
||||
protected slots:
|
||||
void openInPianoRoll();
|
||||
void setGhostInPianoRoll();
|
||||
|
||||
void resetName();
|
||||
void changeName();
|
||||
|
||||
@@ -59,7 +59,9 @@ class PianoRoll : public QWidget
|
||||
Q_PROPERTY( QColor lineColor READ lineColor WRITE setLineColor )
|
||||
Q_PROPERTY( QColor noteModeColor READ noteModeColor WRITE setNoteModeColor )
|
||||
Q_PROPERTY( QColor noteColor READ noteColor WRITE setNoteColor )
|
||||
Q_PROPERTY( QColor ghostNoteColor READ ghostNoteColor WRITE setGhostNoteColor )
|
||||
Q_PROPERTY( QColor noteTextColor READ noteTextColor WRITE setNoteTextColor )
|
||||
Q_PROPERTY( QColor ghostNoteTextColor READ ghostNoteTextColor WRITE setGhostNoteTextColor )
|
||||
Q_PROPERTY( QColor barColor READ barColor WRITE setBarColor )
|
||||
Q_PROPERTY( QColor selectedNoteColor READ selectedNoteColor WRITE setSelectedNoteColor )
|
||||
Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
|
||||
@@ -68,6 +70,8 @@ class PianoRoll : public QWidget
|
||||
Q_PROPERTY( QColor markedSemitoneColor READ markedSemitoneColor WRITE setMarkedSemitoneColor )
|
||||
Q_PROPERTY( int noteOpacity READ noteOpacity WRITE setNoteOpacity )
|
||||
Q_PROPERTY( bool noteBorders READ noteBorders WRITE setNoteBorders )
|
||||
Q_PROPERTY( int ghostNoteOpacity READ ghostNoteOpacity WRITE setGhostNoteOpacity )
|
||||
Q_PROPERTY( bool ghostNoteBorders READ ghostNoteBorders WRITE setGhostNoteBorders )
|
||||
Q_PROPERTY( QColor backgroundShade READ backgroundShade WRITE setBackgroundShade )
|
||||
public:
|
||||
enum EditModes
|
||||
@@ -87,6 +91,7 @@ public:
|
||||
void showPanTextFloat(panning_t pan, const QPoint &pos, int timeout=-1);
|
||||
|
||||
void setCurrentPattern( Pattern* newPattern );
|
||||
void setGhostPattern( Pattern* newPattern );
|
||||
|
||||
inline void stopRecording()
|
||||
{
|
||||
@@ -141,6 +146,14 @@ public:
|
||||
void setNoteOpacity( const int i );
|
||||
bool noteBorders() const;
|
||||
void setNoteBorders( const bool b );
|
||||
QColor ghostNoteColor() const;
|
||||
void setGhostNoteColor( const QColor & c );
|
||||
QColor ghostNoteTextColor() const;
|
||||
void setGhostNoteTextColor( const QColor & c );
|
||||
int ghostNoteOpacity() const;
|
||||
void setGhostNoteOpacity( const int i );
|
||||
bool ghostNoteBorders() const;
|
||||
void setGhostNoteBorders( const bool b );
|
||||
QColor backgroundShade() const;
|
||||
void setBackgroundShade( const QColor & c );
|
||||
|
||||
@@ -206,9 +219,12 @@ protected slots:
|
||||
|
||||
void selectRegionFromPixels( int xStart, int xEnd );
|
||||
|
||||
void clearGhostPattern();
|
||||
|
||||
|
||||
signals:
|
||||
void currentPatternChanged();
|
||||
void ghostPatternSet(bool);
|
||||
void semiToneMarkerMenuScaleSetEnabled(bool);
|
||||
void semiToneMarkerMenuChordSetEnabled(bool);
|
||||
|
||||
@@ -309,6 +325,7 @@ private:
|
||||
static const QVector<double> m_zoomLevels;
|
||||
|
||||
Pattern* m_pattern;
|
||||
Pattern* m_ghostPattern;
|
||||
QScrollBar * m_leftRightScroll;
|
||||
QScrollBar * m_topBottomScroll;
|
||||
|
||||
@@ -388,6 +405,8 @@ private:
|
||||
QColor m_noteModeColor;
|
||||
QColor m_noteColor;
|
||||
QColor m_noteTextColor;
|
||||
QColor m_ghostNoteColor;
|
||||
QColor m_ghostNoteTextColor;
|
||||
QColor m_barColor;
|
||||
QColor m_selectedNoteColor;
|
||||
QColor m_textColor;
|
||||
@@ -395,7 +414,9 @@ private:
|
||||
QColor m_textShadow;
|
||||
QColor m_markedSemitoneColor;
|
||||
int m_noteOpacity;
|
||||
int m_ghostNoteOpacity;
|
||||
bool m_noteBorders;
|
||||
bool m_ghostNoteBorders;
|
||||
QColor m_backgroundShade;
|
||||
|
||||
signals:
|
||||
@@ -412,7 +433,8 @@ public:
|
||||
PianoRollWindow();
|
||||
|
||||
const Pattern* currentPattern() const;
|
||||
void setCurrentPattern(Pattern* pattern);
|
||||
void setCurrentPattern( Pattern* pattern );
|
||||
void setGhostPattern( Pattern* pattern );
|
||||
|
||||
int quantization() const;
|
||||
|
||||
@@ -445,6 +467,7 @@ signals:
|
||||
|
||||
private slots:
|
||||
void patternRenamed();
|
||||
void ghostPatternSet( bool state );
|
||||
|
||||
private:
|
||||
void focusInEvent(QFocusEvent * event);
|
||||
@@ -456,6 +479,7 @@ private:
|
||||
ComboBox * m_noteLenComboBox;
|
||||
ComboBox * m_scaleComboBox;
|
||||
ComboBox * m_chordComboBox;
|
||||
QPushButton * m_clearGhostButton;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user