Piano roll serializable backend.
More...
#include <src/structure/arrangement/piano_roll.h>
|
|
| PianoRoll (QObject *parent=nullptr) |
| auto | getEditorSettings () 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_.
|
|
void | set_notes_zoom (float notes_zoom, bool fire_events) |
|
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 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) |
Piano roll serializable backend.
The actual widgets should reflect the information here.
Definition at line 74 of file piano_roll.h.
◆ Highlighting
◆ get_visible_notes()
| void zrythm::structure::arrangement::PianoRoll::get_visible_notes |
( |
bool | drum_mode, |
|
|
std::vector< MidiNoteDescriptor > & | vec ) |
|
inline |
◆ getEditorSettings()
| auto zrythm::structure::arrangement::PianoRoll::getEditorSettings |
( |
| ) |
const |
|
inline |
◆ getKeyHeight()
| int zrythm::structure::arrangement::PianoRoll::getKeyHeight |
( |
| ) |
const |
|
inline |
◆ isBlackKey()
| Q_INVOKABLE constexpr bool zrythm::structure::arrangement::PianoRoll::isBlackKey |
( |
int | note | ) |
|
|
inlinestaticconstexpr |
◆ isNextKeyBlack()
| Q_INVOKABLE constexpr bool zrythm::structure::arrangement::PianoRoll::isNextKeyBlack |
( |
int | note | ) |
|
|
inlinestaticconstexpr |
◆ isNextKeyWhite()
| Q_INVOKABLE constexpr bool zrythm::structure::arrangement::PianoRoll::isNextKeyWhite |
( |
int | note | ) |
|
|
inlinestaticconstexpr |
◆ isPrevKeyBlack()
| Q_INVOKABLE constexpr bool zrythm::structure::arrangement::PianoRoll::isPrevKeyBlack |
( |
int | note | ) |
|
|
inlinestaticconstexpr |
◆ isPrevKeyWhite()
| Q_INVOKABLE constexpr bool zrythm::structure::arrangement::PianoRoll::isPrevKeyWhite |
( |
int | note | ) |
|
|
inlinestaticconstexpr |
◆ isWhiteKey()
| Q_INVOKABLE constexpr bool zrythm::structure::arrangement::PianoRoll::isWhiteKey |
( |
int | note | ) |
|
|
inlinestaticconstexpr |
◆ from_json
| void from_json |
( |
const nlohmann::json & | j, |
|
|
PianoRoll & | piano_roll ) |
|
friend |
◆ init_from
◆ to_json
| void to_json |
( |
nlohmann::json & | j, |
|
|
const PianoRoll & | piano_roll ) |
|
friend |
◆ current_notes_
| std::vector<int> zrythm::structure::arrangement::PianoRoll::current_notes_ |
Currently pressed notes (used only at runtime).
Definition at line 254 of file piano_roll.h.
◆ drum_descriptors_
| std::vector<MidiNoteDescriptor> zrythm::structure::arrangement::PianoRoll::drum_descriptors_ |
Initial value:=
std::vector<MidiNoteDescriptor> (128)
Drum mode descriptors.
These must be sorted by index at all times.
For performance purposes, invisible notes must be sorted at the end of the array.
Definition at line 278 of file piano_roll.h.
◆ editor_settings_
◆ highlighting_
| Highlighting zrythm::structure::arrangement::PianoRoll::highlighting_ = Highlighting::None |
◆ midi_modifier_
| MidiModifier zrythm::structure::arrangement::PianoRoll::midi_modifier_ = MidiModifier::Velocity |
◆ note_height_
| int zrythm::structure::arrangement::PianoRoll::note_height_ { 16 } |
Visual height per key in pixels.
Definition at line 248 of file piano_roll.h.
◆ notes_zoom_
| float zrythm::structure::arrangement::PianoRoll::notes_zoom_ = 1.0f |
◆ piano_descriptors_
| std::vector<MidiNoteDescriptor> zrythm::structure::arrangement::PianoRoll::piano_descriptors_ |
Initial value:=
std::vector<MidiNoteDescriptor> (128)
Piano roll mode descriptors.
For performance purposes, invisible notes must be sorted at the end of the array.
Definition at line 262 of file piano_roll.h.
◆ editorSettings
◆ keyHeight
| int zrythm::structure::arrangement::PianoRoll::keyHeight |
|
read |
The documentation for this class was generated from the following file: