LMMS
Loading...
Searching...
No Matches
lmms::gui::PianoRoll Class Reference

#include <PianoRoll.h>

Inheritance diagram for lmms::gui::PianoRoll:

Public Types

enum class  EditMode {
  Draw , Erase , Select , Detuning ,
  Knife , Strum
}

Signals

void currentMidiClipChanged ()
void ghostClipSet (bool)
void semiToneMarkerMenuScaleSetEnabled (bool)
void semiToneMarkerMenuChordSetEnabled (bool)

Public Member Functions

void reset ()
 Resets settings to default when e.g. creating a new project.
void showTextFloat (const QString &text, const QPoint &pos, int timeout=-1)
void showVolTextFloat (volume_t vol, const QPoint &pos, int timeout=-1)
void showPanTextFloat (panning_t pan, const QPoint &pos, int timeout=-1)
void setCurrentMidiClip (MidiClip *newMidiClip)
void setGhostMidiClip (MidiClip *newMidiClip)
void loadGhostNotes (const QDomElement &de)
void loadMarkedSemiTones (const QDomElement &de)
void stopRecording ()
bool isRecording () const
bool isStepRecording () const
const MidiClipcurrentMidiClip () const
bool hasValidMidiClip () const
int trackOctaveSize () const
Song::PlayMode desiredPlayModeForAccompany () const
int quantization () const

Protected Types

enum class  QuantizeAction { Both , Pos , Length }
enum class  SemiToneMarkerAction {
  UnmarkAll , MarkCurrentSemiTone , MarkAllOctaveSemiTones , MarkCurrentScale ,
  MarkCurrentChord , CopyAllNotesOnKey
}

Protected Slots

void play ()
void record ()
void recordAccompany ()
bool toggleStepRecording ()
void stop ()
void startRecordNote (const lmms::Note &n)
void finishRecordNote (const lmms::Note &n)
void horScrolled (int new_pos)
void verScrolled (int new_pos)
void setEditMode (int mode)
void copySelectedNotes ()
void cutSelectedNotes ()
void pasteNotes ()
bool deleteSelectedNotes ()
void updatePosition ()
void updatePositionAccompany ()
void updatePositionStepRecording (const lmms::TimePos &t)
void zoomingChanged ()
void zoomingYChanged ()
void quantizeChanged ()
void noteLengthChanged ()
void keyChanged ()
void quantizeNotes (QuantizeAction mode=QuantizeAction::Both)
void updateSemiToneMarkerMenu ()
void changeNoteEditMode (int i)
void markSemiTone (SemiToneMarkerAction i, bool fromMenu=true)
void hideMidiClip (lmms::MidiClip *clip)
void selectRegionFromPixels (int xStart, int xEnd)
void clearGhostClip ()
void glueNotes ()
void fitNoteLengths (bool fill)
void reverseNotes ()
void constrainNoteLengths (bool constrainMax)
void changeSnapMode ()

Protected Member Functions

void keyPressEvent (QKeyEvent *ke) override
void keyReleaseEvent (QKeyEvent *ke) override
void leaveEvent (QEvent *e) override
void mousePressEvent (QMouseEvent *me) override
void mouseDoubleClickEvent (QMouseEvent *me) override
void mouseReleaseEvent (QMouseEvent *me) override
void mouseMoveEvent (QMouseEvent *me) override
void paintEvent (QPaintEvent *pe) override
void resizeEvent (QResizeEvent *re) override
void wheelEvent (QWheelEvent *we) override
void focusOutEvent (QFocusEvent *) override
void focusInEvent (QFocusEvent *) override
void drawNoteRect (QPainter &p, int x, int y, int width, const Note *n, const QColor &noteCol, const QColor &noteTextColor, const QColor &selCol, const int noteOpc, const bool borderless, bool drawNoteName)
void removeSelection ()
void selectAll ()
NoteVector getSelectedNotes () const
void selectNotesOnKey ()
void enterValue (NoteVector *nv)
void updateYScroll ()

Properties

QColor barLineColor
QColor beatLineColor
QColor lineColor
QColor noteModeColor
QColor noteColor
QColor stepNoteColor
QColor currentStepNoteColor
QColor ghostNoteColor
QColor noteTextColor
QColor ghostNoteTextColor
QColor barColor
QColor selectedNoteColor
QColor textColor
QColor textColorLight
QColor textShadow
QColor markedSemitoneColor
QColor knifeCutLine
int noteOpacity
bool noteBorders
int ghostNoteOpacity
bool ghostNoteBorders
QColor backgroundShade
QColor outOfBoundsShade
int whiteKeyWidth
QColor whiteKeyInactiveTextColor
QColor whiteKeyInactiveTextShadow
QBrush whiteKeyInactiveBackground
QColor whiteKeyActiveTextColor
QColor whiteKeyActiveTextShadow
QBrush whiteKeyActiveBackground
QBrush whiteKeyDisabledBackground
int blackKeyWidth
QBrush blackKeyInactiveBackground
QBrush blackKeyActiveBackground
QBrush blackKeyDisabledBackground

Private Types

enum class  Action {
  None , MoveNote , ResizeNote , SelectNotes ,
  ChangeNoteProperty , ResizeNoteEditArea , Knife , Strum
}
enum class  NoteEditMode { Volume , Panning , Count }
enum class  KeyType { WhiteSmall , WhiteBig , Black }
enum class  GridMode { Nudge , Snap }

Private Member Functions

 PianoRoll ()
 PianoRoll (const PianoRoll &)
 ~PianoRoll () override=default
