Ardour  9.2-654-gd2ed0bd940
ARDOUR::ChordProvider Class Referenceabstract

#include <chord_provider.h>

Inheritance diagram for ARDOUR::ChordProvider:
[legend]

Classes

struct  ChordInfo
 

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
 

Public Member Functions

 ChordProvider ()
 
virtual ~ChordProvider ()
 
virtual bool get_midi_chord (int root_pitch, Intervals &pitches) const =0
 
ChordInfo const * by_short_name (std::string const &) const
 
ChordInfo const * by_canonical_name (std::string const &) const
 
ChordInfo const * by_any_name (std::string const &) const
 
std::string identify_chord (Intervals const &)
 
std::string canonical_name (Intervals const &)
 
std::string short_name (Intervals const &)
 
std::vector< std::string > other_names (Intervals const &)
 

Static Public Member Functions

static void load_12tet_chords ()
 
static int64_t hash_intervals (ChordProvider::Intervals const &intervals)
 
static bool add_chord (ChordInfo const &)
 
static int load (std::string const &path)
 
static int save ()
 

Static Public Attributes

static std::vector< ChordInfochord_info
 

Detailed Description

Definition at line 31 of file chord_provider.h.

Member Typedef Documentation

◆ Intervals

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

Definition at line 37 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 73 of file chord_provider.h.

Constructor & Destructor Documentation

◆ ChordProvider()

ARDOUR::ChordProvider::ChordProvider ( )
inline

Definition at line 34 of file chord_provider.h.

◆ ~ChordProvider()

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

Definition at line 35 of file chord_provider.h.

Member Function Documentation

◆ add_chord()

static bool ARDOUR::ChordProvider::add_chord ( ChordInfo const &  )
static

◆ by_any_name()

ChordInfo const* ARDOUR::ChordProvider::by_any_name ( std::string const &  ) const

◆ by_canonical_name()

ChordInfo const* ARDOUR::ChordProvider::by_canonical_name ( std::string const &  ) const

◆ by_short_name()

ChordInfo const* ARDOUR::ChordProvider::by_short_name ( std::string const &  ) const

◆ canonical_name()

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

◆ get_midi_chord()

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

Implemented in Pianoroll, EditingContext, and ChordBox.

◆ hash_intervals()

static int64_t ARDOUR::ChordProvider::hash_intervals ( ChordProvider::Intervals const &  intervals)
static

◆ identify_chord()

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

◆ load()

static int ARDOUR::ChordProvider::load ( std::string const &  path)
static

◆ load_12tet_chords()

static void ARDOUR::ChordProvider::load_12tet_chords ( )
static

◆ other_names()

std::vector<std::string> ARDOUR::ChordProvider::other_names ( Intervals const &  )

◆ save()

static int ARDOUR::ChordProvider::save ( )
static

◆ short_name()

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

Member Data Documentation

◆ chord_info

std::vector<ChordInfo> ARDOUR::ChordProvider::chord_info
static

Definition at line 60 of file chord_provider.h.


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