Documentation
¶
Overview ¶
Package meta provides MIDI Meta Messages
Index ¶
- Constants
- type Copyright
- type Cuepoint
- type DevicePort
- type KeySignature
- type Lyric
- type MIDIChannel
- type MIDIPort
- type Marker
- type Message
- type ProgramName
- type Reader
- type SMPTEOffset
- type Sequence
- type SequenceNumber
- type SequencerSpecific
- type Tempo
- type Text
- type TimeSignature
- type Track
- type Undefined
Constants ¶
const ( // EndOfTrack represents the end of track MIDI message. It must be written at the end of a track EndOfTrack = endOfTrack(true) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Copyright ¶
type Copyright string
Copyright represents the MIDI copyright message
type Cuepoint ¶
type Cuepoint string
Cuepoint represents a MIDI cue point message
type DevicePort ¶
type DevicePort string
DevicePort represents a MIDI device point message
func (DevicePort) String ¶
func (m DevicePort) String() string
String represents the device point MIDI message as a string (for debugging)
type KeySignature ¶
KeySignature sets the key/scale of the SMF file. If you want a more comfortable way to set the key, use the key subpackage.
func (KeySignature) Note ¶
func (m KeySignature) Note() (note string)
Note returns the note of the key signature as a string, e.g. C♯ or E♭
func (KeySignature) String ¶
func (m KeySignature) String() string
String represents the key signature message as a string (for debugging)
func (KeySignature) Text ¶
func (m KeySignature) Text() string
Text returns a the text of the key signature
type Lyric ¶
type Lyric string
Lyric represents a lyric MIDI message
type MIDIChannel ¶
type MIDIChannel uint8
MIDIChannel represents the deprecated MIDI channel meta message
func (MIDIChannel) Number ¶
func (m MIDIChannel) Number() uint8
Number returns the number of the MIDI channel (starting with 0)
func (MIDIChannel) Raw ¶
func (m MIDIChannel) Raw() []byte
Raw returns the raw bytes for the message
func (MIDIChannel) String ¶
func (m MIDIChannel) String() string
String represents the MIDIChannel message as a string (for debugging)
type Marker ¶
type Marker string
Marker represents a MIDI marker message
type ProgramName ¶
type ProgramName string
ProgramName represents a MIDI program name
func (ProgramName) Raw ¶
func (p ProgramName) Raw() []byte
Raw returns the raw bytes for the message
func (ProgramName) String ¶
func (p ProgramName) String() string
String represents the MIDI program name message as a string (for debugging)
type Reader ¶
type Reader interface { // Read reads a single Meta Message. // It may just be called once per Reader. A second call returns io.EOF Read() (Message, error) }
Reader reads a Meta Message
type SMPTEOffset ¶
SMPTEOffset represents a smpte offset MIDI meta message
func (SMPTEOffset) Raw ¶
func (s SMPTEOffset) Raw() []byte
Raw returns the raw bytes for the message
func (SMPTEOffset) String ¶
func (s SMPTEOffset) String() string
String represents the smpte offset MIDI message as a string (for debugging)
type Sequence ¶
type Sequence string
Sequence represents a MIDI sequence message (name of a sequence)
type SequenceNumber ¶
type SequenceNumber uint16
SequenceNumber represents the sequence number MIDI meta message
func (SequenceNumber) Number ¶
func (s SequenceNumber) Number() uint16
Number returns the number of the sequence
func (SequenceNumber) Raw ¶
func (s SequenceNumber) Raw() []byte
Raw returns the raw bytes for the message
func (SequenceNumber) String ¶
func (s SequenceNumber) String() string
String represents the MIDI sequence name message as a string (for debugging)
type SequencerSpecific ¶
type SequencerSpecific []byte
SequencerSpecific is a sequencer specific meta message
func (SequencerSpecific) Data ¶
func (s SequencerSpecific) Data() []byte
Data returns the sequencer specific data
func (SequencerSpecific) Len ¶
func (s SequencerSpecific) Len() int
Len returns the length of the sequencer specific data
func (SequencerSpecific) Raw ¶
func (s SequencerSpecific) Raw() []byte
Raw returns the raw MIDI data
func (SequencerSpecific) String ¶
func (s SequencerSpecific) String() string
String represents the sequencer spefici MIDI message as a string (for debugging)
type Text ¶
type Text string
Text is a MIDI text meta message
type TimeSignature ¶
type TimeSignature struct { Numerator uint8 Denominator uint8 ClocksPerClick uint8 DemiSemiQuaverPerQuarter uint8 }
TimeSignature sets the time signature according to the SMF spec. Denominator isn't a power of 2, but a readable decimal number (uint8). If you want an easy way without having to worry about ClocksPerClick and DemiSemiQuaverPerQuarter, use the meter subpackage.
func (TimeSignature) Signature ¶
func (m TimeSignature) Signature() string
Signature returns the time signature in a readable way
func (TimeSignature) String ¶
func (m TimeSignature) String() string
String represents the time signature MIDI message as a string (for debugging)
type Track ¶
type Track string
Track represents the MIDI track message
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package key provides helper functions for key signature meta messages.
|
Package key provides helper functions for key signature meta messages. |
Package meter provides helper functions for time signature meta messages.
|
Package meter provides helper functions for time signature meta messages. |