Documentation ¶
Index ¶
- func EnableFilterEnvelope(v Voice, enabled bool)
- func EnablePanEnvelope(v Voice, enabled bool)
- func EnablePitchEnvelope(v Voice, enabled bool)
- func EnableVolumeEnvelope(v Voice, enabled bool)
- func GetCurrentFilterEnvelope(v Voice) int8
- func GetFinalPan(v Voice) panning.Position
- func GetFinalPeriod(v Voice) period.Period
- func GetFinalVolume(v Voice) volume.Volume
- func GetPan(v Voice) panning.Position
- func GetPeriod(v Voice) period.Period
- func GetPeriodDelta(v Voice) period.Delta
- func GetPos(v Voice) sampling.Pos
- func GetVolume(v Voice) volume.Volume
- func IsVolumeEnvelopeEnabled(v Voice) bool
- func SetAllEnvelopePositions(v Voice, pos int)
- func SetFilterEnvelopePosition(v Voice, pos int)
- func SetPan(v Voice, pan panning.Position)
- func SetPanEnvelopePosition(v Voice, pos int)
- func SetPeriod(v Voice, period period.Period)
- func SetPeriodDelta(v Voice, delta period.Delta)
- func SetPitchEnvelopePosition(v Voice, pos int)
- func SetPos(v Voice, pos sampling.Pos)
- func SetVolume(v Voice, vol volume.Volume)
- func SetVolumeEnvelopePosition(v Voice, pos int)
- type AmpModulator
- type AutoVibrato
- type Callback
- type Controller
- type FilterApplier
- type FilterEnveloper
- type FreqModulator
- type PanEnveloper
- type PanModulator
- type PitchEnveloper
- type Positioner
- type Transaction
- type Voice
- type VolumeEnveloper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableFilterEnvelope ¶
EnableFilterEnvelope sets the filter envelope enable flag, if the interface for it exists on the voice
func EnablePanEnvelope ¶
EnablePanEnvelope sets the pan envelope enable flag, if the interface for it exists on the voice
func EnablePitchEnvelope ¶
EnablePitchEnvelope sets the pitch envelope enable flag, if the interface for it exists on the voice
func EnableVolumeEnvelope ¶
EnableVolumeEnvelope sets the volume envelope enable flag, if the interface for it exists on the voice
func GetCurrentFilterEnvelope ¶
GetCurrentFilterEnvelope returns the filter envelope's current value, if the interface for it exists on the voice
func GetFinalPan ¶
GetFinalPan returns the final panning position from the pan modulator, if the interface for it exists on the voice
func GetFinalPeriod ¶
GetFinalPeriod returns the final period from the frequency modulator, if the interface for it exists on the voice
func GetFinalVolume ¶
GetFinalVolume returns the final volume from the amplitude modulator, if the interface for it exists on the voice
func GetPan ¶
GetPan gets the period from the pan modulator, if the interface for it exists on the voice
func GetPeriod ¶
GetPeriod gets the period from the frequency modulator, if the interface for it exists on the voice
func GetPeriodDelta ¶
GetPeriodDelta returns the period delta from the frequency modulator, if the interface for it exists on the voice
func GetPos ¶
GetPos gets the position from the positioner, if the interface for it exists on the voice
func GetVolume ¶
GetVolume gets the volume from the amplitude modulator, if the interface for it exists on the voice
func IsVolumeEnvelopeEnabled ¶
IsVolumeEnvelopeEnabled returns true if the volume envelope is enabled and the interface for it exists on the voice
func SetAllEnvelopePositions ¶
SetEnvelopePosition sets the envelope position(s) on the voice
func SetFilterEnvelopePosition ¶
SetFilterEnvelopePosition sets the filter envelope position, if the interface for it exists on the voice
func SetPan ¶
SetPan sets the period into the pan modulator, if the interface for it exists on the voice
func SetPanEnvelopePosition ¶
SetPanEnvelopePosition sets the pan envelope position, if the interface for it exists on the voice
func SetPeriod ¶
SetPeriod sets the period into the frequency modulator, if the interface for it exists on the voice
func SetPeriodDelta ¶
SetPeriodDelta sets the period delta into the frequency modulator, if the interface for it exists on the voice
func SetPitchEnvelopePosition ¶
SetPitchEnvelopePosition sets the pitch envelope position, if the interface for it exists on the voice
func SetPos ¶
SetPos sets the position within the positioner, if the interface for it exists on the voice
func SetVolume ¶
SetVolume sets the volume into the amplitude modulator, if the interface for it exists on the voice
func SetVolumeEnvelopePosition ¶
SetVolumeEnvelopePosition sets the volume envelope position, if the interface for it exists on the voice
Types ¶
type AmpModulator ¶
type AmpModulator interface { SetVolume(vol volume.Volume) GetVolume() volume.Volume GetFinalVolume() volume.Volume }
AmpModulator is the instrument volume (amplitude) control interface
type AutoVibrato ¶
type AutoVibrato struct { Enabled bool Sweep int WaveformSelection uint8 Depth float32 Rate int Factory func() oscillator.Oscillator }
AutoVibrato is the setting and memory for the auto-vibrato system
func (*AutoVibrato) Generate ¶
func (a *AutoVibrato) Generate() oscillator.Oscillator
Generate creates an AutoVibrato waveform oscillator and configures it with the inital values
type Callback ¶
type Callback func(v Voice)
Callback is a callback function for performing some sort of action at a later time
type Controller ¶
type Controller interface { Attack() Release() Fadeout() IsKeyOn() bool IsFadeout() bool IsDone() bool SetActive(active bool) IsActive() bool }
Controller is the instrument actuation control interface
type FilterApplier ¶
type FilterApplier interface { ApplyFilter(dry volume.Matrix) volume.Matrix SetFilterEnvelopeValue(envVal int8) }
FilterApplier is an interface for applying a filter to a sample stream
type FilterEnveloper ¶
type FilterEnveloper interface { EnableFilterEnvelope(enabled bool) IsFilterEnvelopeEnabled() bool GetCurrentFilterEnvelope() int8 SetFilterEnvelopePosition(pos int) }
FilterEnveloper is a filter envelope interface
type FreqModulator ¶
type FreqModulator interface { SetPeriod(period period.Period) GetPeriod() period.Period SetPeriodDelta(delta period.Delta) GetPeriodDelta() period.Delta GetFinalPeriod() period.Period }
FreqModulator is the instrument frequency control interface
type PanEnveloper ¶
type PanEnveloper interface { EnablePanEnvelope(enabled bool) IsPanEnvelopeEnabled() bool GetCurrentPanEnvelope() panning.Position SetPanEnvelopePosition(pos int) }
PanEnveloper is a pan envelope interface
type PanModulator ¶
type PanModulator interface { SetPan(vol panning.Position) GetPan() panning.Position GetFinalPan() panning.Position }
PanModulator is the instrument pan (spatial) control interface
type PitchEnveloper ¶
type PitchEnveloper interface { EnablePitchEnvelope(enabled bool) IsPitchEnvelopeEnabled() bool GetCurrentPitchEnvelope() period.Delta SetPitchEnvelopePosition(pos int) }
PitchEnveloper is a pitch envelope interface
type Positioner ¶
Positioner is the instrument position (timeline) control interface
type Transaction ¶
type Transaction interface { Cancel() Commit() GetVoice() Voice Clone() Transaction SetActive(active bool) IsPendingActive() (bool, bool) IsCurrentlyActive() bool Attack() Release() Fadeout() SetPeriod(period period.Period) GetPendingPeriod() (period.Period, bool) GetCurrentPeriod() period.Period SetPeriodDelta(delta period.Delta) GetPendingPeriodDelta() (period.Delta, bool) GetCurrentPeriodDelta() period.Delta SetVolume(vol volume.Volume) GetPendingVolume() (volume.Volume, bool) GetCurrentVolume() volume.Volume SetPos(pos sampling.Pos) GetPendingPos() (sampling.Pos, bool) GetCurrentPos() sampling.Pos SetPan(pan panning.Position) GetPendingPan() (panning.Position, bool) GetCurrentPan() panning.Position SetVolumeEnvelopePosition(pos int) EnableVolumeEnvelope(enabled bool) IsPendingVolumeEnvelopeEnabled() (bool, bool) IsCurrentVolumeEnvelopeEnabled() bool SetPitchEnvelopePosition(pos int) EnablePitchEnvelope(enabled bool) SetPanEnvelopePosition(pos int) EnablePanEnvelope(enabled bool) SetFilterEnvelopePosition(pos int) EnableFilterEnvelope(enabled bool) SetAllEnvelopePositions(pos int) }
Transaction is an interface for updating Voice settings
type Voice ¶
type Voice interface { Controller sampling.SampleStream // == required function interfaces == Advance(tickDuration time.Duration) GetSampler(samplerRate float32) sampling.Sampler Clone() Voice StartTransaction() Transaction }
Voice is a voice interface