Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidDegree = errors.New("InvalidDegree")
)
View Source
var (
ErrUnknownAccidental = errors.New("UnknownAccidental")
)
View Source
var (
ErrUnknownName = errors.New("UnknownName")
)
Functions ¶
Types ¶
type Accidental ¶
type Accidental int
const ( UnknownAccidental Accidental = iota Natural Sharp Flat DoubleSharp DoubleFlat )
func NewAccidental ¶
func NewAccidental(s string) Accidental
func (Accidental) Semitone ¶
func (a Accidental) Semitone() Semitone
func (Accidental) String ¶
func (a Accidental) String(simple bool) string
type CoerceDegreeName ¶
type CoerceDegreeName int
const ( UnknownCoerceDegreeName CoerceDegreeName = iota MajorOrPerfectCoerceDegree MinorOrDiminishedCoerceDegree AugmentedCoerceDegree DiminishedCoerceDegree DoublyAugmentedCoerceDegree DoublyDiminishedCoerceDegree )
func NewCoerceDegree ¶
func NewCoerceDegree(s string) CoerceDegreeName
func (CoerceDegreeName) String ¶
func (c CoerceDegreeName) String() string
type Degree ¶
type Degree struct { Value uint Name DegreeName }
func MustNewDegree ¶
func MustNewDegree(value uint, name DegreeName) Degree
func ParseDegree ¶
func (Degree) MarshalYAML ¶
func (*Degree) UnmarshalYAML ¶
type DegreeName ¶
type DegreeName int
const ( UnknownDegree DegreeName = iota MajorDegree MinorDegree PerfectDegree AugmentedDegree DiminishedDegree DoublyAugmentedDegree DoublyDiminishedDegree )
func (DegreeName) Coerce ¶
func (d DegreeName) Coerce() CoerceDegreeName
func (DegreeName) String ¶
func (i DegreeName) String() string
type Note ¶
type Note struct { Name Name Accidental Accidental }
func NewNote ¶
func NewNote(name Name, accidental Accidental) Note
func (Note) MarshalYAML ¶
type Semitone ¶
type Semitone int
func (Semitone) MarshalYAML ¶
func (*Semitone) UnmarshalYAML ¶
func (Semitone) WithoutOctave ¶
Click to show internal directories.
Click to hide internal directories.