|
lmms
Cross-platform music production software
|
#include <PianoRoll.h>
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 MidiClip * | currentMidiClip () 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 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 ¬eCol, const QColor ¬eTextColor, 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 | |
| void | autoScroll (const TimePos &t) |
| TimePos | newNoteLen () const |
| void | shiftPos (int amount) |
| void | shiftPos (const NoteVector ¬es, int amount) |
| void | shiftSemiTone (int amount) |
| void | shiftSemiTone (const NoteVector ¬es, 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< int > | getAllOctavesForKey (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) |
| int | resizeGripWidth (const Note ¬e) const |
| const NoteVector & | ghostNotes () const |
| void | adjustLeftRightScoll (int value) |
| void | copyToClipboard (const NoteVector ¬es) const |
| void | drawDetuningInfo (QPainter &_p, const Note *_n, int _x, int _y) const |
| bool | mouseOverNote () |
| Note * | noteUnderMouse () |
| Note * | parameterEditNoteUnderMouse (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. | |
Static Private Attributes | |
| static const int | cm_scrollAmtHoriz = 10 |
| static const int | cm_scrollAmtVert = 1 |
| static std::array< KeyType, 12 > | prKeyOrder |
| static SimpleTextFloat * | s_textFloat = nullptr |
| static const std::vector< float > | m_zoomLevels |
| static const std::vector< float > | m_zoomYLevels |
Friends | |
| class | PianoRollWindow |
|
strongprivate |
|
strong |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprotected |
|
strongprotected |
|
private |
|
private |
|
overrideprivate |
|
private |
|
private |
Finishes the dragging of the current node of the detuning/parameter curves.
|
private |
|
private |
|
private |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
private |
|
private |
|
protectedslot |
|
protectedslot |
|
private |
|
inline |
|
signal |
|
protectedslot |
|
protectedslot |
| Song::PlayMode lmms::gui::PianoRoll::desiredPlayModeForAccompany | ( | ) | const |
|
private |
|
private |
|
protected |
|
protected |
|
protectedslot |
|
protectedslot |
|
overrideprotected |
|
overrideprotected |
|
private |
|
private |
|
protected |
|
signal |
|
inlineprivate |
|
protectedslot |
|
inline |
|
protectedslot |
|
protectedslot |
|
inline |
|
private |
|
inline |
|
private |
|
private |
|
protectedslot |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
| void lmms::gui::PianoRoll::loadGhostNotes | ( | const QDomElement & | de | ) |
| void lmms::gui::PianoRoll::loadMarkedSemiTones | ( | const QDomElement & | de | ) |
|
protectedslot |
|
overrideprotected |
|
overrideprotected |
|
private |
|
overrideprotected |
|
overrideprotected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protectedslot |
|
private |
|
overrideprotected |
|
private |
Calculates the closest note to the mouse given their parameter automation curve.
|
protectedslot |
|
private |
|
private |
|
protectedslot |
|
private |
| int lmms::gui::PianoRoll::quantization | ( | ) | const |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protected |
| void lmms::gui::PianoRoll::reset | ( | ) |
Resets settings to default when e.g. creating a new project.
|
overrideprotected |
|
private |
|
protectedslot |
|
protected |
|
private |
|
protected |
|
protectedslot |
|
signal |
|
signal |
| void lmms::gui::PianoRoll::setCurrentMidiClip | ( | MidiClip * | newMidiClip | ) |
|
protectedslot |
| void lmms::gui::PianoRoll::setGhostMidiClip | ( | MidiClip * | newMidiClip | ) |
|
private |
|
private |
|
private |
Computes which notes belong to which chords from the selection.
|
private |
|
private |
|
private |
|
private |
| void lmms::gui::PianoRoll::showPanTextFloat | ( | panning_t | pan, |
| const QPoint & | pos, | ||
| int | timeout = -1 ) |
| void lmms::gui::PianoRoll::showTextFloat | ( | const QString & | text, |
| const QPoint & | pos, | ||
| int | timeout = -1 ) |
| void lmms::gui::PianoRoll::showVolTextFloat | ( | volume_t | vol, |
| const QPoint & | pos, | ||
| int | timeout = -1 ) |
|
protectedslot |
|
protectedslot |
|
inline |
|
private |
|
private |
|
protectedslot |
| int lmms::gui::PianoRoll::trackOctaveSize | ( | ) | const |
|
private |
|
private |
Updates the currently dragged node position in the detuning/parameter curves of the selected notes.
|
protectedslot |
|
protectedslot |
|
private |
|
private |
|
protectedslot |
|
private |
|
protectedslot |
|
private |
Handles updating all of the note positions when performing a strum.
|
protected |
|
protectedslot |
|
overrideprotected |
|
private |
|
protectedslot |
|
protectedslot |
|
friend |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
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.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
The current note whose detuning/parameter curve is being edited.
|
private |
Varaibles which hold which mouse buttons are being held while editing the detuning/parameter of notes.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Stores the chords for the strum tool.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
| QColor lmms::gui::PianoRoll::backgroundShade |
| QColor lmms::gui::PianoRoll::barColor |
| QColor lmms::gui::PianoRoll::barLineColor |
| QColor lmms::gui::PianoRoll::beatLineColor |
| QBrush lmms::gui::PianoRoll::blackKeyActiveBackground |
| QBrush lmms::gui::PianoRoll::blackKeyDisabledBackground |
| QBrush lmms::gui::PianoRoll::blackKeyInactiveBackground |
| int lmms::gui::PianoRoll::blackKeyWidth |
| QColor lmms::gui::PianoRoll::currentStepNoteColor |
| bool lmms::gui::PianoRoll::ghostNoteBorders |
| QColor lmms::gui::PianoRoll::ghostNoteColor |
| int lmms::gui::PianoRoll::ghostNoteOpacity |
| QColor lmms::gui::PianoRoll::ghostNoteTextColor |
| QColor lmms::gui::PianoRoll::knifeCutLine |
| QColor lmms::gui::PianoRoll::lineColor |
| QColor lmms::gui::PianoRoll::markedSemitoneColor |
| bool lmms::gui::PianoRoll::noteBorders |
| QColor lmms::gui::PianoRoll::noteColor |
| QColor lmms::gui::PianoRoll::noteModeColor |
| int lmms::gui::PianoRoll::noteOpacity |
| QColor lmms::gui::PianoRoll::noteTextColor |
| QColor lmms::gui::PianoRoll::outOfBoundsShade |
| QColor lmms::gui::PianoRoll::selectedNoteColor |
| QColor lmms::gui::PianoRoll::stepNoteColor |
| QColor lmms::gui::PianoRoll::textColor |
| QColor lmms::gui::PianoRoll::textColorLight |
| QColor lmms::gui::PianoRoll::textShadow |
| QBrush lmms::gui::PianoRoll::whiteKeyActiveBackground |
| QColor lmms::gui::PianoRoll::whiteKeyActiveTextColor |
| QColor lmms::gui::PianoRoll::whiteKeyActiveTextShadow |
| QBrush lmms::gui::PianoRoll::whiteKeyDisabledBackground |
| QBrush lmms::gui::PianoRoll::whiteKeyInactiveBackground |
| QColor lmms::gui::PianoRoll::whiteKeyInactiveTextColor |
| QColor lmms::gui::PianoRoll::whiteKeyInactiveTextShadow |
| int lmms::gui::PianoRoll::whiteKeyWidth |