Skip to main content
Glama
emicklei

melrōse musical expression player

by emicklei
transport.go1.05 kB
package transport import "github.com/emicklei/melrose/core" // https://www.midi.org/specifications-old/item/table-1-summary-of-midi-message const ( noteOn int16 = 0x90 // 10010000 , 144 noteOff int16 = 0x80 // 10000000 , 128 controlChange int16 = 0xB0 // 10110000 , 176 noteAllOff int16 = 0x78 // 01111000 , 120 (not 123 because sustain) sustainPedal int16 = 0x40 ) var Factory = func() Transporter { return nil } var Initializer = func() {} type Transporter interface { HasInputCapability() bool PrintInfo(inID, outID int) DefaultOutputDeviceID() int DefaultInputDeviceID() int NewMIDIOut(id int) (MIDIOut, error) NewMIDIIn(id int) (MIDIIn, error) NewMIDIListener(MIDIIn) MIDIListener } type MIDIOut interface { WriteShort(status int64, data1 int64, data2 int64) error Close() error } type MIDIIn interface { Close() error } type MIDIListener interface { Add(core.NoteListener) Remove(core.NoteListener) OnKey(core.Note, core.NoteListener) HandleMIDIMessage(status int16, nr, data2 int) Start() Stop() }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emicklei/melrose'

If you have feedback or need assistance with the MCP directory API, please join our Discord server