midi

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 10 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) OnKey added in v0.9.2

func (r *DeviceRegistry) OnKey(ctx core.Context, deviceID int, channel int, note core.Note, fun core.HasValue) error

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 NewKeyTrigger(ctx core.Context, channel int, onNote core.Note, startStop core.HasValue) *KeyTrigger

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 NewMessage(audioDevices core.AudioDevice, id core.HasValue, status int, channel, data1, data2 core.HasValue) Message

func (Message) Evaluate added in v0.9.2

func (m Message) Evaluate(ctx core.Context) error

Evaluate implements core.Evaluatable perform the message send

func (Message) S added in v0.9.2

func (m Message) S() core.Sequence

S has the side effect that the MIDI message is send using the device of the context

func (Message) Storex added in v0.9.2

func (m Message) Storex() string

type OutputDevice added in v0.9.2

type OutputDevice struct {
	// contains filtered or unexported fields
}

func NewOutputDevice added in v0.9.2

func NewOutputDevice(id int, out transport.MIDIOut, ch int, line *core.Timeline) *OutputDevice

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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL