Ardour  9.2-541-gc1841a13dd
ARDOUR::ChordProvider Class Referenceabstract

#include <chord_provider.h>

Inheritance diagram for ARDOUR::ChordProvider:
[legend]

Public Types

enum  TET12Intervals {
  Unison = 0 , MinorSecond = 1 , MajorSecond = 2 , MinorThird = 3 ,
  MajorThird = 4 , PerfectFourth = 5 , Tritone = 6 , PerfectFifth = 7 ,
  MinorSixth = 8 , MajorSixth = 9 , MinorSeventh = 10 , MajorSeventh = 11 ,
  PerfectOctave = 12 , P0 = PerfectOctave , m2 = MinorSecond , M2 = MajorSecond ,
  m3 = MinorThird , M3 = MajorThird , P4 = PerfectFourth , A4 = Tritone ,
  d5 = Tritone , P5 = PerfectFifth , m6 = MinorSixth , M6 = MajorSixth ,
  m7 = MinorSeventh , M7 = MajorSeventh , P8 = PerfectOctave , flat2 = MinorSecond ,
  fourth = PerfectFourth , flat5 = Tritone , sharp5 = MinorSixth , dom7 = MinorSeventh ,
  dblflat7 = MajorSixth , AugmentedFifth = 8 , DiminishedFifth = 6 , DiminishedSeventh = 9 ,
  MajorNinth = 14 , M9 = 14 , PerfectEleventh = 17 , P11 = 17 ,
  MajorThirteenth = 21 , M13 = 21
}
 
typedef std::vector< int > Intervals
 
typedef std::map< int64_t, std::string > IntervalsToChordName
 
typedef std::map< std::string, IntervalsChordNameToIntervals
 

Public Member Functions

 ChordProvider ()
 
virtual ~ChordProvider ()
 
virtual bool get_midi_chord (int root_pitch, Intervals &pitches) const =0
 
std::string identify_chord (Intervals const &)
 

Static Public Member Functions

static void build_12tet_chords ()
 
template<typename... Names>
static void register_12tet_chord (Intervals const &intervals, std::string const &canonical_name, Names...chord_names)
 

Static Public Attributes

static IntervalsToChordName tet12_names
 
static ChordNameToIntervals tet12_chords
 

Detailed Description

Definition at line 29 of file chord_provider.h.

Member Typedef Documentation

◆ ChordNameToIntervals

Definition at line 44 of file chord_provider.h.

◆ Intervals

typedef std::vector<int> ARDOUR::ChordProvider::Intervals

Definition at line 35 of file chord_provider.h.

◆ IntervalsToChordName

typedef std::map<int64_t, std::string> ARDOUR::ChordProvider::IntervalsToChordName

Definition at line 40 of file chord_provider.h.

Member Enumeration Documentation

◆ TET12Intervals

Enumerator
Unison 
MinorSecond 
MajorSecond 
MinorThird 
MajorThird 
PerfectFourth 
Tritone 
PerfectFifth 
MinorSixth 
MajorSixth 
MinorSeventh 
MajorSeventh 
PerfectOctave 
P0 
m2 
M2 
m3 
M3 
P4 
A4 
d5 
P5 
m6 
M6 
m7 
M7 
P8 
flat2 
fourth 
flat5 
sharp5 
dom7 
dblflat7 
AugmentedFifth 
DiminishedFifth 
DiminishedSeventh 
MajorNinth 
M9 
PerfectEleventh 
P11 
MajorThirteenth 
M13 

Definition at line 52 of file chord_provider.h.

Constructor & Destructor Documentation

◆ ChordProvider()

ARDOUR::ChordProvider::ChordProvider ( )
inline

Definition at line 32 of file chord_provider.h.

◆ ~ChordProvider()

virtual ARDOUR::ChordProvider::~ChordProvider ( )
inlinevirtual

Definition at line 33 of file chord_provider.h.

Member Function Documentation

◆ build_12tet_chords()

static void ARDOUR::ChordProvider::build_12tet_chords ( )
static

◆ get_midi_chord()

virtual bool ARDOUR::ChordProvider::get_midi_chord ( int  root_pitch,
Intervals pitches 
) const
pure virtual

Implemented in Pianoroll, EditingContext, and ChordBox.

◆ identify_chord()

std::string ARDOUR::ChordProvider::identify_chord ( Intervals const &  )

◆ register_12tet_chord()

template<typename... Names>
static void ARDOUR::ChordProvider::register_12tet_chord ( Intervals const &  intervals,
std::string const &  canonical_name,
Names...  chord_names 
)
static

Member Data Documentation

◆ tet12_chords

ChordNameToIntervals ARDOUR::ChordProvider::tet12_chords
static

Definition at line 45 of file chord_provider.h.

◆ tet12_names

IntervalsToChordName ARDOUR::ChordProvider::tet12_names
static

Definition at line 41 of file chord_provider.h.


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