void autoScroll (const TimePos &t)
TimePos newNoteLen () const
void shiftPos (int amount)
void shiftPos (const NoteVector &notes, int amount)
void shiftSemiTone (int amount)
void shiftSemiTone (const NoteVector &notes, int amount)
bool isSelection () const
int selectionCount () const
void testPlayNote (Note *n)
void testPlayKey (int _key, int _vol, int _pan)
void pauseTestNotes (bool pause=true)
void playChordNotes (int key, int velocity=-1)
void pauseChordNotes (int key)
void setKnifeAction ()
void cancelKnifeAction ()
void setStrumAction ()
void cancelStrumAction ()
void updateScrollbars ()
void updatePositionLinePos ()
void updatePositionLineHeight ()
QList< intgetAllOctavesForKey (int keyToMirror) const
int noteEditTop () const
int keyAreaBottom () const
int noteEditBottom () const
int keyAreaTop () const
int noteEditRight () const
int noteEditLeft () const
int getKey (int y) const
int yCoordOfKey (int key) const
void dragNotes (int x, int y, bool alt, bool shift, bool ctrl)
const NoteVectorghostNotes () const
void adjustLeftRightScoll (int value)
void copyToClipboard (const NoteVector &notes) const
void drawDetuningInfo (QPainter &_p, const Note *_n, int _x, int _y) const
bool mouseOverNote ()
NotenoteUnderMouse ()
NoteparameterEditNoteUnderMouse (Note::ParameterType paramType)
 Calculates the closest note to the mouse given their parameter automation curve.
void computeSelectedNotes (bool shift)
void clearSelectedNotes ()
void updateKnifePos (QMouseEvent *me, bool initial)
void updateParameterEditPos (QMouseEvent *me, Note::ParameterType paramType)
 Updates the currently dragged node position in the detuning/parameter curves of the selected notes.
void applyParameterEditPos (Note::ParameterType paramType)
 Finishes the dragging of the current node of the detuning/parameter curves.
void setupSelectedChords ()
 Computes which notes belong to which chords from the selection.
void updateStrumPos (QMouseEvent *me, bool initial, bool warp)
 Handles updating all of the note positions when performing a strum.

Private Attributes

PositionLinem_positionLine
std::vector< QString > m_nemStr
QMenu * m_noteEditMenu
QList< intm_markedSemiTones
QMenu * m_semiToneMarkerMenu
int m_pianoKeySelected
QPixmap m_toolDraw = embed::getIconPixmap("edit_draw")
QPixmap m_toolErase = embed::getIconPixmap("edit_erase")
QPixmap m_toolSelect = embed::getIconPixmap("edit_select")
QPixmap m_toolMove = embed::getIconPixmap("edit_move")
QPixmap m_toolOpen = embed::getIconPixmap("automation")
QPixmap m_toolKnife = embed::getIconPixmap("edit_knife")
QPixmap m_toolStrum = embed::getIconPixmap("arp_free")
ComboBoxModel m_zoomingModel
ComboBoxModel m_zoomingYModel
ComboBoxModel m_quantizeModel
ComboBoxModel m_noteLenModel
ComboBoxModel m_keyModel
ComboBoxModel m_scaleModel
ComboBoxModel m_chordModel
ComboBoxModel m_snapModel
MidiClipm_midiClip
NoteVector m_ghostNotes
QScrollBar * m_leftRightScroll
QScrollBar * m_topBottomScroll
TimePos m_currentPosition
bool m_recording
bool m_doAutoQuantization {false}
QList< Notem_recordingNotes
Notem_currentNote
Action m_action
NoteEditMode m_noteEditMode
GridMode m_gridMode
int m_selectStartTick
int m_selectedTick
int m_selectStartKey
int m_selectedKeys
int m_moveBoundaryLeft
int m_moveBoundaryTop
int m_moveBoundaryRight
int m_moveBoundaryBottom
int m_mouseDownKey
int m_mouseDownTick
int m_lastMouseX
int m_lastMouseY
int m_moveStartX
int m_moveStartY
int m_notesEditHeight
int m_userSetNotesEditHeight
int m_ppb
int m_totalKeysToScroll
int m_pianoKeysVisible
int m_keyLineHeight
int m_whiteKeySmallHeight
int m_whiteKeyBigHeight
int m_blackKeyHeight
TimePos m_lenOfNewNotes
volume_t m_lastNoteVolume
panning_t m_lastNotePanning
TimePos m_minResizeLen
int m_startKey
int m_lastKey
EditMode m_editMode
EditMode m_ctrlMode
EditMode m_knifeMode
EditMode m_strumMode
bool m_mouseDownRight
TimeLineWidgetm_timeLine
bool m_scrollBack
bool m_startedWithShift
TimePos m_knifeStartTickPos
int m_knifeStartKey
TimePos m_knifeEndTickPos
int m_knifeEndKey
bool m_knifeDown
bool m_parameterEditDownLeft = false
 Varaibles which hold which mouse buttons are being held while editing the detuning/parameter of notes.
bool m_parameterEditDownRight = false
std::optional< intm_lastParameterEditTick = std::nullopt
Notem_parameterEditClickedNote
 The current note whose detuning/parameter curve is being edited.
std::vector< NoteVectorm_selectedChords
 Stores the chords for the strum tool.
TimePos m_strumStartTime
TimePos m_strumCurrentTime
int m_strumStartVertical = 0
int m_strumCurrentVertical = 0
float m_strumHeightRatio = 0.0f
bool m_strumEnabled = false
StepRecorderWidget m_stepRecorderWidget
StepRecorder m_stepRecorder
QColor m_barLineColor
QColor m_beatLineColor
QColor m_lineColor
QColor m_noteModeColor
QColor m_noteColor
QColor m_stepNoteColor
QColor m_currentStepNoteColor
QColor m_noteTextColor
QColor m_ghostNoteColor
QColor m_ghostNoteTextColor
QColor m_barColor
QColor m_selectedNoteColor
QColor m_textColor
QColor m_textColorLight
QColor m_textShadow
QColor m_markedSemitoneColor
QColor m_knifeCutLineColor
int m_noteOpacity
int m_ghostNoteOpacity
bool m_noteBorders
bool m_ghostNoteBorders
QColor m_backgroundShade
QColor m_outOfBoundsShade
int m_whiteKeyWidth
QColor m_whiteKeyActiveTextColor
QColor m_whiteKeyActiveTextShadow
QBrush m_whiteKeyActiveBackground
QColor m_whiteKeyInactiveTextColor
QColor m_whiteKeyInactiveTextShadow
QBrush m_whiteKeyInactiveBackground
QBrush m_whiteKeyDisabledBackground
int m_blackKeyWidth
QBrush m_blackKeyActiveBackground
QBrush m_blackKeyInactiveBackground
QBrush m_blackKeyDisabledBackground

