Documentation ¶
Index ¶
- Variables
- func NewPortmidiDevice() (util.MidiDevice, error)
- type APIHandler
- type Command
- type Hub
- type OSCEvent
- type PlaybackEvent
- type PortmidiDevice
- func (m *PortmidiDevice) Inputs() []string
- func (m *PortmidiDevice) Listen(dev string) error
- func (m *PortmidiDevice) ListeningInputs() []string
- func (m *PortmidiDevice) Outputs() []string
- func (m PortmidiDevice) Poll(inputName string) (bool, error)
- func (m PortmidiDevice) ReadEvent(inputName string) (util.MidiEvent, error)
- func (m *PortmidiDevice) SendANO(synth string)
- func (m *PortmidiDevice) SendNote(n *util.Note, debug bool, callbacks []*util.NoteOutputCallback)
- type PortmidiEvent
- type SynthDef
- type TuioCursor
Constants ¶
This section is empty.
Variables ¶
var DebugHub = util.DebugFlags{ MIDI: false, API: false, Loop: false, Gen: false, Realtime: true, OSC: false, ISF: false, }
DebugHub controls debugging output
Functions ¶
func NewPortmidiDevice ¶
func NewPortmidiDevice() (util.MidiDevice, error)
NewPortmidiDevice returns a MidiDevice interface for portmidi
Types ¶
type APIHandler ¶
APIHandler is an API execution func
type Command ¶
type Command struct { Action string // e.g. "addmidi" Arg interface{} }
Command is sent on the control channel of the Hub
type Hub ¶
type Hub struct { OSCInput chan OSCEvent MIDIInput chan util.MidiEvent MIDINumDown int MIDIOctaveShift int // contains filtered or unexported fields }
Hub is a router for devices and engines
func (*Hub) ListenForever ¶
func (hub *Hub) ListenForever()
ListenForever listens for things on its input channels
type PlaybackEvent ¶
type PlaybackEvent struct {
// contains filtered or unexported fields
}
PlaybackEvent is a time-tagged cursor or API event
type PortmidiDevice ¶
type PortmidiDevice struct { MidiInputs map[string]*midiInput MidiInputNames []string MidiOutputNames []string // contains filtered or unexported fields }
PortmidiDevice encapsulate everything having to do with MIDI I/O
func (*PortmidiDevice) Inputs ¶
func (m *PortmidiDevice) Inputs() []string
Inputs returns a list of MIDI input names
func (*PortmidiDevice) Listen ¶
func (m *PortmidiDevice) Listen(dev string) error
Listen for input on a particular MIDI device
func (*PortmidiDevice) ListeningInputs ¶
func (m *PortmidiDevice) ListeningInputs() []string
ListeningInputs returns a list of MIDI input names that are open for listening
func (*PortmidiDevice) Outputs ¶
func (m *PortmidiDevice) Outputs() []string
Outputs returns a list of MIDI output names
func (PortmidiDevice) ReadEvent ¶
func (m PortmidiDevice) ReadEvent(inputName string) (util.MidiEvent, error)
ReadEvent is
func (*PortmidiDevice) SendANO ¶
func (m *PortmidiDevice) SendANO(synth string)
SendANO sends all-notes-off
func (*PortmidiDevice) SendNote ¶
func (m *PortmidiDevice) SendNote(n *util.Note, debug bool, callbacks []*util.NoteOutputCallback)
SendNote sends MIDI output for a Note
type PortmidiEvent ¶
PortmidiEvent is a single MIDI input event XXX - since is local, PortmidiEvent should just be portmidi.Event
type SynthDef ¶
type SynthDef struct {
// contains filtered or unexported fields
}
SynthDef is the port and channel for a given synth
type TuioCursor ¶
type TuioCursor struct {
// contains filtered or unexported fields
}
TuioCursor is a TUIO cursor, the main purpose being to know when it hasn't been seen for a while, to generate an UP event