class

Mystic::Util

Inherits Reference < Object

Miscellaneous utility methods

Constants

ACCIDENTAL_OFFSETS = { "#": 1, x: 2, b: -1, "♯": 1, "♭": -1, "𝄫": -2, "𝄪": 2, }
PERFECT_INTERVALS = [1, 4, 5, 8]

Class methods

accidental_offset(accidental : String) : Int32

Return the number of alterations given an accidental

Source
normalize_accidental(accidental_offset : Int32) : String

Return the proper accidental given a numerical accidental_offset

Source
offset_to_quality(offset : Int32, is_perfect : Bool) : String

Return a quality corresponding to the offset (number of alterations) and whether it is_perfect

Source
perfect?(number : Int32) : Bool

Return if given number is a perfect interval

Source