Documentation
¶
Index ¶
- Variables
- type DeviceRegistry
- func (r *DeviceRegistry) Close() error
- func (r *DeviceRegistry) Command(args []string) notify.Message
- func (r *DeviceRegistry) DefaultDeviceIDs() (inputDeviceID, outputDeviceID int)
- func (r *DeviceRegistry) HandleSetting(name string, values []any) error
- func (r *DeviceRegistry) HasInputCapability() bool
- func (r *DeviceRegistry) Input(id int) (*InputDevice, error)
- func (r *DeviceRegistry) ListDevices() (list []core.DeviceDescriptor)
- func (r *DeviceRegistry) Listen(deviceID int, who core.NoteListener, isStart bool)
- func (r *DeviceRegistry) OnKey(ctx core.Context, deviceID int, channel int, note core.Note, fun core.HasValue) error
- func (r *DeviceRegistry) Output(id int) (*OutputDevice, error)
- func (r *DeviceRegistry) PlayWithClock(condition core.Condition, seq core.Sequenceable, clock *core.PlaybackClock) time.Time
- func (r *DeviceRegistry) PrintInfoWithoutInstructions()
- func (r *DeviceRegistry) Report()
- func (r *DeviceRegistry) Reset()
- func (r *DeviceRegistry) ResetListeners()
- func (r *DeviceRegistry) Schedule(e core.TimelineEvent, beginAt time.Time)
- type EchoListener
- type InputDevice
- type KeyTrigger
- type Message
- type OutputDevice
Constants ¶
This section is empty.
Variables ¶
var DefaultEchoListener = EchoListener{}
Functions ¶
This section is empty.
Types ¶
type DeviceRegistry ¶ added in v0.9.2
type DeviceRegistry struct {
// contains filtered or unexported fields
}
func NewDeviceRegistry ¶ added in v0.9.2
func NewDeviceRegistry(bpm func() float64) (*DeviceRegistry, error)
func (*DeviceRegistry) Close ¶ added in v0.9.2
func (r *DeviceRegistry) Close() error
func (*DeviceRegistry) Command ¶ added in v0.9.2
func (r *DeviceRegistry) Command(args []string) notify.Message
Command is part of melrose.AudioDevice
func (*DeviceRegistry) DefaultDeviceIDs ¶ added in v0.9.2
func (r *DeviceRegistry) DefaultDeviceIDs() (inputDeviceID, outputDeviceID int)
DefaultDeviceIDs is part of AudioDevice
func (*DeviceRegistry) HandleSetting ¶ added in v0.9.2
func (r *DeviceRegistry) HandleSetting(name string, values []any) error
func (*DeviceRegistry) HasInputCapability ¶ added in v0.9.2
func (r *DeviceRegistry) HasInputCapability() bool
func (*DeviceRegistry) Input ¶ added in v0.9.2
func (r *DeviceRegistry) Input(id int) (*InputDevice, error)
func (*DeviceRegistry) ListDevices ¶ added in v0.58.0
func (r *DeviceRegistry) ListDevices() (list []core.DeviceDescriptor)
func (*DeviceRegistry) Listen ¶ added in v0.9.2
func (r *DeviceRegistry) Listen(deviceID int, who core.NoteListener, isStart bool)
func (*DeviceRegistry) Output ¶ added in v0.9.2
func (r *DeviceRegistry) Output(id int) (*OutputDevice, error)
func (*DeviceRegistry) PlayWithClock ¶ added in v1.0.0
func (r *DeviceRegistry) PlayWithClock(condition core.Condition, seq core.Sequenceable, clock *core.PlaybackClock) time.Time
PlayWithClock schedules all the notes on the timeline beginning at the clock's time (now or in the future). Returns the end time of the last played Note.
func (*DeviceRegistry) PrintInfoWithoutInstructions ¶ added in v1.0.0
func (r *DeviceRegistry) PrintInfoWithoutInstructions()
func (*DeviceRegistry) Report ¶ added in v0.55.2
func (r *DeviceRegistry) Report()
func (*DeviceRegistry) Reset ¶ added in v0.9.2
func (r *DeviceRegistry) Reset()
func (*DeviceRegistry) ResetListeners ¶ added in v1.0.0
func (r *DeviceRegistry) ResetListeners()
ResetListeners will call reset on each listener TODO used?
func (*DeviceRegistry) Schedule ¶ added in v0.9.2
func (r *DeviceRegistry) Schedule(e core.TimelineEvent, beginAt time.Time)
Schedule exists for Loop
type EchoListener ¶ added in v0.44.0
type EchoListener struct {
}
func (EchoListener) ControlChange ¶ added in v0.44.0
func (e EchoListener) ControlChange(channel, number, value int)
func (EchoListener) NoteOff ¶ added in v0.44.0
func (e EchoListener) NoteOff(channel int, n core.Note)
func (EchoListener) NoteOn ¶ added in v0.44.0
func (e EchoListener) NoteOn(channel int, n core.Note)
func (EchoListener) PrintInfo ¶ added in v1.0.0
func (e EchoListener) PrintInfo()
type InputDevice ¶ added in v0.9.2
type InputDevice struct {
// contains filtered or unexported fields
}
func NewInputDevice ¶ added in v0.9.2
func NewInputDevice(id int, in transport.MIDIIn, t transport.Transporter) *InputDevice
func (*InputDevice) Listener ¶ added in v0.9.2
func (i *InputDevice) Listener() transport.MIDIListener
This is needed by WASM
func (*InputDevice) PrintListenerInfo ¶ added in v1.0.0
func (i *InputDevice) PrintListenerInfo()
type KeyTrigger ¶ added in v0.9.2
type KeyTrigger struct {
// contains filtered or unexported fields
}
func NewKeyTrigger ¶ added in v0.9.2
func (*KeyTrigger) ControlChange ¶ added in v0.9.2
func (t *KeyTrigger) ControlChange(channel, number, value int)
func (*KeyTrigger) NoteOff ¶ added in v0.9.2
func (t *KeyTrigger) NoteOff(channel int, n core.Note)
NoteOff is part of core.NoteListener
func (*KeyTrigger) NoteOn ¶ added in v0.9.2
func (t *KeyTrigger) NoteOn(channel int, n core.Note)
NoteOn is part of core.NoteListener
func (*KeyTrigger) PrintInfo ¶ added in v1.0.0
func (t *KeyTrigger) PrintInfo()
type Message ¶ added in v0.9.2
type Message struct {
// contains filtered or unexported fields
}
func NewMessage ¶ added in v0.9.2
func (Message) Evaluate ¶ added in v0.9.2
Evaluate implements core.Evaluatable perform the message send
type OutputDevice ¶ added in v0.9.2
type OutputDevice struct {
// contains filtered or unexported fields
}
func NewOutputDevice ¶ added in v0.9.2
func (*OutputDevice) PlayWithClock ¶ added in v1.0.0
func (d *OutputDevice) PlayWithClock(condition core.Condition, seq core.Sequenceable, clock *core.PlaybackClock) time.Time
func (*OutputDevice) Reset ¶ added in v0.9.2
func (d *OutputDevice) Reset()
func (*OutputDevice) Start ¶ added in v0.9.2
func (d *OutputDevice) Start()