Static Private Attributes

static const int cm_scrollAmtHoriz = 10
static const int cm_scrollAmtVert = 1
static std::array< KeyType, 12 > prKeyOrder
static SimpleTextFloats_textFloat = nullptr
static const std::vector< float > m_zoomLevels
static const std::vector< float > m_zoomYLevels

Friends

class PianoRollWindow

Member Enumeration Documentation

◆ Action

enum class lmms::gui::PianoRoll::Action
strongprivate
Enumerator
None 
MoveNote 
ResizeNote 
SelectNotes 
ChangeNoteProperty 
ResizeNoteEditArea 
Knife 
Strum 

◆ EditMode

enum class lmms::gui::PianoRoll::EditMode
strong
Enumerator
Draw 
Erase 
Select 
Detuning 
Knife 
Strum 

◆ GridMode

enum class lmms::gui::PianoRoll::GridMode
strongprivate
Enumerator
Nudge 
Snap 

◆ KeyType

enum class lmms::gui::PianoRoll::KeyType
strongprivate
Enumerator
WhiteSmall 
WhiteBig 
Black 

◆ NoteEditMode

enum class lmms::gui::PianoRoll::NoteEditMode
strongprivate
Enumerator
Volume 
Panning 
Count 

◆ QuantizeAction

enum class lmms::gui::PianoRoll::QuantizeAction
strongprotected
Enumerator
Both 
Pos 
Length 

◆ SemiToneMarkerAction

enum class lmms::gui::PianoRoll::SemiToneMarkerAction
strongprotected
Enumerator
UnmarkAll 
MarkCurrentSemiTone 
MarkAllOctaveSemiTones 
MarkCurrentScale 
MarkCurrentChord 
CopyAllNotesOnKey 

Constructor & Destructor Documentation

◆ PianoRoll() [1/2]

lmms::gui::PianoRoll::PianoRoll ( )
private

◆ PianoRoll() [2/2]

lmms::gui::PianoRoll::PianoRoll ( const PianoRoll & )
private

◆ ~PianoRoll()

lmms::gui::PianoRoll::~PianoRoll ( )
overrideprivatedefault

Member Function Documentation

◆ adjustLeftRightScoll()

void lmms::gui::PianoRoll::adjustLeftRightScoll ( int value)
private

◆ applyParameterEditPos()

void lmms::gui::PianoRoll::applyParameterEditPos ( Note::ParameterType paramType)
private

Finishes the dragging of the current node of the detuning/parameter curves.

◆ autoScroll()

void lmms::gui::PianoRoll::autoScroll ( const TimePos & t)
private

◆ cancelKnifeAction()

void lmms::gui::PianoRoll::cancelKnifeAction ( )
private

◆ cancelStrumAction()

void lmms::gui::PianoRoll::cancelStrumAction ( )
private

◆ changeNoteEditMode

void lmms::gui::PianoRoll::changeNoteEditMode ( int i)
protectedslot

◆ changeSnapMode

void lmms::gui::PianoRoll::changeSnapMode ( )
protectedslot

◆ clearGhostClip

void lmms::gui::PianoRoll::clearGhostClip ( )
protectedslot

◆ clearSelectedNotes()

void lmms::gui::PianoRoll::clearSelectedNotes ( )
private

◆ computeSelectedNotes()

void lmms::gui::PianoRoll::computeSelectedNotes ( bool shift)
private

◆ constrainNoteLengths

void lmms::gui::PianoRoll::constrainNoteLengths ( bool constrainMax)
protectedslot

◆ copySelectedNotes

void lmms::gui::PianoRoll::copySelectedNotes ( )
protectedslot

◆ copyToClipboard()

void lmms::gui::PianoRoll::copyToClipboard ( const NoteVector & notes) const
private

◆ currentMidiClip()

const MidiClip * lmms::gui::PianoRoll::currentMidiClip ( ) const
inline

◆ currentMidiClipChanged

void lmms::gui::PianoRoll::currentMidiClipChanged ( )
signal

◆ cutSelectedNotes

void lmms::gui::PianoRoll::cutSelectedNotes ( )
protectedslot

◆ deleteSelectedNotes

bool lmms::gui::PianoRoll::deleteSelectedNotes ( )
protectedslot

◆ desiredPlayModeForAccompany()

Song::PlayMode lmms::gui::PianoRoll::desiredPlayModeForAccompany ( ) const

◆ dragNotes()

void lmms::gui::PianoRoll::dragNotes ( int x,
int y,
bool alt,
bool shift,
bool ctrl )
private

◆ drawDetuningInfo()

void lmms::gui::PianoRoll::drawDetuningInfo ( QPainter & _p,
const Note * _n,
int _x,
int _y ) const
private

◆ drawNoteRect()

void lmms::gui::PianoRoll::drawNoteRect ( QPainter & p,
int x,
int y,
int width,
const Note * n,
const QColor & noteCol,
const QColor & noteTextColor,
const QColor & selCol,
const int noteOpc,
const bool borderless,
bool drawNoteName )
protected

◆ enterValue()

void lmms::gui::PianoRoll::enterValue ( NoteVector * nv)
protected

◆ finishRecordNote

void lmms::gui::PianoRoll::finishRecordNote ( const lmms::Note & n)
protectedslot

◆ fitNoteLengths

void lmms::gui::PianoRoll::fitNoteLengths ( bool fill)
protectedslot

◆ focusInEvent()

void lmms::gui::PianoRoll::focusInEvent ( QFocusEvent * ev)
overrideprotected

