Documentation
¶
Index ¶
- Constants
- func ConvertToMidi(data io.Reader) (*smf.SMF, error)
- func ReadMidi(file *lbx.LbxFile, index int) (*smf.SMF, error)
- func ReadMidiFromCache(cache *lbx.LbxCache, name string, index int) (*smf.SMF, error)
- type IFFChunk
- func (chunk *IFFChunk) GetFormType() string
- func (chunk *IFFChunk) GetInfoSequence() int
- func (chunk *IFFChunk) IsCat() bool
- func (chunk *IFFChunk) IsEvent() bool
- func (chunk *IFFChunk) IsForm() bool
- func (chunk *IFFChunk) IsInfo() bool
- func (chunk *IFFChunk) IsTimbre() bool
- func (chunk *IFFChunk) Name() string
- func (chunk *IFFChunk) RawData() []byte
- func (chunk *IFFChunk) ReadEvent() (MidiEvent, error)
- func (chunk *IFFChunk) ReadTimbre() (IFFTimbre, error)
- func (chunk *IFFChunk) Size() int
- func (chunk *IFFChunk) SubChunk() IFFChunk
- func (chunk *IFFChunk) SubChunkReader() *IFFReader
- type IFFEvent
- type IFFReader
- type IFFTimbre
- type IFFTimbreEntry
- type MidiEvent
- type MidiMessage
- type MidiMessageChannelPrefix
- type MidiMessageChannelPressure
- type MidiMessageControlChange
- type MidiMessageDelay
- type MidiMessageEndOfTrack
- type MidiMessageKeySignature
- type MidiMessageNoteOn
- type MidiMessagePitchWheelChange
- type MidiMessagePortPrefix
- type MidiMessageProgramChange
- type MidiMessageSMPTEOffset
- type MidiMessageTempoSetting
- type MidiMessageTimeSignature
- type MidiMessageValue
- type MidiMetaEventKind
- type NoteOffDuration
Constants ¶
View Source
const ( MidiMessageNoteOnValue = 0b1001 MidiMessageControlChangeValue = 0b1011 MidiMessageProgramChangeValue = 0b1100 MidiMessageChannelPressureValue = 0b1101 // after touch MidiMessagePitchWheelChangeValue = 0b1110 )
View Source
const (
MidiMetaEvent uint8 = 0xff
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IFFChunk ¶
func (*IFFChunk) GetFormType ¶
func (*IFFChunk) GetInfoSequence ¶
func (*IFFChunk) ReadTimbre ¶
func (*IFFChunk) SubChunkReader ¶
type IFFReader ¶
type IFFReader struct {
// contains filtered or unexported fields
}
func NewIFFReader ¶
type IFFTimbre ¶
type IFFTimbre struct {
Entries []IFFTimbreEntry
}
type IFFTimbreEntry ¶
type MidiEvent ¶
type MidiEvent struct {
Messages []MidiMessage
}
func (*MidiEvent) ConvertToSMF ¶
convert from an XMI midi event to a standard midi event by keeping track of note on durations
type MidiMessage ¶
type MidiMessage interface { }
midi message events that XMI supports. Notably there is no note off
type MidiMessageChannelPrefix ¶
type MidiMessageChannelPrefix struct {
Channel uint8
}
type MidiMessageDelay ¶
type MidiMessageDelay struct {
Delay int64
}
type MidiMessageEndOfTrack ¶
type MidiMessageEndOfTrack struct { }
type MidiMessageKeySignature ¶
type MidiMessageNoteOn ¶
type MidiMessagePortPrefix ¶
type MidiMessagePortPrefix struct {
Port uint8
}
type MidiMessageSMPTEOffset ¶
type MidiMessageTempoSetting ¶
type MidiMessageTempoSetting struct {
Tempo float64
}
type MidiMessageValue ¶
type MidiMessageValue uint8
type MidiMetaEventKind ¶
type MidiMetaEventKind uint8
https://www.ccarh.org/courses/253/handout/smf/
const ( MidiEventSequenceNumber MidiMetaEventKind = 0x00 MidiEventTextEvent MidiMetaEventKind = 0x01 MidiEventCopyrightNotice MidiMetaEventKind = 0x02 MidiEventSequenceTrackName MidiMetaEventKind = 0x03 MidiEventInstrumentName MidiMetaEventKind = 0x04 MidiEventLyric MidiMetaEventKind = 0x05 MidiEventMarker MidiMetaEventKind = 0x06 MidiEventCuePoint MidiMetaEventKind = 0x07 MidiEventChannelPrefix MidiMetaEventKind = 0x20 MidiEventPortPrefix MidiMetaEventKind = 0x21 MidiEventEndOfTrack MidiMetaEventKind = 0x2f MidiEventTempoSetting MidiMetaEventKind = 0x51 MidiEventSMPTEOffset MidiMetaEventKind = 0x54 MidiEventTimeSignature MidiMetaEventKind = 0x58 MidiEventKeySignature MidiMetaEventKind = 0x59 )
type NoteOffDuration ¶
Click to show internal directories.
Click to hide internal directories.