12#ifndef __AUDIO_SCALE_H__
13#define __AUDIO_SCALE_H__
19#include <glib/gi18n.h>
27#define SCALE_SCHEMA_VERSION 2
59 SCALE_MAJOR_PENTATONIC,
60 SCALE_MINOR_PENTATONIC,
61 SCALE_OCTATONIC_HALF_WHOLE,
62 SCALE_OCTATONIC_WHOLE_HALF,
70 SCALE_PHRYGIAN_DOMINANT,
74 SCALE_DOUBLE_HARMONIC,
77 SCALE_DOMINANT_DIMINISHED,
79 SCALE_EIGHT_TONE_SPANISH,
84 SCALE_HUNGARIAN_GYPSY,
86 SCALE_NEAPOLITAN_MAJOR,
87 SCALE_NEAPOLITAN_MINOR,
97 SCALE_ENIGMATIC_MINOR,
100 SCALE_HUNGARIAN_MINOR,
106 SCALE_PROMETHEUS_NEAPOLITAN,
107 SCALE_PROMETHEUS_LISZT,
118 SCALE_HALF_DIMINISHED,
121 SCALE_LYDIAN_AUGMENTED,
123 SCALE_UKRANIAN_DORIAN,
217 MusicalNote chord_root,
bool musical_scale_contains_note(const MusicalScale *scale, MusicalNote note)
Returns if the given key is in the given MusicalScale.
bool musical_scale_contains_chord(const MusicalScale *const scale, const ChordDescriptor *const chord)
Returns if all of the chord's notes are in the scale.
char * musical_scale_as_string(MusicalScale *scale)
Returns the scale in human readable string.
char * musical_scale_to_string(const MusicalScale *const self)
Prints the MusicalScale to a string.
ChordAccent
Chord accents.
void musical_scale_strcpy(MusicalScale *scale, char *buf)
Same as above but uses a buffer instead of allocating.
MusicalScale * musical_scale_new(MusicalScaleType type, MusicalNote root)
Creates new scale using type and root note.
RETURNS_NONNULL const ChordType * musical_scale_get_triad_types(MusicalScaleType scale_type, bool ascending)
Returns the triads in the given scale.
void musical_scale_free(MusicalScale *scale)
Frees the MusicalScale.
const bool * musical_scale_get_notes(MusicalScaleType scale_type, bool ascending)
Returns the notes in the given scale.
int musical_scale_is_accent_in_scale(MusicalScale *scale, MusicalNote chord_root, ChordType type, ChordAccent chord_accent)
Returns if the accent is in the scale.
MusicalScale * musical_scale_clone(MusicalScale *src)
Clones the scale.
MusicalScaleType
Scale type (name) eg Aeolian.
@ SCALE_AEOLIAN
Natural minor (same as SCALE_MINOR).
@ SCALE_CHROMATIC
All keys.
@ SCALE_MINOR
Natural minor.
@ SCALE_IONIAN
Major (same as SCALE_MAJOR).
@ SCALE_ACOUSTIC
Lydian dominant.
A ChordDescriptor describes a chord and is not linked to any specific object by itself.
Musical scale descriptor.
MusicalScaleType type
Identification of the scale (e.g.
MusicalNote root_key
Root key of the scale.