class

Mystic::ChordParser

Inherits Reference < Object

Parser for chord symbols

Constants

ACCIDENTAL_ALIASES = { "+": "#", "-": "b", }
DEFAULT_ACCIDENTALS = { "2": "#", "6": "#", "7": "b", "9": "#", "13": "#", "14": "b", }

Default accidentals for imperfect intervals

IMPLIED_MEMBERS = { "9": [7], "11": [7, 9], "13": [7, 9, 11], }

Class methods

normalize_basic_quality(s : String) : String

Return a standardized format for qualities for a given string quality

Source
parse(s : String) : Chord

Parse a string chord symbol and return the resulting Chord

Source
parse_extensions(tokens : Array(Token), has_seventh = false) : Array(Interval)

Uses the given tokens and returns a list of extended intervals (beyond the 3rd/5th)

When has_seventh is true, the chord symbol has an explicit 7th, so there is no need to add an implied 7th

Source
tokenize_extensions(s : String) : Array(Token)

Splits the given string into tokens

Source

Nested types