Documentation
¶
Index ¶
- Variables
- func GetDynamicSignStrings() []string
- type Accidental
- type BPM
- type Chord
- type Circle
- type CircleMember
- type CircleOfFifth
- type DiatonicChord
- type DiatonicChorder
- type DiatonicChorderImpl
- type DynamicSign
- type Instance
- type Key
- type KeyConversion
- type KeyConversionChain
- type Meta
- type Meter
- type Scale
- type ScaleNote
- type Velocity
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnknownDynamicSign = errors.New("UnknownDynamicSign")
)
Functions ¶
func GetDynamicSignStrings ¶
func GetDynamicSignStrings() []string
Types ¶
type Accidental ¶
type Accidental int
const ( UnknownAccidental Accidental = iota Natural Sharp Flat )
func NewAccidental ¶
func NewAccidental(s string) Accidental
func (Accidental) AsNoteAccidental ¶
func (a Accidental) AsNoteAccidental() note.Accidental
func (Accidental) MarshalJSON ¶
func (a Accidental) MarshalJSON() ([]byte, error)
func (Accidental) MarshalYAML ¶
func (a Accidental) MarshalYAML() (any, error)
func (Accidental) Semitone ¶
func (a Accidental) Semitone() note.Semitone
func (Accidental) String ¶
func (a Accidental) String() string
func (Accidental) Tendency ¶
func (a Accidental) Tendency(x Accidental) Accidental
Tendency calculates the substantial temporary accidental of x with reference to a.
type Chord ¶
type Circle ¶
type Circle struct {
// contains filtered or unexported fields
}
func (Circle) At ¶
func (c Circle) At(i int) CircleMember
type CircleMember ¶
type CircleMember struct {
// contains filtered or unexported fields
}
func NewCircleMember ¶
func NewCircleMember(ss ...*Scale) CircleMember
func (CircleMember) Head ¶
func (c CircleMember) Head() *Scale
func (CircleMember) String ¶
func (c CircleMember) String() string
type CircleOfFifth ¶
func NewCircleOfFifth ¶
func NewCircleOfFifth() CircleOfFifth
func (CircleOfFifth) Dominant ¶
func (c CircleOfFifth) Dominant(key Key) (CircleMember, error)
func (CircleOfFifth) Parallel ¶
func (c CircleOfFifth) Parallel(key Key) (CircleMember, error)
Parallel returns a key that has the same tonic but with the major and minor modes swapped.
func (CircleOfFifth) Relative ¶
func (c CircleOfFifth) Relative(key Key) (CircleMember, error)
Relative returns a key that has the same signature but with the major and minor modes swapped.
func (CircleOfFifth) SubDominant ¶
func (c CircleOfFifth) SubDominant(key Key) (CircleMember, error)
type DiatonicChord ¶
func (DiatonicChord) MarshalYAML ¶
func (dc DiatonicChord) MarshalYAML() (any, error)
func (DiatonicChord) String ¶
func (dc DiatonicChord) String() string
type DiatonicChorder ¶
type DiatonicChorder interface { Sevenths() [7]DiatonicChord Triads() [7]DiatonicChord }
type DiatonicChorderImpl ¶
type DiatonicChorderImpl struct {
// contains filtered or unexported fields
}
func NewDiatonicChorder ¶
func NewDiatonicChorder(scale *Scale) *DiatonicChorderImpl
func (DiatonicChorderImpl) Sevenths ¶
func (dc DiatonicChorderImpl) Sevenths() [7]DiatonicChord
func (DiatonicChorderImpl) Triads ¶
func (dc DiatonicChorderImpl) Triads() [7]DiatonicChord
type DynamicSign ¶
type DynamicSign int
const ( UnknownDynamicSign DynamicSign = iota Pianissimo Piano MezzoPiano MezzoForte Forte Fortissimo )
func NewDynamicSign ¶
func NewDynamicSign(s string) DynamicSign
func (DynamicSign) MarshalYAML ¶
func (d DynamicSign) MarshalYAML() (any, error)
func (DynamicSign) String ¶
func (d DynamicSign) String() string
func (*DynamicSign) UnmarshalYAML ¶
func (d *DynamicSign) UnmarshalYAML(value *yaml.Node) error
func (DynamicSign) Velocity ¶
func (d DynamicSign) Velocity() Velocity
type Instance ¶
type Key ¶
type Key struct { Name note.Name `json:"name" yaml:"name"` Minor bool `json:"minor" yaml:"minor"` Accidental Accidental `json:"accidental" yaml:"accidental"` }
func MustParseKey ¶
func (Key) MarshalYAML ¶
func (*Key) UnmarshalYAML ¶
type KeyConversion ¶
type KeyConversion int
const ( UnknownKeyConversion KeyConversion = iota ParallelKey RelativeKey DominantKey SubDominantKey )
func (KeyConversion) Converter ¶
func (k KeyConversion) Converter(c CircleOfFifth) func(Key) (CircleMember, error)
func (KeyConversion) String ¶
func (i KeyConversion) String() string
type KeyConversionChain ¶
type KeyConversionChain []KeyConversion
func (KeyConversionChain) Convert ¶
func (cc KeyConversionChain) Convert(c CircleOfFifth, key Key) (CircleMember, error)
type Scale ¶
type Scale struct { Key Key `json:"key" yaml:"key"` Notes [7]*ScaleNote `json:"notes" yaml:"notes"` Flat int `json:"flat,omitempty" yaml:"flat,omitempty"` Sharp int `json:"sharp,omitempty" yaml:"sharp,omitempty"` }
func MustNewScale ¶
type ScaleNote ¶
type ScaleNote struct { Name note.Name `json:"note" yaml:"note"` Accidental Accidental `json:"accidental,omitempty" yaml:"accidental,omitempty"` }
func (ScaleNote) MarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.