◆ focusOutEvent()

void lmms::gui::PianoRoll::focusOutEvent ( QFocusEvent * )
overrideprotected

◆ getAllOctavesForKey()

QList< int > lmms::gui::PianoRoll::getAllOctavesForKey ( int keyToMirror) const
private

◆ getKey()

int lmms::gui::PianoRoll::getKey ( int y) const
private

◆ getSelectedNotes()

NoteVector lmms::gui::PianoRoll::getSelectedNotes ( ) const
protected

◆ ghostClipSet

void lmms::gui::PianoRoll::ghostClipSet ( bool )
signal

◆ ghostNotes()

const NoteVector & lmms::gui::PianoRoll::ghostNotes ( ) const
inlineprivate

◆ glueNotes

void lmms::gui::PianoRoll::glueNotes ( )
protectedslot

◆ hasValidMidiClip()

bool lmms::gui::PianoRoll::hasValidMidiClip ( ) const
inline

◆ hideMidiClip

void lmms::gui::PianoRoll::hideMidiClip ( lmms::MidiClip * clip)
protectedslot

◆ horScrolled

void lmms::gui::PianoRoll::horScrolled ( int new_pos)
protectedslot

◆ isRecording()

bool lmms::gui::PianoRoll::isRecording ( ) const
inline

◆ isSelection()

bool lmms::gui::PianoRoll::isSelection ( ) const
private

◆ isStepRecording()

bool lmms::gui::PianoRoll::isStepRecording ( ) const
inline

◆ keyAreaBottom()

int lmms::gui::PianoRoll::keyAreaBottom ( ) const
private

◆ keyAreaTop()

int lmms::gui::PianoRoll::keyAreaTop ( ) const
private

◆ keyChanged

void lmms::gui::PianoRoll::keyChanged ( )
protectedslot

◆ keyPressEvent()

void lmms::gui::PianoRoll::keyPressEvent ( QKeyEvent * ke)
overrideprotected

◆ keyReleaseEvent()

void lmms::gui::PianoRoll::keyReleaseEvent ( QKeyEvent * ke)
overrideprotected

◆ leaveEvent()

void lmms::gui::PianoRoll::leaveEvent ( QEvent * e)
overrideprotected

◆ loadGhostNotes()

void lmms::gui::PianoRoll::loadGhostNotes ( const QDomElement & de)

◆ loadMarkedSemiTones()

void lmms::gui::PianoRoll::loadMarkedSemiTones ( const QDomElement & de)

◆ markSemiTone

void lmms::gui::PianoRoll::markSemiTone ( SemiToneMarkerAction i,
bool fromMenu = true )
protectedslot

◆ mouseDoubleClickEvent()

void lmms::gui::PianoRoll::mouseDoubleClickEvent ( QMouseEvent * me)
overrideprotected

◆ mouseMoveEvent()

void lmms::gui::PianoRoll::mouseMoveEvent ( QMouseEvent * me)
overrideprotected

◆ mouseOverNote()

bool lmms::gui::PianoRoll::mouseOverNote ( )
private

◆ mousePressEvent()

void lmms::gui::PianoRoll::mousePressEvent ( QMouseEvent * me)
overrideprotected

◆ mouseReleaseEvent()

void lmms::gui::PianoRoll::mouseReleaseEvent ( QMouseEvent * me)
overrideprotected

◆ newNoteLen()

TimePos lmms::gui::PianoRoll::newNoteLen ( ) const
private

◆ noteEditBottom()

int lmms::gui::PianoRoll::noteEditBottom ( ) const
private

◆ noteEditLeft()

int lmms::gui::PianoRoll::noteEditLeft ( ) const
private

◆ noteEditRight()

int lmms::gui::PianoRoll::noteEditRight ( ) const
private

◆ noteEditTop()

int lmms::gui::PianoRoll::noteEditTop ( ) const
private

◆ noteLengthChanged

void lmms::gui::PianoRoll::noteLengthChanged ( )
protectedslot

◆ noteUnderMouse()

Note * lmms::gui::PianoRoll::noteUnderMouse ( )
private

◆ paintEvent()

void lmms::gui::PianoRoll::paintEvent ( QPaintEvent * pe)
overrideprotected

◆ parameterEditNoteUnderMouse()

Note * lmms::gui::PianoRoll::parameterEditNoteUnderMouse ( Note::ParameterType paramType)
private

Calculates the closest note to the mouse given their parameter automation curve.

◆ pasteNotes

void lmms::gui::PianoRoll::pasteNotes ( )
protectedslot

◆ pauseChordNotes()

void lmms::gui::PianoRoll::pauseChordNotes ( int key)
private

◆ pauseTestNotes()

void lmms::gui::PianoRoll::pauseTestNotes ( bool pause = true)
private

◆ play

void lmms::gui::PianoRoll::play ( )
protectedslot

◆ playChordNotes()

void lmms::gui::PianoRoll::playChordNotes ( int key,
int velocity = -1 )
private

◆ quantization()

int lmms::gui::PianoRoll::quantization ( ) const

◆ quantizeChanged

void lmms::gui::PianoRoll::quantizeChanged ( )
protectedslot

◆ quantizeNotes

void lmms::gui::PianoRoll::quantizeNotes ( QuantizeAction mode = QuantizeAction::Both)
protectedslot

◆ record

void lmms::gui::PianoRoll::record ( )
protectedslot

◆ recordAccompany

void lmms::gui::PianoRoll::recordAccompany ( )
protectedslot

◆ removeSelection()

void lmms::gui::PianoRoll::removeSelection ( )
protected

◆ reset()

void lmms::gui::PianoRoll::reset ( )

Resets settings to default when e.g. creating a new project.

◆ resizeEvent()

void lmms::gui::PianoRoll::resizeEvent ( QResizeEvent * re)
overrideprotected

◆ reverseNotes

void lmms::gui::PianoRoll::reverseNotes ( )
protectedslot

◆ selectAll()

