Documentation ¶
Index ¶
- type Clock
- type Instrument
- func (i *Instrument) AddThing(thing *things.Thing)
- func (i *Instrument) ExposeSetting(name string, setting *things.Setting)
- func (i *Instrument) HideSetting(setting *things.Setting)
- func (i *Instrument) Next(sample int, entryPoint int) float64
- func (i *Instrument) SetEntryPointNextable(entryPointNextable things.Nextable)
- func (i *Instrument) SetExitPoint(exitPoint *things.Output)
- type InstrumentPatch
- func (ip *InstrumentPatch) Apply()
- func (ip *InstrumentPatch) Get(setting *things.Setting) float64
- func (ip *InstrumentPatch) Next(sample int) float64
- func (ip *InstrumentPatch) NoteOff(hz float64)
- func (ip *InstrumentPatch) NoteOn(hz float64)
- func (ip *InstrumentPatch) Set(setting *things.Setting, value float64)
- type Loop
- type MidiDevice
- type MidiManager
- func (mm *MidiManager) AttachSettingToNextEvent(patch *InstrumentPatch, setting *things.Setting)
- func (mm *MidiManager) ConnectToDevice(deviceID portmidi.DeviceID)
- func (mm *MidiManager) GetDevices() []*portmidi.DeviceInfo
- func (mm *MidiManager) Process(msg midi.Message)
- func (mm *MidiManager) ProcessLoopMessage(patch *InstrumentPatch, msg midi.Message)
- func (mm *MidiManager) SetCurrentInstrumentPatch(patch *InstrumentPatch)
- func (mm *MidiManager) SetCurrentLoop(loop *Loop)
- func (mm *MidiManager) Start() error
- func (mm *MidiManager) Stop() error
- type Mutable
- type Pattern
- type Playable
- type Player
- type Sequencable
- type Sequencer
- type Track
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instrument ¶
type Instrument struct { ID int Name string EntryPoint *things.Output ExitPoint *things.Output Things []*things.Thing Settings []*things.Setting }
func NewInstrument ¶
func NewInstrument(name string) *Instrument
func (*Instrument) AddThing ¶
func (i *Instrument) AddThing(thing *things.Thing)
func (*Instrument) ExposeSetting ¶
func (i *Instrument) ExposeSetting(name string, setting *things.Setting)
func (*Instrument) HideSetting ¶
func (i *Instrument) HideSetting(setting *things.Setting)
func (*Instrument) SetEntryPointNextable ¶
func (i *Instrument) SetEntryPointNextable(entryPointNextable things.Nextable)
func (*Instrument) SetExitPoint ¶
func (i *Instrument) SetExitPoint(exitPoint *things.Output)
type InstrumentPatch ¶
type InstrumentPatch struct { ID int Instrument *Instrument // contains filtered or unexported fields }
func NewInstrumentPatch ¶
func NewInstrumentPatch(instrument *Instrument) *InstrumentPatch
func (*InstrumentPatch) Apply ¶
func (ip *InstrumentPatch) Apply()
func (*InstrumentPatch) Next ¶
func (ip *InstrumentPatch) Next(sample int) float64
func (*InstrumentPatch) NoteOff ¶
func (ip *InstrumentPatch) NoteOff(hz float64)
func (*InstrumentPatch) NoteOn ¶
func (ip *InstrumentPatch) NoteOn(hz float64)
type Loop ¶
type Loop struct { ID int Pulses int TotalPulses int IsRecording bool IsFinished bool InstrumentPatch *InstrumentPatch // contains filtered or unexported fields }
func NewLoop ¶
func NewLoop(patch *InstrumentPatch) *Loop
func (*Loop) SaveMessage ¶
func (*Loop) StartRecording ¶
func (l *Loop) StartRecording()
func (*Loop) StopRecording ¶
func (l *Loop) StopRecording()
type MidiDevice ¶
func NewMidiDevice ¶
func NewMidiDevice(deviceID portmidi.DeviceID) *MidiDevice
func (*MidiDevice) Start ¶
func (md *MidiDevice) Start() error
func (*MidiDevice) Stop ¶
func (md *MidiDevice) Stop() error
type MidiManager ¶
type MidiManager struct {
// contains filtered or unexported fields
}
func NewMidiManager ¶
func NewMidiManager() *MidiManager
func (*MidiManager) AttachSettingToNextEvent ¶
func (mm *MidiManager) AttachSettingToNextEvent(patch *InstrumentPatch, setting *things.Setting)
func (*MidiManager) ConnectToDevice ¶
func (mm *MidiManager) ConnectToDevice(deviceID portmidi.DeviceID)
func (*MidiManager) GetDevices ¶
func (mm *MidiManager) GetDevices() []*portmidi.DeviceInfo
func (*MidiManager) Process ¶
func (mm *MidiManager) Process(msg midi.Message)
func (*MidiManager) ProcessLoopMessage ¶
func (mm *MidiManager) ProcessLoopMessage(patch *InstrumentPatch, msg midi.Message)
func (*MidiManager) SetCurrentInstrumentPatch ¶
func (mm *MidiManager) SetCurrentInstrumentPatch(patch *InstrumentPatch)
func (*MidiManager) SetCurrentLoop ¶
func (mm *MidiManager) SetCurrentLoop(loop *Loop)
func (*MidiManager) Start ¶
func (mm *MidiManager) Start() error
func (*MidiManager) Stop ¶
func (mm *MidiManager) Stop() error
type Sequencable ¶
type Sequencable interface { IsPlaying() bool Play() Stop() }
type Sequencer ¶
type Sequencer struct {
// contains filtered or unexported fields
}
func NewSequencer ¶
func NewSequencer(clock *Clock, midiManager *MidiManager) *Sequencer
Click to show internal directories.
Click to hide internal directories.