class

Medley::Note

Inherits Reference / Object

Constants

ALIASES = {"A##": "B", "B##": "C#", "C##": "D", "D##": "E", "E##": "F#", "F##": "G", "G##": "A", Abb: "G", Bbb: "A", Cbb: "Bb", Dbb: "C", Ebb: "D", Fbb: "Eb", Gbb: "F", "A#": "Bb", "B#": "C", "C#": "Db", "D#": "Eb", "E#": "F", "F#": "G", "G#": "Ab"}
NOTE_NAMES = ["A", "B", "C", "D", "E", "F", "G"] of ::String

Constructors

new(current_note : String)
Source

Instance methods

double_flat?

true if it's a valid note letter with bb

Source
double_sharp?

true if it's a valid note letter with ##

Source
flat?

true if it's a valid note letter with b

Source
halfstep_down
Source
halfstep_up

Returns the same note, but up a halfstep in most cases Without context of the Key, there's no telling if the note E should be E# or F. Since there's no triple sharps, this is the only case we just go to the next note.

Source
name

Returns the current note name

Source
natural?

true if it's a valid note letter with no modifiers

Source
next_root
Source
root

Returns the root of the note

Source
root_matches?(other_note : Note)

true if the root name is equal to the other note root

Source
sharp?

true if it's a valid note letter with #

Source
wholestep_up
Source