Documentation ¶
Index ¶
- type Event
- type EventType
- type Mixer
- func (m *Mixer) AddChannel(ch channels.Channel)
- func (m *Mixer) ChangeInstrument(cfg *audio.AudioConfig, channel, instr int)
- func (m *Mixer) GetSamples(cfg *audio.AudioConfig, n int) []int
- func (m *Mixer) HasSolo() bool
- func (m *Mixer) NoteOff(channel, note int)
- func (m *Mixer) NoteOn(channel, note int, velocity float64)
- func (m *Mixer) SetChannelExpressionVolume(ch int, volume int)
- func (m *Mixer) SetChannelPanning(ch int, panning int)
- func (m *Mixer) SetChannelVolume(ch int, volume int)
- func (m *Mixer) SetGrainOption(channel int, opt channels.GrainOption, value interface{})
- func (m *Mixer) SetHPFCutoff(channel int, freq int)
- func (m *Mixer) SetInstrument(cfg *audio.AudioConfig, channel int, instr instruments.Instrument)
- func (m *Mixer) SetLPFCutoff(channel int, freq int)
- func (m *Mixer) SetMasterGain(g float64)
- func (m *Mixer) SetPitchbend(channel int, pitchbendFactor float64)
- func (m *Mixer) SetReverb(channel, reverb int)
- func (m *Mixer) SetReverbFeedback(channel int, fb float64)
- func (m *Mixer) SetReverbTime(channel int, time float64)
- func (m *Mixer) SetTremelo(channel, reverb int)
- func (m *Mixer) SilenceAllChannels()
- func (m *Mixer) SilenceChannel(ch int)
- func (m *Mixer) ToggleSoloChannel(ch int)
- type Synth
- func (s *Synth) ChangeInstrument(channel, instrument int)
- func (s *Synth) Close()
- func (s *Synth) EnableSDLSink() error
- func (s *Synth) EnableWavSink(file string) error
- func (s *Synth) LoadInstrumentBank(file string) error
- func (s *Synth) LoadPercussionBank(file string) error
- func (s *Synth) SetMasterGain(v float64)
- func (s *Synth) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Type EventType Channel int Value string Values []int FloatValues []float64 Instrument instruments.Instrument }
func NewInstrumentEvent ¶
func NewInstrumentEvent(ty EventType, channel int, value instruments.Instrument) *Event
type EventType ¶
type EventType int
const ( NoteOn EventType = iota NoteOff EventType = iota SetChannelVolume EventType = iota SetChannelExpressionVolume EventType = iota SetChannelPanning EventType = iota SetReverb EventType = iota SetTremelo EventType = iota SetChorus EventType = iota SetDetuneEffect EventType = iota SetPhaser EventType = iota ProgramChange EventType = iota SilenceChannel EventType = iota PitchBend EventType = iota // Non-midi; require float value(s) SetReverbTime EventType = iota SetReverbFeedback EventType = iota SetLPFCutoff EventType = iota SetHPFCutoff EventType = iota SetGrain EventType = iota SetGrainGain EventType = iota SetGrainSize EventType = iota SetGrainBirthRate EventType = iota SetGrainDensity EventType = iota SetGrainSpread EventType = iota SetGrainSpeed EventType = iota ToggleSoloChannel EventType = iota SilenceAllChannels EventType = iota SetInstrument EventType = iota SetMasterGain EventType = iota ForceUIReload EventType = iota )
type Mixer ¶
type Mixer struct { Channels []channels.Channel Gain []float64 ExpressionVolume []float64 Panning []float64 Solo []bool MasterGain float64 }
func (*Mixer) AddChannel ¶
func (*Mixer) ChangeInstrument ¶
func (m *Mixer) ChangeInstrument(cfg *audio.AudioConfig, channel, instr int)
func (*Mixer) GetSamples ¶
func (m *Mixer) GetSamples(cfg *audio.AudioConfig, n int) []int
func (*Mixer) SetChannelExpressionVolume ¶
func (*Mixer) SetChannelPanning ¶
func (*Mixer) SetChannelVolume ¶
func (*Mixer) SetGrainOption ¶
func (m *Mixer) SetGrainOption(channel int, opt channels.GrainOption, value interface{})
func (*Mixer) SetHPFCutoff ¶
func (*Mixer) SetInstrument ¶
func (m *Mixer) SetInstrument(cfg *audio.AudioConfig, channel int, instr instruments.Instrument)
func (*Mixer) SetLPFCutoff ¶
func (*Mixer) SetMasterGain ¶
func (*Mixer) SetPitchbend ¶
func (*Mixer) SetReverbFeedback ¶
func (*Mixer) SetReverbTime ¶
func (*Mixer) SetTremelo ¶
func (*Mixer) SilenceAllChannels ¶
func (m *Mixer) SilenceAllChannels()
func (*Mixer) SilenceChannel ¶
func (*Mixer) ToggleSoloChannel ¶
type Synth ¶
type Synth struct { Config *audio.AudioConfig Mixer *Mixer Sinks []sinks.Sink Inputs chan *Event Outputs chan *ui.UIEvent Debug bool Recorder *sinks.WavSink }
func NewSynth ¶
func NewSynth(cfg *audio.AudioConfig) *Synth
func (*Synth) ChangeInstrument ¶
func (*Synth) EnableSDLSink ¶
func (*Synth) EnableWavSink ¶
func (*Synth) LoadInstrumentBank ¶
func (*Synth) LoadPercussionBank ¶
func (*Synth) SetMasterGain ¶
Click to show internal directories.
Click to hide internal directories.