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

Backend for the chord editor. More...

#include <src/structure/arrangement/chord_editor.h>

Inheritance diagram for zrythm::structure::arrangement::ChordEditor:
Collaboration diagram for zrythm::structure::arrangement::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 (QObject *parent=nullptr)
auto getEditorSettings () 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_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

zrythm::structure::arrangement::EditorSettingseditorSettings

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 21 of file chord_editor.h.

Member Typedef Documentation

◆ ChordAccent

using zrythm::structure::arrangement::ChordEditor::ChordAccent = dsp::ChordAccent

Definition at line 30 of file chord_editor.h.

◆ ChordDescriptor

using zrythm::structure::arrangement::ChordEditor::ChordDescriptor = dsp::ChordDescriptor

Definition at line 29 of file chord_editor.h.

◆ ChordType

using zrythm::structure::arrangement::ChordEditor::ChordType = dsp::ChordType

Definition at line 31 of file chord_editor.h.

◆ MusicalNote

using zrythm::structure::arrangement::ChordEditor::MusicalNote = dsp::MusicalNote

Definition at line 33 of file chord_editor.h.

◆ MusicalScale

using zrythm::structure::arrangement::ChordEditor::MusicalScale = dsp::MusicalScale

Definition at line 32 of file chord_editor.h.

Member Function Documentation

◆ add_chord_descriptor()

void zrythm::structure::arrangement::ChordEditor::add_chord_descriptor ( ChordDescriptor && chord_descr)
inline

Definition at line 83 of file chord_editor.h.

◆ get_chord_at_index() [1/2]

auto & zrythm::structure::arrangement::ChordEditor::get_chord_at_index ( size_t index)
inline

Definition at line 70 of file chord_editor.h.

◆ get_chord_at_index() [2/2]

auto & zrythm::structure::arrangement::ChordEditor::get_chord_at_index ( size_t index) const
inline

Definition at line 71 of file chord_editor.h.

◆ getEditorSettings()

auto zrythm::structure::arrangement::ChordEditor::getEditorSettings ( ) const
inline

Definition at line 41 of file chord_editor.h.

◆ replace_chord_descriptor()

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

Definition at line 90 of file chord_editor.h.

◆ from_json

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

Definition at line 105 of file chord_editor.h.

◆ init_from

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

Definition at line 73 of file chord_editor.h.

◆ to_json

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

Definition at line 100 of file chord_editor.h.

Field Documentation

◆ chords_

std::vector<ChordDescriptor> zrythm::structure::arrangement::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 118 of file chord_editor.h.

Property Documentation

◆ editorSettings

zrythm::structure::arrangement::EditorSettings * zrythm::structure::arrangement::ChordEditor::editorSettings
read

Definition at line 24 of file chord_editor.h.


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