Documentation ¶
Index ¶
- type Controller
- func (c *Controller) DecreaseSequencerBPM()
- func (c *Controller) EnableSDLSink() error
- func (c *Controller) EnableWavSink(file string) error
- func (c *Controller) IncreaseSequencerBPM()
- func (c *Controller) LoadEmptySequencer()
- func (c *Controller) LoadInstrumentBank(file string) error
- func (c *Controller) LoadPercussionBank(file string) error
- func (c *Controller) LoadSequencerFromFile(file string) error
- func (c *Controller) MoveSequencerBackward()
- func (c *Controller) MoveSequencerForward()
- func (c *Controller) Quit()
- func (c *Controller) ReloadInstrumentBank() error
- func (c *Controller) ReloadPercussionBank() error
- func (c *Controller) ReloadSequencer()
- func (c *Controller) StartSequencer()
- func (c *Controller) StartSynth()
- func (c *Controller) ToggleSoloChannel(ch int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { Config *audio.AudioConfig Synth *synth.Synth Sequencer *sequencer.Sequencer InstrumentBankFile string PercussionBankFile string UI ui.UI }
The Controller is a high level object that can be used to setup and control the Synthesizer, Sequencer and the instrument banks.
func NewController ¶
func NewController(cfg *audio.AudioConfig) *Controller
func (*Controller) DecreaseSequencerBPM ¶
func (c *Controller) DecreaseSequencerBPM()
func (*Controller) EnableSDLSink ¶
func (c *Controller) EnableSDLSink() error
Enables "real-time" audio output using the SDL library.
func (*Controller) EnableWavSink ¶
func (c *Controller) EnableWavSink(file string) error
Record all Synthesizer output in to a .wav file. The file gets written when the sink closes (usually when the program ends).
func (*Controller) IncreaseSequencerBPM ¶
func (c *Controller) IncreaseSequencerBPM()
func (*Controller) LoadEmptySequencer ¶
func (c *Controller) LoadEmptySequencer()
func (*Controller) LoadInstrumentBank ¶
func (c *Controller) LoadInstrumentBank(file string) error
Load an instrument bank definition from a file.
func (*Controller) LoadPercussionBank ¶
func (c *Controller) LoadPercussionBank(file string) error
Load an percussion instrument bank definition from a file.
func (*Controller) LoadSequencerFromFile ¶
func (c *Controller) LoadSequencerFromFile(file string) error
Load a Sequencer definition from a file and start the sequencer in a go-routine.
func (*Controller) MoveSequencerBackward ¶
func (c *Controller) MoveSequencerBackward()
func (*Controller) MoveSequencerForward ¶
func (c *Controller) MoveSequencerForward()
func (*Controller) ReloadInstrumentBank ¶
func (c *Controller) ReloadInstrumentBank() error
Reload the instrument bank by reloading the file.
func (*Controller) ReloadPercussionBank ¶
func (c *Controller) ReloadPercussionBank() error
Reload the instrument percussion bank by reloading the file.
func (*Controller) ReloadSequencer ¶
func (c *Controller) ReloadSequencer()
Reload the sequencer by reloading the file.
func (*Controller) StartSequencer ¶
func (c *Controller) StartSequencer()
Start Sequencer. The sequencer is started in its own go-routine.
func (*Controller) StartSynth ¶
func (c *Controller) StartSynth()
Start Synthesizer. Note that this synthesizer isn't run in a go-routine by default.
func (*Controller) ToggleSoloChannel ¶
func (c *Controller) ToggleSoloChannel(ch int)