void lmms::gui::PianoRoll::selectAll ( )
protected

◆ selectionCount()

int lmms::gui::PianoRoll::selectionCount ( ) const
private

◆ selectNotesOnKey()

void lmms::gui::PianoRoll::selectNotesOnKey ( )
protected

◆ selectRegionFromPixels

void lmms::gui::PianoRoll::selectRegionFromPixels ( int xStart,
int xEnd )
protectedslot

◆ semiToneMarkerMenuChordSetEnabled

void lmms::gui::PianoRoll::semiToneMarkerMenuChordSetEnabled ( bool )
signal

◆ semiToneMarkerMenuScaleSetEnabled

void lmms::gui::PianoRoll::semiToneMarkerMenuScaleSetEnabled ( bool )
signal

◆ setCurrentMidiClip()

void lmms::gui::PianoRoll::setCurrentMidiClip ( MidiClip * newMidiClip)

◆ setEditMode

void lmms::gui::PianoRoll::setEditMode ( int mode)
protectedslot

◆ setGhostMidiClip()

void lmms::gui::PianoRoll::setGhostMidiClip ( MidiClip * newMidiClip)

◆ setKnifeAction()

void lmms::gui::PianoRoll::setKnifeAction ( )
private

◆ setStrumAction()

void lmms::gui::PianoRoll::setStrumAction ( )
private

◆ setupSelectedChords()

void lmms::gui::PianoRoll::setupSelectedChords ( )
private

Computes which notes belong to which chords from the selection.

◆ shiftPos() [1/2]

void lmms::gui::PianoRoll::shiftPos ( const NoteVector & notes,
int amount )
private

◆ shiftPos() [2/2]

void lmms::gui::PianoRoll::shiftPos ( int amount)
private

◆ shiftSemiTone() [1/2]

void lmms::gui::PianoRoll::shiftSemiTone ( const NoteVector & notes,
int amount )
private

◆ shiftSemiTone() [2/2]

void lmms::gui::PianoRoll::shiftSemiTone ( int amount)
private

◆ showPanTextFloat()

void lmms::gui::PianoRoll::showPanTextFloat ( panning_t pan,
const QPoint & pos,
int timeout = -1 )

◆ showTextFloat()

void lmms::gui::PianoRoll::showTextFloat ( const QString & text,
const QPoint & pos,
int timeout = -1 )

◆ showVolTextFloat()

void lmms::gui::PianoRoll::showVolTextFloat ( volume_t vol,
const QPoint & pos,
int timeout = -1 )
Todo
display velocity for MIDI-based instruments

◆ startRecordNote

void lmms::gui::PianoRoll::startRecordNote ( const lmms::Note & n)
protectedslot

◆ stop

void lmms::gui::PianoRoll::stop ( )
protectedslot

◆ stopRecording()

void lmms::gui::PianoRoll::stopRecording ( )
inline

◆ testPlayKey()

void lmms::gui::PianoRoll::testPlayKey ( int _key,
int _vol,
int _pan )
private

◆ testPlayNote()

void lmms::gui::PianoRoll::testPlayNote ( Note * n)
private

◆ toggleStepRecording

bool lmms::gui::PianoRoll::toggleStepRecording ( )
protectedslot

◆ trackOctaveSize()

int lmms::gui::PianoRoll::trackOctaveSize ( ) const

◆ updateKnifePos()

void lmms::gui::PianoRoll::updateKnifePos ( QMouseEvent * me,
bool initial )
private

◆ updateParameterEditPos()

void lmms::gui::PianoRoll::updateParameterEditPos ( QMouseEvent * me,
Note::ParameterType paramType )
private

Updates the currently dragged node position in the detuning/parameter curves of the selected notes.

◆ updatePosition

void lmms::gui::PianoRoll::updatePosition ( )
protectedslot

◆ updatePositionAccompany

void lmms::gui::PianoRoll::updatePositionAccompany ( )
protectedslot

◆ updatePositionLineHeight()

void lmms::gui::PianoRoll::updatePositionLineHeight ( )
private

◆ updatePositionLinePos()

void lmms::gui::PianoRoll::updatePositionLinePos ( )
private

◆ updatePositionStepRecording

void lmms::gui::PianoRoll::updatePositionStepRecording ( const lmms::TimePos & t)
protectedslot

◆ updateScrollbars()

void lmms::gui::PianoRoll::updateScrollbars ( )
private

◆ updateSemiToneMarkerMenu

void lmms::gui::PianoRoll::updateSemiToneMarkerMenu ( )
protectedslot

◆ updateStrumPos()

void lmms::gui::PianoRoll::updateStrumPos ( QMouseEvent * me,
bool initial,
bool warp )
private

Handles updating all of the note positions when performing a strum.

◆ updateYScroll()

void lmms::gui::PianoRoll::updateYScroll ( )
protected

◆ verScrolled

void lmms::gui::PianoRoll::verScrolled ( int new_pos)
protectedslot

◆ wheelEvent()

void lmms::gui::PianoRoll::wheelEvent ( QWheelEvent * we)
overrideprotected

◆ yCoordOfKey()

int lmms::gui::PianoRoll::yCoordOfKey ( int key) const
private

◆ zoomingChanged

void lmms::gui::PianoRoll::zoomingChanged ( )
protectedslot

◆ zoomingYChanged

void lmms::gui::PianoRoll::zoomingYChanged ( )
protectedslot

◆ PianoRollWindow

friend class PianoRollWindow
friend

Member Data Documentation

◆ cm_scrollAmtHoriz

const int lmms::gui::PianoRoll::cm_scrollAmtHoriz = 10
staticprivate

◆ cm_scrollAmtVert

const int lmms::gui::PianoRoll::cm_scrollAmtVert = 1
staticprivate

◆ m_action

Action lmms::gui::PianoRoll::m_action
private

◆ m_backgroundShade

QColor lmms::gui::PianoRoll::m_backgroundShade
private

◆ m_barColor

