Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
ChordEditor Class Reference

Backend for the chord editor. More...

#include <src/gui/backend/backend/chord_editor.h>

Inheritance diagram for ChordEditor:
Collaboration diagram for ChordEditor:

Public Types

using ChordDescriptor = dsp::ChordDescriptor
using ChordAccent = dsp::ChordAccent
using ChordType = dsp::ChordType
using MusicalScale = dsp::MusicalScale
using MusicalNote = dsp::MusicalNote

Public Member Functions

 ChordEditor (const structure::arrangement::ArrangerObjectRegistry &registry, QObject *parent=nullptr)
gui::backend::EditorSettingsgetEditorSettings () const
gui::backend::ArrangerObjectSelectionManagerselectionManager () const
void init ()
 Initializes the ChordEditor.
void apply_single_chord (const ChordDescriptor &chord, int idx, bool undoable)
void apply_chords (const std::vector< ChordDescriptor > &chords, bool undoable)
void apply_preset (const ChordPreset &pset, bool undoable)
void apply_preset_from_scale (MusicalScale::ScaleType scale, MusicalNote root_note, bool undoable)
void transpose_chords (bool up, bool undoable)
ChordDescriptor * get_chord_from_note_number (midi_byte_t note_number)
 Returns the ChordDescriptor for the given note number, otherwise NULL if the given note number is not in the proper range.
int get_chord_index (const ChordDescriptor &chord) const
auto & get_chord_at_index (size_t index)
auto & get_chord_at_index (size_t index) const
void add_chord_descriptor (ChordDescriptor &&chord_descr)
void replace_chord_descriptor (const auto index, ChordDescriptor &&chord_descr)

Data Fields

std::vector< ChordDescriptor > chords_
 The chords to show on the left.

Properties

gui::backend::EditorSettingseditorSettings
zrythm::gui::backend::ArrangerObjectSelectionManagerselectionManager

Friends

void init_from (ChordEditor &obj, const ChordEditor &other, utils::ObjectCloneType clone_type)
void to_json (nlohmann::json &j, const ChordEditor &editor)
void from_json (const nlohmann::json &j, ChordEditor &editor)

Detailed Description

Backend for the chord editor.

Definition at line 36 of file chord_editor.h.

Member Typedef Documentation

◆ ChordAccent

using ChordEditor::ChordAccent = dsp::ChordAccent

Definition at line 46 of file chord_editor.h.

◆ ChordDescriptor

using ChordEditor::ChordDescriptor = dsp::ChordDescriptor

Definition at line 45 of file chord_editor.h.

◆ ChordType

using ChordEditor::ChordType = dsp::ChordType

Definition at line 47 of file chord_editor.h.

◆ MusicalNote

using ChordEditor::MusicalNote = dsp::MusicalNote

Definition at line 49 of file chord_editor.h.

◆ MusicalScale

using ChordEditor::MusicalScale = dsp::MusicalScale

Definition at line 48 of file chord_editor.h.

Constructor & Destructor Documentation

◆ ChordEditor()

ChordEditor::ChordEditor ( const structure::arrangement::ArrangerObjectRegistry & registry,
QObject * parent = nullptr )
inline

Definition at line 51 of file chord_editor.h.

Member Function Documentation

◆ add_chord_descriptor()

void ChordEditor::add_chord_descriptor ( ChordDescriptor && chord_descr)
inline

Definition at line 117 of file chord_editor.h.

◆ get_chord_at_index() [1/2]

auto & ChordEditor::get_chord_at_index ( size_t index)
inline

Definition at line 104 of file chord_editor.h.

◆ get_chord_at_index() [2/2]

auto & ChordEditor::get_chord_at_index ( size_t index) const
inline

Definition at line 105 of file chord_editor.h.

◆ getEditorSettings()

gui::backend::EditorSettings * ChordEditor::getEditorSettings ( ) const
inline

Definition at line 65 of file chord_editor.h.

◆ replace_chord_descriptor()

void ChordEditor::replace_chord_descriptor ( const auto index,
ChordDescriptor && chord_descr )
inline

Definition at line 124 of file chord_editor.h.

◆ selectionManager()

gui::backend::ArrangerObjectSelectionManager * ChordEditor::selectionManager ( ) const
inline

Definition at line 70 of file chord_editor.h.

◆ from_json

void from_json ( const nlohmann::json & j,
ChordEditor & editor )
friend

Definition at line 139 of file chord_editor.h.

◆ init_from

void init_from ( ChordEditor & obj,
const ChordEditor & other,
utils::ObjectCloneType clone_type )
friend

Definition at line 107 of file chord_editor.h.

◆ to_json

void to_json ( nlohmann::json & j,
const ChordEditor & editor )
friend

Definition at line 134 of file chord_editor.h.

Field Documentation

◆ chords_

std::vector<ChordDescriptor> ChordEditor::chords_

The chords to show on the left.

Currently fixed to 12 chords whose order cannot be edited. Chords cannot be added or removed.

Definition at line 152 of file chord_editor.h.

Property Documentation

◆ editorSettings

gui::backend::EditorSettings * ChordEditor::editorSettings
read

Definition at line 39 of file chord_editor.h.

◆ selectionManager

zrythm::gui::backend::ArrangerObjectSelectionManager * ChordEditor::selectionManager
read

Definition at line 40 of file chord_editor.h.


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