midi

package
v0.0.0-...-486f928 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelEvents

type ChannelEvents struct {
	Events []*MidiEvent
}

func NewChannelEvents

func NewChannelEvents() *ChannelEvents

func (*ChannelEvents) Add

func (c *ChannelEvents) Add(ev *MidiEvent)

type MIDISequences

type MIDISequences struct {
	Channels     []*ChannelEvents
	GlobalEvents []*MidiEvent
	Length       int
	TimeFormat   smf.MetricTicks
}

func NewMIDISequences

func NewMIDISequences() *MIDISequences

func ReadMidiFile

func ReadMidiFile(file string) (*MIDISequences, error)

func (*MIDISequences) AddChannelEvent

func (m *MIDISequences) AddChannelEvent(offset, channel int, msg midi.Message)

func (*MIDISequences) AddGlobalEvent

func (m *MIDISequences) AddGlobalEvent(offset int, msg midi.Message)

type MidiEvent

type MidiEvent struct {
	Message midi.Message
	Offset  int
}

func NewMidiEvent

func NewMidiEvent(offset int, msg midi.Message) *MidiEvent

type MidiReader

type MidiReader struct {
	Offset int
	// contains filtered or unexported fields
}

func NewMidiReader

func NewMidiReader() *MidiReader

func (*MidiReader) ReadFile

func (r *MidiReader) ReadFile(file string) (*MIDISequences, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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