QColor lmms::gui::PianoRoll::m_barColor
private

◆ m_barLineColor

QColor lmms::gui::PianoRoll::m_barLineColor
private

◆ m_beatLineColor

QColor lmms::gui::PianoRoll::m_beatLineColor
private

◆ m_blackKeyActiveBackground

QBrush lmms::gui::PianoRoll::m_blackKeyActiveBackground
private

◆ m_blackKeyDisabledBackground

QBrush lmms::gui::PianoRoll::m_blackKeyDisabledBackground
private

◆ m_blackKeyHeight

int lmms::gui::PianoRoll::m_blackKeyHeight
private

◆ m_blackKeyInactiveBackground

QBrush lmms::gui::PianoRoll::m_blackKeyInactiveBackground
private

◆ m_blackKeyWidth

int lmms::gui::PianoRoll::m_blackKeyWidth
private

◆ m_chordModel

ComboBoxModel lmms::gui::PianoRoll::m_chordModel
private

◆ m_ctrlMode

EditMode lmms::gui::PianoRoll::m_ctrlMode
private

◆ m_currentNote

Note* lmms::gui::PianoRoll::m_currentNote
private

◆ m_currentPosition

TimePos lmms::gui::PianoRoll::m_currentPosition
private

◆ m_currentStepNoteColor

QColor lmms::gui::PianoRoll::m_currentStepNoteColor
private

◆ m_doAutoQuantization

bool lmms::gui::PianoRoll::m_doAutoQuantization {false}
private

◆ m_editMode

EditMode lmms::gui::PianoRoll::m_editMode
private

◆ m_ghostNoteBorders

bool lmms::gui::PianoRoll::m_ghostNoteBorders
private

◆ m_ghostNoteColor

QColor lmms::gui::PianoRoll::m_ghostNoteColor
private

◆ m_ghostNoteOpacity

int lmms::gui::PianoRoll::m_ghostNoteOpacity
private

◆ m_ghostNotes

NoteVector lmms::gui::PianoRoll::m_ghostNotes
private

◆ m_ghostNoteTextColor

QColor lmms::gui::PianoRoll::m_ghostNoteTextColor
private

◆ m_gridMode

GridMode lmms::gui::PianoRoll::m_gridMode
private

◆ m_keyLineHeight

int lmms::gui::PianoRoll::m_keyLineHeight
private

◆ m_keyModel

ComboBoxModel lmms::gui::PianoRoll::m_keyModel
private

◆ m_knifeCutLineColor

QColor lmms::gui::PianoRoll::m_knifeCutLineColor
private

◆ m_knifeDown

bool lmms::gui::PianoRoll::m_knifeDown
private

◆ m_knifeEndKey

int lmms::gui::PianoRoll::m_knifeEndKey
private

◆ m_knifeEndTickPos

TimePos lmms::gui::PianoRoll::m_knifeEndTickPos
private

◆ m_knifeMode

EditMode lmms::gui::PianoRoll::m_knifeMode
private

◆ m_knifeStartKey

int lmms::gui::PianoRoll::m_knifeStartKey
private

◆ m_knifeStartTickPos

TimePos lmms::gui::PianoRoll::m_knifeStartTickPos
private

◆ m_lastKey

int lmms::gui::PianoRoll::m_lastKey
private

◆ m_lastMouseX

int lmms::gui::PianoRoll::m_lastMouseX
private

◆ m_lastMouseY

int lmms::gui::PianoRoll::m_lastMouseY
private

◆ m_lastNotePanning

panning_t lmms::gui::PianoRoll::m_lastNotePanning
private

◆ m_lastNoteVolume

volume_t lmms::gui::PianoRoll::m_lastNoteVolume
private

◆ m_lastParameterEditTick

std::optional<int> lmms::gui::PianoRoll::m_lastParameterEditTick = std::nullopt
private

Stores the last edited position for the note detuning/parameter curves. When erasing nodes when dragging the mouse, all nodes in the range of the last mouse pos to the current mouse pos are removed. Without this, when dragging the mouse super fast, some nodes could get missed; this ensures all nodes from the previous mouse position to the current one will get deleted.

◆ m_leftRightScroll

QScrollBar* lmms::gui::PianoRoll::m_leftRightScroll
private

◆ m_lenOfNewNotes

TimePos lmms::gui::PianoRoll::m_lenOfNewNotes
private

◆ m_lineColor

QColor lmms::gui::PianoRoll::m_lineColor
private

◆ m_markedSemitoneColor

QColor lmms::gui::PianoRoll::m_markedSemitoneColor
private

◆ m_markedSemiTones

QList<int> lmms::gui::PianoRoll::m_markedSemiTones
private

◆ m_midiClip

MidiClip* lmms::gui::PianoRoll::m_midiClip
private

◆ m_minResizeLen

TimePos lmms::gui::PianoRoll::m_minResizeLen
private

◆ m_mouseDownKey

int lmms::gui::PianoRoll::m_mouseDownKey
private

◆ m_mouseDownRight

bool lmms::gui::PianoRoll::m_mouseDownRight
private

◆ m_mouseDownTick

int lmms::gui::PianoRoll::m_mouseDownTick
private

◆ m_moveBoundaryBottom

int lmms::gui::PianoRoll::m_moveBoundaryBottom
private

◆ m_moveBoundaryLeft

int lmms::gui::PianoRoll::m_moveBoundaryLeft
private

◆ m_moveBoundaryRight

int lmms::gui::PianoRoll::m_moveBoundaryRight
private

◆ m_moveBoundaryTop

int lmms::gui::PianoRoll::m_moveBoundaryTop
private

◆ m_moveStartX

int lmms::gui::PianoRoll::m_moveStartX
private

◆ m_moveStartY

int lmms::gui::PianoRoll::m_moveStartY
private

◆ m_nemStr

std::vector<QString> lmms::gui::PianoRoll::m_nemStr
private

◆ m_noteBorders

bool lmms::gui::PianoRoll::m_noteBorders
private

◆ m_noteColor

QColor lmms::gui::PianoRoll::m_noteColor
private

◆ m_noteEditMenu

QMenu* lmms::gui::PianoRoll::m_noteEditMenu
private

◆ m_noteEditMode

NoteEditMode lmms::gui::PianoRoll::m_noteEditMode
private

◆ m_noteLenModel

ComboBoxModel lmms::gui::PianoRoll::m_noteLenModel
private

◆ m_noteModeColor

QColor lmms::gui::PianoRoll::m_noteModeColor
private

◆ m_noteOpacity

int lmms::gui::PianoRoll::m_noteOpacity
private

◆ m_notesEditHeight

int lmms::gui::PianoRoll::m_notesEditHeight
private

◆ m_noteTextColor

QColor lmms::gui::PianoRoll::m_noteTextColor
private

◆ m_outOfBoundsShade

QColor lmms::gui::PianoRoll::m_outOfBoundsShade
private

◆ m_parameterEditClickedNote

Note* lmms::gui::PianoRoll::m_parameterEditClickedNote
private

The current note whose detuning/parameter curve is being edited.

◆ m_parameterEditDownLeft

bool lmms::gui::PianoRoll::m_parameterEditDownLeft = false
private

Varaibles which hold which mouse buttons are being held while editing the detuning/parameter of notes.

◆ m_parameterEditDownRight

bool lmms::gui::PianoRoll::m_parameterEditDownRight = false
private

◆ m_pianoKeySelected

int lmms::gui::PianoRoll::m_pianoKeySelected
private

◆ m_pianoKeysVisible

int lmms::gui::PianoRoll::m_pianoKeysVisible
private

◆ m_positionLine

PositionLine* lmms::gui::PianoRoll::m_positionLine
private

◆ m_ppb

int lmms::gui::PianoRoll::m_ppb
private

◆ m_quantizeModel

ComboBoxModel lmms::gui::PianoRoll::m_quantizeModel
private

◆ m_recording

bool lmms::gui::PianoRoll::m_recording
private

◆ m_recordingNotes

QList<Note> lmms::gui::PianoRoll::m_recordingNotes
private

◆ m_scaleModel

ComboBoxModel lmms::gui::PianoRoll::m_scaleModel
private

◆ m_scrollBack

bool lmms::gui::PianoRoll::m_scrollBack
private

◆ m_selectedChords

std::vector<NoteVector> lmms::gui::PianoRoll::m_selectedChords
private

Stores the chords for the strum tool.

◆ m_selectedKeys

int lmms::gui::PianoRoll::m_selectedKeys
private

◆ m_selectedNoteColor

QColor lmms::gui::PianoRoll::m_selectedNoteColor
private

◆ m_selectedTick

int lmms::gui::PianoRoll::m_selectedTick
private

◆ m_selectStartKey

int lmms::gui::PianoRoll::m_selectStartKey
private

◆ m_selectStartTick

int lmms::gui::PianoRoll::m_selectStartTick
private

◆ m_semiToneMarkerMenu

QMenu* lmms::gui::PianoRoll::m_semiToneMarkerMenu
private

◆ m_snapModel

ComboBoxModel lmms::gui::PianoRoll::m_snapModel
private

◆ m_startedWithShift

bool lmms::gui::PianoRoll::m_startedWithShift
private

◆ m_startKey

int lmms::gui::PianoRoll::m_startKey
private

◆ m_stepNoteColor

QColor lmms::gui::PianoRoll::m_stepNoteColor
private

◆ m_stepRecorder

StepRecorder lmms::gui::PianoRoll::m_stepRecorder
private

◆ m_stepRecorderWidget

StepRecorderWidget lmms::gui::PianoRoll::m_stepRecorderWidget
private

◆ m_strumCurrentTime

TimePos lmms::gui::PianoRoll::m_strumCurrentTime
private

◆ m_strumCurrentVertical

int lmms::gui::PianoRoll::m_strumCurrentVertical = 0
private

◆ m_strumEnabled

bool lmms::gui::PianoRoll::m_strumEnabled = false
private

◆ m_strumHeightRatio

float lmms::gui::PianoRoll::m_strumHeightRatio = 0.0f
private

◆ m_strumMode

EditMode lmms::gui::PianoRoll::m_strumMode
private

◆ m_strumStartTime

TimePos lmms::gui::PianoRoll::m_strumStartTime
private

◆ m_strumStartVertical

int lmms::gui::PianoRoll::m_strumStartVertical = 0
private

◆ m_textColor

QColor lmms::gui::PianoRoll::m_textColor
private

◆ m_textColorLight

QColor lmms::gui::PianoRoll::m_textColorLight
private

◆ m_textShadow

QColor lmms::gui::PianoRoll::m_textShadow
private

◆ m_timeLine

TimeLineWidget* lmms::gui::PianoRoll::m_timeLine
private

◆ m_toolDraw

QPixmap lmms::gui::PianoRoll::m_toolDraw = embed::getIconPixmap("edit_draw")
private

◆ m_toolErase

QPixmap lmms::gui::PianoRoll::m_toolErase = embed::getIconPixmap("edit_erase")
private

◆ m_toolKnife

QPixmap lmms::gui::PianoRoll::m_toolKnife = embed::getIconPixmap("edit_knife")
private

◆ m_toolMove

QPixmap lmms::gui::PianoRoll::m_toolMove = embed::getIconPixmap("edit_move")
private

◆ m_toolOpen

QPixmap lmms::gui::PianoRoll::m_toolOpen = embed::getIconPixmap("automation")
private

◆ m_toolSelect

QPixmap lmms::gui::PianoRoll::m_toolSelect = embed::getIconPixmap("edit_select")
private

◆ m_toolStrum

QPixmap lmms::gui::PianoRoll::m_toolStrum = embed::getIconPixmap("arp_free")
private

◆ m_topBottomScroll

QScrollBar* lmms::gui::PianoRoll::m_topBottomScroll
private

