Documentation
¶
Index ¶
- Variables
- func AddManufacturers(list map[string]Manufacturer)
- func LoadManufacturers(r io.Reader) (map[string]Manufacturer, error)
- type Channel
- type Controller
- type Delta
- type Hex
- type KeyType
- type Manufacturer
- type MetaEventType
- type MiddleC
- type MidiEventType
- type Note
- type Scale
- type ScaleID
- type Status
- type SysExEventType
- type TEventType
- type Tag
- type TrackNumber
- type VLF
- type VLQ
Constants ¶
This section is empty.
Variables ¶
View Source
var A = Note{
Ord: 9,
Name: `A`,
}
View Source
var A_FLAT = Note{
Ord: 8,
Name: `A♭`,
}
View Source
var A_FLAT_MAJOR = Scale{ Name: `A♭ major`, Accidentals: -4, Type: Major, Notes: []Note{A_FLAT, B_FLAT, C, D_FLAT, E_FLAT, F, G}, // contains filtered or unexported fields }
View Source
var A_FLAT_MINOR = Scale{ Name: `A♭ minor`, Accidentals: -7, Type: Minor, Notes: []Note{A_FLAT, B_FLAT, C_FLAT, D_FLAT, E_FLAT, F_FLAT, G_FLAT}, // contains filtered or unexported fields }
A♭ minor/G♯ minor
View Source
var A_MAJOR = Scale{ Name: `A major`, Accidentals: 3, Type: Major, Notes: []Note{A, B, C_SHARP, D, E, F_SHARP, G_SHARP}, // contains filtered or unexported fields }
View Source
var A_MINOR = Scale{ Name: `A minor`, Accidentals: 0, Type: Minor, Notes: []Note{A, B, C, D, E, F, G}, // contains filtered or unexported fields }
View Source
var A_SHARP = Note{
Ord: 10,
Name: `A♯`,
}
View Source
var A_SHARP_MINOR = Scale{ Name: `A♯ minor`, Accidentals: 7, Type: Minor, Notes: []Note{A_SHARP, B_SHARP, C_SHARP, D_SHARP, E_SHARP, F_SHARP, G_SHARP}, // contains filtered or unexported fields }
A♯ minor/B♭ minor
View Source
var B = Note{
Ord: 11,
Name: `B`,
}
View Source
var B_FLAT = Note{
Ord: 10,
Name: `B♭`,
}
View Source
var B_FLAT_MAJOR = Scale{ Name: `B♭ major`, Accidentals: -2, Type: Major, Notes: []Note{B_FLAT, C, D, E_FLAT, F, G, A}, // contains filtered or unexported fields }
View Source
var B_FLAT_MINOR = Scale{ Name: `B♭ minor`, Accidentals: -5, Type: Minor, Notes: []Note{B_FLAT, C, D_FLAT, E_FLAT, F, G_FLAT, A_FLAT}, // contains filtered or unexported fields }
B♭ minor/A♯ minor
View Source
var B_MAJOR = Scale{ Name: `B major`, Accidentals: 5, Type: Major, Notes: []Note{B, C_SHARP, D_SHARP, E, F_SHARP, G_SHARP, A_SHARP}, // contains filtered or unexported fields }
enharmonic to C♭ major
View Source
var B_MINOR = Scale{ Name: `B minor`, Accidentals: 2, Type: Minor, Notes: []Note{B, C_SHARP, D, E, F_SHARP, G, A}, // contains filtered or unexported fields }
View Source
var B_SHARP = Note{
Ord: 0,
Name: `B♯`,
}
View Source
var C = Note{
Ord: 0,
Name: `C`,
}
View Source
var C_FLAT = Note{
Ord: 11,
Name: `C♭`,
}
View Source
var C_FLAT_MAJOR = Scale{ Name: `C♭ major`, Accidentals: -7, Type: Major, Notes: []Note{C_FLAT, D_FLAT, E_FLAT, F_FLAT, G_FLAT, A_FLAT, B_FLAT}, // contains filtered or unexported fields }
enharmonic to E major
View Source
var C_MAJOR = Scale{ Name: `C major`, Accidentals: 0, Type: Major, Notes: []Note{C, D, E, F, G, A, B}, // contains filtered or unexported fields }
View Source
var C_MINOR = Scale{ Name: `C minor`, Accidentals: -3, Type: Minor, Notes: []Note{C, D, E_FLAT, F, G, A_FLAT, B_FLAT}, // contains filtered or unexported fields }
View Source
var C_SHARP = Note{
Ord: 1,
Name: `C♯`,
}
View Source
var C_SHARP_MAJOR = Scale{ Name: `C♯ major`, Accidentals: 7, Type: Major, Notes: []Note{C_SHARP, D_SHARP, E_SHARP, F_SHARP, G_SHARP, A_SHARP, B_SHARP}, // contains filtered or unexported fields }
enharmonic to D major
View Source
var C_SHARP_MINOR = Scale{ Name: `C♯ minor`, Accidentals: 4, Type: Minor, Notes: []Note{C_SHARP, D_SHARP, E, F_SHARP, G_SHARP, A, B}, // contains filtered or unexported fields }
View Source
var D = Note{
Ord: 2,
Name: `D`,
}
View Source
var D_FLAT = Note{
Ord: 1,
Name: `D♭`,
}
View Source
var D_FLAT_MAJOR = Scale{ Name: `D♭ major`, Accidentals: -5, Type: Major, Notes: []Note{D_FLAT, E_FLAT, F, G_FLAT, A_FLAT, B_FLAT, C}, // contains filtered or unexported fields }
enharmonic to C# major
View Source
var D_MAJOR = Scale{ Name: `D major`, Accidentals: 2, Type: Major, Notes: []Note{D, E, F_SHARP, G, A, B, C_SHARP}, // contains filtered or unexported fields }
View Source
var D_MINOR = Scale{ Name: `D minor`, Accidentals: -1, Type: Minor, Notes: []Note{D, E, F, G, A, B_FLAT, C}, // contains filtered or unexported fields }
View Source
var D_SHARP = Note{
Ord: 3,
Name: `D♯`,
}
View Source
var D_SHARP_MINOR = Scale{ Name: `D♯ minor`, Accidentals: 6, Type: Minor, Notes: []Note{D_SHARP, E_SHARP, F_SHARP, G_SHARP, A_SHARP, B, C_SHARP}, // contains filtered or unexported fields }
/D♯ minor/E♭ minor
View Source
var E = Note{
Ord: 4,
Name: `E`,
}
View Source
var E_FLAT = Note{
Ord: 3,
Name: `E♭`,
}
View Source
var E_FLAT_MAJOR = Scale{ Name: `E♭ major`, Accidentals: -3, Type: Major, Notes: []Note{E_FLAT, F, G, A_FLAT, B_FLAT, C, D}, // contains filtered or unexported fields }
View Source
var E_FLAT_MINOR = Scale{ Name: `E♭ minor`, Accidentals: -6, Type: Minor, Notes: []Note{E_FLAT, F, G_FLAT, A_FLAT, B_FLAT, C_FLAT, D_FLAT}, // contains filtered or unexported fields }
E♭ minor/D♯ minor
View Source
var E_MAJOR = Scale{ Name: `E major`, Accidentals: 4, Type: Major, Notes: []Note{E, F_SHARP, G_SHARP, A, B, C_SHARP, D_SHARP}, // contains filtered or unexported fields }
View Source
var E_MINOR = Scale{ Name: `E minor`, Accidentals: 1, Type: Minor, Notes: []Note{E, F_SHARP, G, A, B, C, D}, // contains filtered or unexported fields }
View Source
var E_SHARP = Note{
Ord: 5,
Name: `E♯`,
}
View Source
var F = Note{
Ord: 5,
Name: `F`,
}
View Source
var F_FLAT = Note{
Ord: 4,
Name: `F♭`,
}
View Source
var F_MAJOR = Scale{ Name: `F major`, Accidentals: -1, Type: Major, Notes: []Note{F, G, A, B_FLAT, C, D, E}, // contains filtered or unexported fields }
View Source
var F_MINOR = Scale{ Name: `F minor`, Accidentals: -4, Type: Minor, Notes: []Note{F, G, A_FLAT, B_FLAT, C, D_FLAT, E_FLAT}, // contains filtered or unexported fields }
View Source
var F_SHARP = Note{
Ord: 6,
Name: `F♯`,
}
View Source
var F_SHARP_MAJOR = Scale{ Name: `F♯ major`, Accidentals: 6, Type: Major, Notes: []Note{F_SHARP, G_SHARP, A_SHARP, B, C_SHARP, D_SHARP, E_SHARP}, // contains filtered or unexported fields }
enharmonic to G♭ major
View Source
var F_SHARP_MINOR = Scale{ Name: `F♯ minor`, Accidentals: 3, Type: Minor, Notes: []Note{F_SHARP, G_SHARP, A, B, C_SHARP, D, E}, // contains filtered or unexported fields }
View Source
var G = Note{
Ord: 7,
Name: `G`,
}
View Source
var G_FLAT = Note{
Ord: 6,
Name: `G♭`,
}
View Source
var G_FLAT_MAJOR = Scale{ Name: `G♭ major`, Accidentals: -6, Type: Major, Notes: []Note{G_FLAT, A_FLAT, B_FLAT, C_FLAT, D_FLAT, E_FLAT, F}, // contains filtered or unexported fields }
enharmonic to F# major
View Source
var G_MAJOR = Scale{ Name: `G major`, Accidentals: 1, Type: Major, Notes: []Note{G, A, B, C, D, E, F_SHARP}, // contains filtered or unexported fields }
View Source
var G_MINOR = Scale{ Name: `G minor`, Accidentals: -2, Type: Minor, Notes: []Note{G, A, B_FLAT, C, D, E_FLAT, F}, // contains filtered or unexported fields }
View Source
var G_SHARP = Note{
Ord: 8,
Name: `G♯`,
}
View Source
var G_SHARP_MINOR = Scale{ Name: `G♯ minor`, Accidentals: 5, Type: Minor, Notes: []Note{G_SHARP, A_SHARP, B, C_SHARP, D_SHARP, E, F_SHARP}, // contains filtered or unexported fields }
View Source
var MAJOR_SCALES = []Scale{ C_MAJOR, G_MAJOR, D_MAJOR, A_MAJOR, E_MAJOR, B_MAJOR, F_SHARP_MAJOR, C_SHARP_MAJOR, F_MAJOR, B_FLAT_MAJOR, E_FLAT_MAJOR, A_FLAT_MAJOR, D_FLAT_MAJOR, G_FLAT_MAJOR, C_FLAT_MAJOR, }
View Source
var MINOR_SCALES = []Scale{ A_MINOR, E_MINOR, B_MINOR, A_SHARP_MINOR, D_SHARP_MINOR, G_SHARP_MINOR, C_SHARP_MINOR, F_SHARP_MINOR, D_MINOR, G_MINOR, C_MINOR, F_MINOR, B_FLAT_MINOR, E_FLAT_MINOR, A_FLAT_MINOR, }
Functions ¶
func AddManufacturers ¶
func AddManufacturers(list map[string]Manufacturer)
func LoadManufacturers ¶
func LoadManufacturers(r io.Reader) (map[string]Manufacturer, error)
Types ¶
type Channel ¶
type Channel uint8
func ParseChannel ¶
func (Channel) MarshalJSON ¶
func (*Channel) UnmarshalJSON ¶
func (*Channel) UnmarshalText ¶
type Controller ¶
func LookupController ¶
func LookupController(id byte) Controller
type Delta ¶
type Delta uint32
func DecodeDelta ¶
func DecodeDelta(r io.ByteReader) (Delta, error)
func ParseDelta ¶
func (Delta) MarshalBinary ¶
type Hex ¶
type Hex []byte
func (Hex) MarshalBinary ¶
func (Hex) MarshalJSON ¶
func (*Hex) UnmarshalJSON ¶
type Manufacturer ¶
type Manufacturer struct {
ID []byte `json:"id"`
Region string `json:"region"`
Name string `json:"name"`
}
func FindManufacturer ¶
func FindManufacturer(s string) (Manufacturer, error)
func LookupManufacturer ¶
func LookupManufacturer(id []byte) Manufacturer
func (Manufacturer) MarshalJSON ¶
func (m Manufacturer) MarshalJSON() ([]byte, error)
func (*Manufacturer) UnmarshalJSON ¶
func (m *Manufacturer) UnmarshalJSON(bytes []byte) error
type MetaEventType ¶
type MetaEventType byte
const ( TypeSequenceNumber MetaEventType = 0x00 TypeText MetaEventType = 0x01 TypeCopyright MetaEventType = 0x02 TypeTrackName MetaEventType = 0x03 TypeInstrumentName MetaEventType = 0x04 TypeLyric MetaEventType = 0x05 TypeMarker MetaEventType = 0x06 TypeCuePoint MetaEventType = 0x07 TypeProgramName MetaEventType = 0x08 TypeDeviceName MetaEventType = 0x09 TypeMIDIChannelPrefix MetaEventType = 0x20 TypeMIDIPort MetaEventType = 0x21 TypeTempo MetaEventType = 0x51 TypeSMPTEOffset MetaEventType = 0x54 TypeTimeSignature MetaEventType = 0x58 TypeKeySignature MetaEventType = 0x59 TypeEndOfTrack MetaEventType = 0x2f TypeSequencerSpecificEvent MetaEventType = 0x7f )
func (MetaEventType) Equals ¶
func (t MetaEventType) Equals(b byte) bool
func (MetaEventType) String ¶
func (t MetaEventType) String() string
type MidiEventType ¶
type MidiEventType byte
const ( TypeNoteOff MidiEventType = 0x80 TypeNoteOn MidiEventType = 0x90 TypePolyphonicPressure MidiEventType = 0xa0 TypeController MidiEventType = 0xb0 TypeProgramChange MidiEventType = 0xc0 TypeChannelPressure MidiEventType = 0xd0 TypePitchBend MidiEventType = 0xe0 )
func (MidiEventType) Equals ¶
func (t MidiEventType) Equals(b byte) bool
func (MidiEventType) String ¶
func (t MidiEventType) String() string
type Note ¶
func LookupNote ¶
type Scale ¶
type Scale struct {
Name string
Accidentals int8
Type KeyType
Notes []Note
// contains filtered or unexported fields
}
func MajorScale ¶
func MinorScale ¶
type ScaleID ¶
type ScaleID int
const ( CMajor ScaleID = iota GMajor DMajor AMajor EMajor BMajor FSharpMajor CSharpMajor FMajor BFlatMajor EFlatMajor AFlatMajor DFlatMajor GFlatMajor CFlatMajor AMinor EMinor BMinor ASharpMinor DSharpMinor GSharpMinor CSharpMinor FSharpMinor DMinor GMinor CMinor FMinor BFlatMinor EFlatMinor AFlatMinor )
type SysExEventType ¶
type SysExEventType byte
const ( TypeSysExMessage SysExEventType = 0xf0 TypeSysExContinuationMessage SysExEventType = 0xf7 TypeSysExEscapeMessage SysExEventType = 0xf7 )
func (SysExEventType) Equals ¶
func (t SysExEventType) Equals(b byte) bool
func (SysExEventType) String ¶
func (t SysExEventType) String() string
type TEventType ¶
type TEventType interface {
MetaEventType | MidiEventType | SysExEventType
Equals(byte) bool
}
type Tag ¶
type Tag int
const ( TagUnknown Tag = iota TagSequenceNumber TagText TagCopyright TagTrackName TagInstrumentName TagLyric TagMarker TagCuePoint TagProgramName TagDeviceName TagMIDIChannelPrefix TagMIDIPort TagTempo TagSMPTEOffset TagTimeSignature TagKeySignature TagEndOfTrack TagSequencerSpecificEvent TagChannelPressure TagController TagNoteOff TagNoteOn TagPitchBend TagPolyphonicPressure TagProgramChange TagSysExContinuation TagSysExEscape TagSysExMessage )
func (*Tag) UnmarshalText ¶
type TrackNumber ¶
type TrackNumber uint
func (TrackNumber) String ¶
func (t TrackNumber) String() string
Click to show internal directories.
Click to hide internal directories.