|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Piano roll serializable backend. More...
#include <src/gui/backend/backend/piano_roll.h>


Public Types | |
| enum class | Highlighting : std::uint8_t { None , Chord , Scale , Both } |
| Highlighting for the piano roll. More... | |
Public Member Functions | |
| PianoRoll (const structure::arrangement::ArrangerObjectRegistry ®istry, QObject *parent=nullptr) | |
| gui::backend::EditorSettings * | getEditorSettings () const |
| gui::backend::ArrangerObjectSelectionManager * | selectionManager () const |
| int | getKeyHeight () const |
| Q_SIGNAL void | keyHeightChanged () |
| Q_INVOKABLE int | getKeyAtY (double y) const |
| void | add_current_note (int note) |
| Adds the note if it doesn't exist in current_notes_. | |
| void | remove_current_note (int note) |
| Removes the note if it exists in current_notes_. | |
| bool | contains_current_note (int note) |
| Returns whether the note exists in current_notes_. | |
| structure::tracks::Track * | get_current_track () const |
| Returns the current track whose regions are being shown in the piano roll. | |
| void | set_notes_zoom (float notes_zoom, bool fire_events) |
| void | init_loaded () |
| Inits the PianoRoll after a Project has been loaded. | |
| const MidiNoteDescriptor * | find_midi_note_descriptor_by_val (bool drum_mode, uint8_t val) |
| Returns the MidiNoteDescriptor matching the value (0-127). | |
| void | set_highlighting (Highlighting highlighting) |
| Updates the highlighting and notifies the UI. | |
| void | set_midi_modifier (MidiModifier modifier) |
| Sets the MIDI modifier. | |
| void | get_visible_notes (bool drum_mode, std::vector< MidiNoteDescriptor > &vec) |
| Gets the visible notes. | |
| void | init () |
| Initializes the PianoRoll. | |
Static Public Member Functions | |
| static Q_INVOKABLE constexpr bool | isBlackKey (int note) |
| Returns if the key is black. | |
| static Q_INVOKABLE constexpr bool | isWhiteKey (int note) |
| static Q_INVOKABLE constexpr bool | isNextKeyBlack (int note) |
| static Q_INVOKABLE constexpr bool | isNextKeyWhite (int note) |
| static Q_INVOKABLE constexpr bool | isPrevKeyBlack (int note) |
| static Q_INVOKABLE constexpr bool | isPrevKeyWhite (int note) |
Data Fields | |
| utils::QObjectUniquePtr< gui::backend::EditorSettings > | editor_settings_ |
| float | notes_zoom_ = 1.0f |
| Notes zoom level. | |
| int | note_height_ { 16 } |
| Visual height per key in pixels. | |
| MidiModifier | midi_modifier_ = MidiModifier::Velocity |
| Selected MidiModifier. | |
| std::vector< int > | current_notes_ |
| Currently pressed notes (used only at runtime). | |
| std::vector< MidiNoteDescriptor > | piano_descriptors_ |
| Piano roll mode descriptors. | |
| Highlighting | highlighting_ = Highlighting::None |
| Highlighting notes depending on the current chord or scale. | |
| std::vector< MidiNoteDescriptor > | drum_descriptors_ |
| Drum mode descriptors. | |
| utils::QObjectUniquePtr< gui::backend::ArrangerObjectSelectionManager > | selection_manager_ |
Properties | |
| QML_ELEMENT zrythm::gui::backend::EditorSettings * | editorSettings |
| zrythm::gui::backend::ArrangerObjectSelectionManager * | selectionManager |
| int | keyHeight |
Friends | |
| void | init_from (PianoRoll &obj, const PianoRoll &other, utils::ObjectCloneType clone_type) |
| void | to_json (nlohmann::json &j, const PianoRoll &piano_roll) |
| void | from_json (const nlohmann::json &j, PianoRoll &piano_roll) |
Piano roll serializable backend.
The actual widgets should reflect the information here.
Definition at line 87 of file piano_roll.h.