Documentation ¶
Overview ¶
Package meta provides MIDI Meta Messages
Index ¶
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 Channel ¶ added in v1.7.0
type Channel uint8
Channel represents the deprecated MIDI channel meta message
func (Channel) Number ¶ added in v1.7.0
Number returns the number of the MIDI channel (starting with 0)
type Copyright ¶
type Copyright string
Copyright represents the MIDI copyright message
type Cuepoint ¶
type Cuepoint string
Cuepoint represents a MIDI cue point message
type Device ¶ added in v1.7.0
type Device string
Device represents a MIDI device point message
type Instrument ¶ added in v1.9.0
type Instrument string
Instrument represents the MIDI instrument name message
func (Instrument) Raw ¶ added in v1.9.0
func (m Instrument) Raw() []byte
Raw returns the raw MIDI data
func (Instrument) String ¶ added in v1.9.0
func (m Instrument) String() string
String repesents the MIDI track message as a string (for debugging)
func (Instrument) Text ¶ added in v1.9.0
func (m Instrument) Text() string
Text returns the name of the track
type Key ¶ added in v1.7.0
Key sets the key/scale of the SMF file. If you want a more comfortable way to set the key, use the key subpackage.
func (Key) Note ¶ added in v1.7.0
Note returns the note of the key signature as a string, e.g. C♯ or E♭
type Lyric ¶
type Lyric string
Lyric represents a lyric MIDI message
type Marker ¶
type Marker string
Marker represents a MIDI marker message
type Port ¶ added in v1.7.0
type Port uint8
Port represents the deprecated MIDI port message
type Program ¶ added in v1.7.0
type Program string
Program represents a MIDI program name
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 SMPTE ¶ added in v1.7.0
SMPTE represents a smpte offset MIDI meta message
type SequenceNo ¶ added in v1.7.0
type SequenceNo uint16
SequenceNo represents the sequence number MIDI meta message
func (SequenceNo) Number ¶ added in v1.7.0
func (s SequenceNo) Number() uint16
Number returns the number of the sequence
func (SequenceNo) Raw ¶ added in v1.7.0
func (s SequenceNo) Raw() []byte
Raw returns the raw bytes for the message
func (SequenceNo) String ¶ added in v1.7.0
func (s SequenceNo) String() string
String represents the MIDI sequence name message as a string (for debugging)
type SequencerData ¶ added in v1.7.0
type SequencerData []byte
SequencerData is a sequencer specific meta message
func (SequencerData) Data ¶ added in v1.7.0
func (s SequencerData) Data() []byte
Data returns the sequencer specific data
func (SequencerData) Len ¶ added in v1.7.0
func (s SequencerData) Len() int
Len returns the length of the sequencer specific data
func (SequencerData) Raw ¶ added in v1.7.0
func (s SequencerData) Raw() []byte
Raw returns the raw MIDI data
func (SequencerData) String ¶ added in v1.7.0
func (s SequencerData) String() string
String represents the sequencer spefici MIDI message as a string (for debugging)
type Tempo ¶
type Tempo uint32
Tempo represents a MIDI tempo (change) message in microseconds per crotchet
func BPM ¶ added in v1.7.0
BPM returns the meta tempo message that corresponds to the given bpm (beats per minute) value
func FractionalBPM ¶ added in v1.7.0
FractionalBPM returns the meta tempo message that corresponds to the given fractional bpm (beats per minute) value
func (Tempo) FractionalBPM ¶ added in v1.7.0
FractionalBPM returns the tempo in fractional beats per minute
func (Tempo) MuSecPerQN ¶ added in v1.7.0
MuSecPerQN returns the tempo in microseconds per quarternote
type Text ¶
type Text string
Text is a MIDI text meta message
type TimeSig ¶ added in v1.7.0
type TimeSig struct { Numerator uint8 Denominator uint8 ClocksPerClick uint8 DemiSemiQuaverPerQuarter uint8 }
TimeSig 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.
type TrackSequenceName ¶ added in v1.9.0
type TrackSequenceName string
TrackSequenceName represents a MIDI track name/sequence name message If in a format 0 track, or the first track in a format 1 file, the name of the sequence. Otherwise, the name of the track.
func (TrackSequenceName) Raw ¶ added in v1.9.0
func (m TrackSequenceName) Raw() []byte
Raw returns the raw bytes for the message
func (TrackSequenceName) String ¶ added in v1.9.0
func (m TrackSequenceName) String() string
String represents the MIDI track/sequence name message as a string (for debugging)
func (TrackSequenceName) Text ¶ added in v1.9.0
func (m TrackSequenceName) Text() string
Text returns the name
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. |