meta

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2018 License: MIT Imports: 8 Imported by: 10

Documentation

Overview

Package meta provides MIDI Meta Messages

Index

Constants

View Source
const (
	EndOfTrack = endOfTrack(true)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Copyright string

func (Copyright) Raw

func (m Copyright) Raw() []byte

func (Copyright) String

func (m Copyright) String() string

func (Copyright) Text

func (m Copyright) Text() string

type Cuepoint

type Cuepoint string

func (Cuepoint) Raw

func (m Cuepoint) Raw() []byte

func (Cuepoint) String

func (m Cuepoint) String() string

func (Cuepoint) Text

func (m Cuepoint) Text() string

type DevicePort

type DevicePort string

func (DevicePort) Raw

func (m DevicePort) Raw() []byte

func (DevicePort) String

func (m DevicePort) String() string

func (DevicePort) Text

func (m DevicePort) Text() string

type KeySignature

type KeySignature struct {
	Key     uint8
	IsMajor bool
	Num     uint8
	//	SharpsOrFlats int8
	IsFlat bool
}

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)

func (KeySignature) Raw

func (m KeySignature) Raw() []byte

func (KeySignature) String

func (m KeySignature) String() string

func (KeySignature) Text

func (m KeySignature) Text() string

type Lyric

type Lyric string

func (Lyric) Raw

func (m Lyric) Raw() []byte

func (Lyric) String

func (m Lyric) String() string

func (Lyric) Text

func (m Lyric) Text() string

type MIDIChannel

type MIDIChannel uint8

func (MIDIChannel) Number

func (m MIDIChannel) Number() uint8

func (MIDIChannel) Raw

func (m MIDIChannel) Raw() []byte

func (MIDIChannel) String

func (m MIDIChannel) String() string

type MIDIPort

type MIDIPort uint8

func (MIDIPort) Number

func (m MIDIPort) Number() uint8

func (MIDIPort) Raw

func (m MIDIPort) Raw() []byte

func (MIDIPort) String

func (m MIDIPort) String() string

type Marker

type Marker string

func (Marker) Raw

func (m Marker) Raw() []byte

func (Marker) String

func (m Marker) String() string

func (Marker) Text

func (m Marker) Text() string

type Message

type Message interface {
	String() string
	Raw() []byte
	// contains filtered or unexported methods
}

type ProgramName

type ProgramName string

func (ProgramName) Raw

func (m ProgramName) Raw() []byte

func (ProgramName) String

func (m ProgramName) String() string

ProgramName

FF 08 length text

This optional event is used to embed the patch/program name that is called up by the immediately subsequent Bank Select and Program Change messages. It serves to aid the end user in making an intelligent program choice when using different hardware.

This event may appear anywhere in a track, and there may be multiple occurrences within a track.

func (ProgramName) Text

func (m ProgramName) Text() string

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

func NewReader

func NewReader(input io.Reader, typ byte) Reader

NewReader returns a reader that can read a single Meta Message Read may just be called once per Reader. A second call returns io.EOF

type SMPTEOffset

type SMPTEOffset struct {
	Hour            byte
	Minute          byte
	Second          byte
	Frame           byte
	FractionalFrame byte
}

func (SMPTEOffset) Raw

func (s SMPTEOffset) Raw() []byte

func (SMPTEOffset) String

func (s SMPTEOffset) String() string

type Sequence

type Sequence string

func (Sequence) Raw

func (m Sequence) Raw() []byte

func (Sequence) String

func (m Sequence) String() string

func (Sequence) Text

func (m Sequence) Text() string

type SequenceNumber

type SequenceNumber uint16

func (SequenceNumber) Number

func (s SequenceNumber) Number() uint16

func (SequenceNumber) Raw

func (s SequenceNumber) Raw() []byte

func (SequenceNumber) String

func (s SequenceNumber) String() string

type SequencerSpecific

type SequencerSpecific []byte

func (SequencerSpecific) Data

func (s SequencerSpecific) Data() []byte

func (SequencerSpecific) Len

func (s SequencerSpecific) Len() int

func (SequencerSpecific) Raw

func (s SequencerSpecific) Raw() []byte

func (SequencerSpecific) String

func (s SequencerSpecific) String() string

type Tempo

type Tempo uint32

value is equal to BPM

func (Tempo) BPM

func (t Tempo) BPM() uint32

func (Tempo) Raw

func (m Tempo) Raw() []byte

func (Tempo) String

func (m Tempo) String() string

type Text

type Text string

func (Text) Raw

func (m Text) Raw() []byte

func (Text) String

func (m Text) String() string

func (Text) Text

func (m Text) Text() string

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 a comfortabel way without having to worry about ClocksPerClick and DemiSemiQuaverPerQuarter, use the meter subpackage.

func (TimeSignature) Raw

func (m TimeSignature) Raw() []byte

func (TimeSignature) Signature

func (m TimeSignature) Signature() string

func (TimeSignature) String

func (m TimeSignature) String() string

type Track

type Track string

func (Track) Raw

func (m Track) Raw() []byte

func (Track) String

func (m Track) String() string

func (Track) Text

func (m Track) Text() string

type Undefined

type Undefined struct {
	Typ  byte
	Data []byte
}

func (Undefined) Raw

func (m Undefined) Raw() []byte

func (Undefined) String

func (m Undefined) String() string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL