Documentation ¶
Index ¶
- Constants
- type ConfigStruct
- type Identification
- type MidiDevice
- func (d *MidiDevice) ChangeChannel(value int)
- func (d *MidiDevice) ChangeOctave(value int)
- func (d *MidiDevice) ChangeProgram(value int)
- func (d *MidiDevice) ChangeSemitone(value int)
- func (d *MidiDevice) Close()
- func (d *MidiDevice) HandleRawEvent(event hardware.KeyEvent)
- func (d *MidiDevice) Process()
- func (d *MidiDevice) String() string
- type MidiEvent
- type Options
Constants ¶
View Source
const ( Always = "always" Never = "never" NewPressOnly = "new_presses_only" )
View Source
const ( // channel info are in first byte and last four bits MidiNoteOn uint8 = 0x90 // first byte, first four bit mask, should be mixed with channel bits (last four bits)` MidiNoteOff uint8 = 0x80 MidiControlAndMode uint8 = 0xb0 MidiProgramChange uint8 = 0xc0 MidiPitchControl uint8 = 0xe0 MidiPanic uint8 = 0x7b // all notes off (status bytes) Note = iota Control PitchControl PitchControlToggle Panic // ControlEvents targets Reset OctaveUp OctaveDown SemitoneUp SemitoneDown ChannelUp ChannelDown ProgramUp ProgramDown OctaveAdd OctaveDel )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigStruct ¶
type ConfigStruct struct { Identification Identification `yaml:"identification"` Control map[uint8]string `yaml:"control"` Notes map[uint8]uint8 `yaml:"notes"` Options Options `yaml:"options"` AutoConnect []string `yaml:"auto_connect"` }
configuration yaml structure
type Identification ¶
type MidiDevice ¶
type MidiDevice struct { Handler *hardware.Handler Config ConfigStruct MidiPort *jack.Port // contains filtered or unexported fields }
func (*MidiDevice) ChangeChannel ¶
func (d *MidiDevice) ChangeChannel(value int)
func (*MidiDevice) ChangeOctave ¶
func (d *MidiDevice) ChangeOctave(value int)
func (*MidiDevice) ChangeProgram ¶
func (d *MidiDevice) ChangeProgram(value int)
func (*MidiDevice) ChangeSemitone ¶
func (d *MidiDevice) ChangeSemitone(value int)
func (*MidiDevice) Close ¶
func (d *MidiDevice) Close()
func (*MidiDevice) HandleRawEvent ¶
func (d *MidiDevice) HandleRawEvent(event hardware.KeyEvent)
main function responsible for processing raw hardware events to Midi
func (*MidiDevice) Process ¶
func (d *MidiDevice) Process()
func (*MidiDevice) String ¶
func (d *MidiDevice) String() string
Click to show internal directories.
Click to hide internal directories.