◆ m_totalKeysToScroll

int lmms::gui::PianoRoll::m_totalKeysToScroll
private

◆ m_userSetNotesEditHeight

int lmms::gui::PianoRoll::m_userSetNotesEditHeight
private

◆ m_whiteKeyActiveBackground

QBrush lmms::gui::PianoRoll::m_whiteKeyActiveBackground
private

◆ m_whiteKeyActiveTextColor

QColor lmms::gui::PianoRoll::m_whiteKeyActiveTextColor
private

◆ m_whiteKeyActiveTextShadow

QColor lmms::gui::PianoRoll::m_whiteKeyActiveTextShadow
private

◆ m_whiteKeyBigHeight

int lmms::gui::PianoRoll::m_whiteKeyBigHeight
private

◆ m_whiteKeyDisabledBackground

QBrush lmms::gui::PianoRoll::m_whiteKeyDisabledBackground
private

◆ m_whiteKeyInactiveBackground

QBrush lmms::gui::PianoRoll::m_whiteKeyInactiveBackground
private

◆ m_whiteKeyInactiveTextColor

QColor lmms::gui::PianoRoll::m_whiteKeyInactiveTextColor
private

◆ m_whiteKeyInactiveTextShadow

QColor lmms::gui::PianoRoll::m_whiteKeyInactiveTextShadow
private

◆ m_whiteKeySmallHeight

int lmms::gui::PianoRoll::m_whiteKeySmallHeight
private

◆ m_whiteKeyWidth

int lmms::gui::PianoRoll::m_whiteKeyWidth
private

◆ m_zoomingModel

ComboBoxModel lmms::gui::PianoRoll::m_zoomingModel
private

◆ m_zoomingYModel

ComboBoxModel lmms::gui::PianoRoll::m_zoomingYModel
private

◆ m_zoomLevels

const std::vector< float > lmms::gui::PianoRoll::m_zoomLevels
staticprivate
Initial value:
=
{0.125f, 0.25f, 0.5f, 1.0f, 1.5f, 2.0f, 4.0f, 8.0f}

◆ m_zoomYLevels

const std::vector< float > lmms::gui::PianoRoll::m_zoomYLevels
staticprivate
Initial value:
=
{0.25f, 0.5f, 1.0f, 1.5f, 2.0f, 2.5f, 3.0f, 4.0f}

◆ prKeyOrder

◆ s_textFloat

SimpleTextFloat * lmms::gui::PianoRoll::s_textFloat = nullptr
staticprivate

Property Documentation

◆ backgroundShade

QColor lmms::gui::PianoRoll::backgroundShade

◆ barColor

QColor lmms::gui::PianoRoll::barColor

◆ barLineColor

QColor lmms::gui::PianoRoll::barLineColor

◆ beatLineColor

QColor lmms::gui::PianoRoll::beatLineColor

◆ blackKeyActiveBackground

QBrush lmms::gui::PianoRoll::blackKeyActiveBackground

◆ blackKeyDisabledBackground

QBrush lmms::gui::PianoRoll::blackKeyDisabledBackground

◆ blackKeyInactiveBackground

QBrush lmms::gui::PianoRoll::blackKeyInactiveBackground

◆ blackKeyWidth

int lmms::gui::PianoRoll::blackKeyWidth

◆ currentStepNoteColor

QColor lmms::gui::PianoRoll::currentStepNoteColor

◆ ghostNoteBorders

bool lmms::gui::PianoRoll::ghostNoteBorders

◆ ghostNoteColor

QColor lmms::gui::PianoRoll::ghostNoteColor

◆ ghostNoteOpacity

int lmms::gui::PianoRoll::ghostNoteOpacity

◆ ghostNoteTextColor

QColor lmms::gui::PianoRoll::ghostNoteTextColor

◆ knifeCutLine

QColor lmms::gui::PianoRoll::knifeCutLine

◆ lineColor

QColor lmms::gui::PianoRoll::lineColor

◆ markedSemitoneColor

QColor lmms::gui::PianoRoll::markedSemitoneColor

◆ noteBorders

bool lmms::gui::PianoRoll::noteBorders

◆ noteColor

QColor lmms::gui::PianoRoll::noteColor

◆ noteModeColor

QColor lmms::gui::PianoRoll::noteModeColor

◆ noteOpacity

int lmms::gui::PianoRoll::noteOpacity

◆ noteTextColor

QColor lmms::gui::PianoRoll::noteTextColor

◆ outOfBoundsShade

QColor lmms::gui::PianoRoll::outOfBoundsShade

◆ selectedNoteColor

QColor lmms::gui::PianoRoll::selectedNoteColor

◆ stepNoteColor

QColor lmms::gui::PianoRoll::stepNoteColor

◆ textColor

QColor lmms::gui::PianoRoll::textColor

◆ textColorLight

QColor lmms::gui::PianoRoll::textColorLight

◆ textShadow

QColor lmms::gui::PianoRoll::textShadow

◆ whiteKeyActiveBackground

QBrush lmms::gui::PianoRoll::whiteKeyActiveBackground

◆ whiteKeyActiveTextColor

QColor lmms::gui::PianoRoll::whiteKeyActiveTextColor

◆ whiteKeyActiveTextShadow

QColor lmms::gui::PianoRoll::whiteKeyActiveTextShadow

◆ whiteKeyDisabledBackground

QBrush lmms::gui::PianoRoll::whiteKeyDisabledBackground

◆ whiteKeyInactiveBackground

QBrush lmms::gui::PianoRoll::whiteKeyInactiveBackground

◆ whiteKeyInactiveTextColor

QColor lmms::gui::PianoRoll::whiteKeyInactiveTextColor

◆ whiteKeyInactiveTextShadow

QColor lmms::gui::PianoRoll::whiteKeyInactiveTextShadow

◆ whiteKeyWidth

int lmms::gui::PianoRoll::whiteKeyWidth

The documentation for this class was generated from the following files: