Documentation
¶
Index ¶
- type Instrument
- type InstrumentRegion
- func (region *InstrumentRegion) GetAttackModulationEnvelope() float32
- func (region *InstrumentRegion) GetAttackVolumeEnvelope() float32
- func (region *InstrumentRegion) GetChorusEffectsSend() float32
- func (region *InstrumentRegion) GetCoarseTune() int32
- func (region *InstrumentRegion) GetDecayModulationEnvelope() float32
- func (region *InstrumentRegion) GetDecayVolumeEnvelope() float32
- func (region *InstrumentRegion) GetDelayModulationEnvelope() float32
- func (region *InstrumentRegion) GetDelayModulationLfo() float32
- func (region *InstrumentRegion) GetDelayVibratoLfo() float32
- func (region *InstrumentRegion) GetDelayVolumeEnvelope() float32
- func (region *InstrumentRegion) GetEndAddressOffset() int32
- func (region *InstrumentRegion) GetEndLoopAddressOffset() int32
- func (region *InstrumentRegion) GetExclusiveClass() int32
- func (region *InstrumentRegion) GetFineTune() int32
- func (region *InstrumentRegion) GetFrequencyModulationLfo() float32
- func (region *InstrumentRegion) GetFrequencyVibratoLfo() float32
- func (region *InstrumentRegion) GetHoldModulationEnvelope() float32
- func (region *InstrumentRegion) GetHoldVolumeEnvelope() float32
- func (region *InstrumentRegion) GetInitialAttenuation() float32
- func (region *InstrumentRegion) GetInitialFilterCutoffFrequency() float32
- func (region *InstrumentRegion) GetInitialFilterQ() float32
- func (region *InstrumentRegion) GetKeyNumberToModulationEnvelopeDecay() int32
- func (region *InstrumentRegion) GetKeyNumberToModulationEnvelopeHold() int32
- func (region *InstrumentRegion) GetKeyNumberToVolumeEnvelopeDecay() int32
- func (region *InstrumentRegion) GetKeyNumberToVolumeEnvelopeHold() int32
- func (region *InstrumentRegion) GetKeyRangeEnd() int32
- func (region *InstrumentRegion) GetKeyRangeStart() int32
- func (region *InstrumentRegion) GetModulationEnvelopeToFilterCutoffFrequency() int32
- func (region *InstrumentRegion) GetModulationEnvelopeToPitch() int32
- func (region *InstrumentRegion) GetModulationLfoToFilterCutoffFrequency() int32
- func (region *InstrumentRegion) GetModulationLfoToPitch() int32
- func (region *InstrumentRegion) GetModulationLfoToVolume() float32
- func (region *InstrumentRegion) GetPan() float32
- func (region *InstrumentRegion) GetReleaseModulationEnvelope() float32
- func (region *InstrumentRegion) GetReleaseVolumeEnvelope() float32
- func (region *InstrumentRegion) GetReverbEffectsSend() float32
- func (region *InstrumentRegion) GetRootKey() int32
- func (region *InstrumentRegion) GetSampleEnd() int32
- func (region *InstrumentRegion) GetSampleEndLoop() int32
- func (region *InstrumentRegion) GetSampleModes() int32
- func (region *InstrumentRegion) GetSampleStart() int32
- func (region *InstrumentRegion) GetSampleStartLoop() int32
- func (region *InstrumentRegion) GetScaleTuning() int32
- func (region *InstrumentRegion) GetStartAddressOffset() int32
- func (region *InstrumentRegion) GetStartLoopAddressOffset() int32
- func (region *InstrumentRegion) GetSustainModulationEnvelope() float32
- func (region *InstrumentRegion) GetSustainVolumeEnvelope() float32
- func (region *InstrumentRegion) GetVelocityRangeEnd() int32
- func (region *InstrumentRegion) GetVelocityRangeStart() int32
- func (region *InstrumentRegion) GetVibratoLfoToPitch() int32
- type MidiFile
- type MidiFileSequencer
- type Preset
- type PresetRegion
- func (region *PresetRegion) GetAttackModulationEnvelope() float32
- func (region *PresetRegion) GetAttackVolumeEnvelope() float32
- func (region *PresetRegion) GetChorusEffectsSend() float32
- func (region *PresetRegion) GetCoarseTune() int32
- func (region *PresetRegion) GetDecayModulationEnvelope() float32
- func (region *PresetRegion) GetDecayVolumeEnvelope() float32
- func (region *PresetRegion) GetDelayModulationEnvelope() float32
- func (region *PresetRegion) GetDelayModulationLfo() float32
- func (region *PresetRegion) GetDelayVibratoLfo() float32
- func (region *PresetRegion) GetDelayVolumeEnvelope() float32
- func (region *PresetRegion) GetFineTune() int32
- func (region *PresetRegion) GetFrequencyModulationLfo() float32
- func (region *PresetRegion) GetFrequencyVibratoLfo() float32
- func (region *PresetRegion) GetHoldModulationEnvelope() float32
- func (region *PresetRegion) GetHoldVolumeEnvelope() float32
- func (region *PresetRegion) GetInitialAttenuation() float32
- func (region *PresetRegion) GetInitialFilterCutoffFrequency() float32
- func (region *PresetRegion) GetInitialFilterQ() float32
- func (region *PresetRegion) GetKeyNumberToModulationEnvelopeDecay() int32
- func (region *PresetRegion) GetKeyNumberToModulationEnvelopeHold() int32
- func (region *PresetRegion) GetKeyNumberToVolumeEnvelopeDecay() int32
- func (region *PresetRegion) GetKeyNumberToVolumeEnvelopeHold() int32
- func (region *PresetRegion) GetKeyRangeEnd() int32
- func (region *PresetRegion) GetKeyRangeStart() int32
- func (region *PresetRegion) GetModulationEnvelopeToFilterCutoffFrequency() int32
- func (region *PresetRegion) GetModulationEnvelopeToPitch() int32
- func (region *PresetRegion) GetModulationLfoToFilterCutoffFrequency() int32
- func (region *PresetRegion) GetModulationLfoToPitch() int32
- func (region *PresetRegion) GetModulationLfoToVolume() float32
- func (region *PresetRegion) GetPan() float32
- func (region *PresetRegion) GetReleaseModulationEnvelope() float32
- func (region *PresetRegion) GetReleaseVolumeEnvelope() float32
- func (region *PresetRegion) GetReverbEffectsSend() float32
- func (region *PresetRegion) GetScaleTuning() int32
- func (region *PresetRegion) GetSustainModulationEnvelope() float32
- func (region *PresetRegion) GetSustainVolumeEnvelope() float32
- func (region *PresetRegion) GetVelocityRangeEnd() int32
- func (region *PresetRegion) GetVelocityRangeStart() int32
- func (region *PresetRegion) GetVibratoLfoToPitch() int32
- type SampleHeader
- type SoundFont
- type SoundFontInfo
- type SoundFontVersion
- type Synthesizer
- func (s *Synthesizer) NoteOff(channel int32, key int32)
- func (s *Synthesizer) NoteOffAll(immediate bool)
- func (s *Synthesizer) NoteOffAllChannel(channel int32, immediate bool)
- func (s *Synthesizer) NoteOn(channel int32, key int32, velocity int32)
- func (s *Synthesizer) ProcessMidiMessage(channel int32, command int32, data1 int32, data2 int32)
- func (s *Synthesizer) Render(left []float32, right []float32)
- func (s *Synthesizer) Reset()
- func (s *Synthesizer) ResetAllControllers()
- func (s *Synthesizer) ResetAllControllersChannel(channel int32)
- type SynthesizerSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instrument ¶
type Instrument struct { Name string Regions []*InstrumentRegion }
type InstrumentRegion ¶
type InstrumentRegion struct { Sample *SampleHeader // contains filtered or unexported fields }
func (*InstrumentRegion) GetAttackModulationEnvelope ¶
func (region *InstrumentRegion) GetAttackModulationEnvelope() float32
func (*InstrumentRegion) GetAttackVolumeEnvelope ¶
func (region *InstrumentRegion) GetAttackVolumeEnvelope() float32
func (*InstrumentRegion) GetChorusEffectsSend ¶
func (region *InstrumentRegion) GetChorusEffectsSend() float32
func (*InstrumentRegion) GetCoarseTune ¶
func (region *InstrumentRegion) GetCoarseTune() int32
func (*InstrumentRegion) GetDecayModulationEnvelope ¶
func (region *InstrumentRegion) GetDecayModulationEnvelope() float32
func (*InstrumentRegion) GetDecayVolumeEnvelope ¶
func (region *InstrumentRegion) GetDecayVolumeEnvelope() float32
func (*InstrumentRegion) GetDelayModulationEnvelope ¶
func (region *InstrumentRegion) GetDelayModulationEnvelope() float32
func (*InstrumentRegion) GetDelayModulationLfo ¶
func (region *InstrumentRegion) GetDelayModulationLfo() float32
func (*InstrumentRegion) GetDelayVibratoLfo ¶
func (region *InstrumentRegion) GetDelayVibratoLfo() float32
func (*InstrumentRegion) GetDelayVolumeEnvelope ¶
func (region *InstrumentRegion) GetDelayVolumeEnvelope() float32
func (*InstrumentRegion) GetEndAddressOffset ¶
func (region *InstrumentRegion) GetEndAddressOffset() int32
func (*InstrumentRegion) GetEndLoopAddressOffset ¶
func (region *InstrumentRegion) GetEndLoopAddressOffset() int32
func (*InstrumentRegion) GetExclusiveClass ¶
func (region *InstrumentRegion) GetExclusiveClass() int32
func (*InstrumentRegion) GetFineTune ¶
func (region *InstrumentRegion) GetFineTune() int32
func (*InstrumentRegion) GetFrequencyModulationLfo ¶
func (region *InstrumentRegion) GetFrequencyModulationLfo() float32
func (*InstrumentRegion) GetFrequencyVibratoLfo ¶
func (region *InstrumentRegion) GetFrequencyVibratoLfo() float32
func (*InstrumentRegion) GetHoldModulationEnvelope ¶
func (region *InstrumentRegion) GetHoldModulationEnvelope() float32
func (*InstrumentRegion) GetHoldVolumeEnvelope ¶
func (region *InstrumentRegion) GetHoldVolumeEnvelope() float32
func (*InstrumentRegion) GetInitialAttenuation ¶
func (region *InstrumentRegion) GetInitialAttenuation() float32
func (*InstrumentRegion) GetInitialFilterCutoffFrequency ¶
func (region *InstrumentRegion) GetInitialFilterCutoffFrequency() float32
func (*InstrumentRegion) GetInitialFilterQ ¶
func (region *InstrumentRegion) GetInitialFilterQ() float32
func (*InstrumentRegion) GetKeyNumberToModulationEnvelopeDecay ¶
func (region *InstrumentRegion) GetKeyNumberToModulationEnvelopeDecay() int32
func (*InstrumentRegion) GetKeyNumberToModulationEnvelopeHold ¶
func (region *InstrumentRegion) GetKeyNumberToModulationEnvelopeHold() int32
func (*InstrumentRegion) GetKeyNumberToVolumeEnvelopeDecay ¶
func (region *InstrumentRegion) GetKeyNumberToVolumeEnvelopeDecay() int32
func (*InstrumentRegion) GetKeyNumberToVolumeEnvelopeHold ¶
func (region *InstrumentRegion) GetKeyNumberToVolumeEnvelopeHold() int32
func (*InstrumentRegion) GetKeyRangeEnd ¶
func (region *InstrumentRegion) GetKeyRangeEnd() int32
func (*InstrumentRegion) GetKeyRangeStart ¶
func (region *InstrumentRegion) GetKeyRangeStart() int32
func (*InstrumentRegion) GetModulationEnvelopeToFilterCutoffFrequency ¶
func (region *InstrumentRegion) GetModulationEnvelopeToFilterCutoffFrequency() int32
func (*InstrumentRegion) GetModulationEnvelopeToPitch ¶
func (region *InstrumentRegion) GetModulationEnvelopeToPitch() int32
func (*InstrumentRegion) GetModulationLfoToFilterCutoffFrequency ¶
func (region *InstrumentRegion) GetModulationLfoToFilterCutoffFrequency() int32
func (*InstrumentRegion) GetModulationLfoToPitch ¶
func (region *InstrumentRegion) GetModulationLfoToPitch() int32
func (*InstrumentRegion) GetModulationLfoToVolume ¶
func (region *InstrumentRegion) GetModulationLfoToVolume() float32
func (*InstrumentRegion) GetPan ¶
func (region *InstrumentRegion) GetPan() float32
func (*InstrumentRegion) GetReleaseModulationEnvelope ¶
func (region *InstrumentRegion) GetReleaseModulationEnvelope() float32
func (*InstrumentRegion) GetReleaseVolumeEnvelope ¶
func (region *InstrumentRegion) GetReleaseVolumeEnvelope() float32
func (*InstrumentRegion) GetReverbEffectsSend ¶
func (region *InstrumentRegion) GetReverbEffectsSend() float32
func (*InstrumentRegion) GetRootKey ¶
func (region *InstrumentRegion) GetRootKey() int32
func (*InstrumentRegion) GetSampleEnd ¶
func (region *InstrumentRegion) GetSampleEnd() int32
func (*InstrumentRegion) GetSampleEndLoop ¶
func (region *InstrumentRegion) GetSampleEndLoop() int32
func (*InstrumentRegion) GetSampleModes ¶
func (region *InstrumentRegion) GetSampleModes() int32
func (*InstrumentRegion) GetSampleStart ¶
func (region *InstrumentRegion) GetSampleStart() int32
func (*InstrumentRegion) GetSampleStartLoop ¶
func (region *InstrumentRegion) GetSampleStartLoop() int32
func (*InstrumentRegion) GetScaleTuning ¶
func (region *InstrumentRegion) GetScaleTuning() int32
func (*InstrumentRegion) GetStartAddressOffset ¶
func (region *InstrumentRegion) GetStartAddressOffset() int32
func (*InstrumentRegion) GetStartLoopAddressOffset ¶
func (region *InstrumentRegion) GetStartLoopAddressOffset() int32
func (*InstrumentRegion) GetSustainModulationEnvelope ¶
func (region *InstrumentRegion) GetSustainModulationEnvelope() float32
func (*InstrumentRegion) GetSustainVolumeEnvelope ¶
func (region *InstrumentRegion) GetSustainVolumeEnvelope() float32
func (*InstrumentRegion) GetVelocityRangeEnd ¶
func (region *InstrumentRegion) GetVelocityRangeEnd() int32
func (*InstrumentRegion) GetVelocityRangeStart ¶
func (region *InstrumentRegion) GetVelocityRangeStart() int32
func (*InstrumentRegion) GetVibratoLfoToPitch ¶
func (region *InstrumentRegion) GetVibratoLfoToPitch() int32
type MidiFileSequencer ¶
type MidiFileSequencer struct {
// contains filtered or unexported fields
}
func NewMidiFileSequencer ¶
func NewMidiFileSequencer(s *Synthesizer) *MidiFileSequencer
func (*MidiFileSequencer) Play ¶
func (seq *MidiFileSequencer) Play(midiFile *MidiFile, loop bool)
func (*MidiFileSequencer) Render ¶
func (seq *MidiFileSequencer) Render(left []float32, right []float32)
func (*MidiFileSequencer) Stop ¶
func (seq *MidiFileSequencer) Stop()
type PresetRegion ¶
type PresetRegion struct { Instrument *Instrument // contains filtered or unexported fields }
func (*PresetRegion) GetAttackModulationEnvelope ¶
func (region *PresetRegion) GetAttackModulationEnvelope() float32
func (*PresetRegion) GetAttackVolumeEnvelope ¶
func (region *PresetRegion) GetAttackVolumeEnvelope() float32
func (*PresetRegion) GetChorusEffectsSend ¶
func (region *PresetRegion) GetChorusEffectsSend() float32
func (*PresetRegion) GetCoarseTune ¶
func (region *PresetRegion) GetCoarseTune() int32
func (*PresetRegion) GetDecayModulationEnvelope ¶
func (region *PresetRegion) GetDecayModulationEnvelope() float32
func (*PresetRegion) GetDecayVolumeEnvelope ¶
func (region *PresetRegion) GetDecayVolumeEnvelope() float32
func (*PresetRegion) GetDelayModulationEnvelope ¶
func (region *PresetRegion) GetDelayModulationEnvelope() float32
func (*PresetRegion) GetDelayModulationLfo ¶
func (region *PresetRegion) GetDelayModulationLfo() float32
func (*PresetRegion) GetDelayVibratoLfo ¶
func (region *PresetRegion) GetDelayVibratoLfo() float32
func (*PresetRegion) GetDelayVolumeEnvelope ¶
func (region *PresetRegion) GetDelayVolumeEnvelope() float32
func (*PresetRegion) GetFineTune ¶
func (region *PresetRegion) GetFineTune() int32
func (*PresetRegion) GetFrequencyModulationLfo ¶
func (region *PresetRegion) GetFrequencyModulationLfo() float32
func (*PresetRegion) GetFrequencyVibratoLfo ¶
func (region *PresetRegion) GetFrequencyVibratoLfo() float32
func (*PresetRegion) GetHoldModulationEnvelope ¶
func (region *PresetRegion) GetHoldModulationEnvelope() float32
func (*PresetRegion) GetHoldVolumeEnvelope ¶
func (region *PresetRegion) GetHoldVolumeEnvelope() float32
func (*PresetRegion) GetInitialAttenuation ¶
func (region *PresetRegion) GetInitialAttenuation() float32
func (*PresetRegion) GetInitialFilterCutoffFrequency ¶
func (region *PresetRegion) GetInitialFilterCutoffFrequency() float32
func (*PresetRegion) GetInitialFilterQ ¶
func (region *PresetRegion) GetInitialFilterQ() float32
func (*PresetRegion) GetKeyNumberToModulationEnvelopeDecay ¶
func (region *PresetRegion) GetKeyNumberToModulationEnvelopeDecay() int32
func (*PresetRegion) GetKeyNumberToModulationEnvelopeHold ¶
func (region *PresetRegion) GetKeyNumberToModulationEnvelopeHold() int32
func (*PresetRegion) GetKeyNumberToVolumeEnvelopeDecay ¶
func (region *PresetRegion) GetKeyNumberToVolumeEnvelopeDecay() int32
func (*PresetRegion) GetKeyNumberToVolumeEnvelopeHold ¶
func (region *PresetRegion) GetKeyNumberToVolumeEnvelopeHold() int32
func (*PresetRegion) GetKeyRangeEnd ¶
func (region *PresetRegion) GetKeyRangeEnd() int32
func (*PresetRegion) GetKeyRangeStart ¶
func (region *PresetRegion) GetKeyRangeStart() int32
func (*PresetRegion) GetModulationEnvelopeToFilterCutoffFrequency ¶
func (region *PresetRegion) GetModulationEnvelopeToFilterCutoffFrequency() int32
func (*PresetRegion) GetModulationEnvelopeToPitch ¶
func (region *PresetRegion) GetModulationEnvelopeToPitch() int32
func (*PresetRegion) GetModulationLfoToFilterCutoffFrequency ¶
func (region *PresetRegion) GetModulationLfoToFilterCutoffFrequency() int32
func (*PresetRegion) GetModulationLfoToPitch ¶
func (region *PresetRegion) GetModulationLfoToPitch() int32
func (*PresetRegion) GetModulationLfoToVolume ¶
func (region *PresetRegion) GetModulationLfoToVolume() float32
func (*PresetRegion) GetPan ¶
func (region *PresetRegion) GetPan() float32
func (*PresetRegion) GetReleaseModulationEnvelope ¶
func (region *PresetRegion) GetReleaseModulationEnvelope() float32
func (*PresetRegion) GetReleaseVolumeEnvelope ¶
func (region *PresetRegion) GetReleaseVolumeEnvelope() float32
func (*PresetRegion) GetReverbEffectsSend ¶
func (region *PresetRegion) GetReverbEffectsSend() float32
func (*PresetRegion) GetScaleTuning ¶
func (region *PresetRegion) GetScaleTuning() int32
func (*PresetRegion) GetSustainModulationEnvelope ¶
func (region *PresetRegion) GetSustainModulationEnvelope() float32
func (*PresetRegion) GetSustainVolumeEnvelope ¶
func (region *PresetRegion) GetSustainVolumeEnvelope() float32
func (*PresetRegion) GetVelocityRangeEnd ¶
func (region *PresetRegion) GetVelocityRangeEnd() int32
func (*PresetRegion) GetVelocityRangeStart ¶
func (region *PresetRegion) GetVelocityRangeStart() int32
func (*PresetRegion) GetVibratoLfoToPitch ¶
func (region *PresetRegion) GetVibratoLfoToPitch() int32
type SampleHeader ¶
type SoundFont ¶
type SoundFont struct { Info *SoundFontInfo BitsPerSample int32 WaveData []int16 SampleHeaders []*SampleHeader Presets []*Preset Instruments []*Instrument }
type SoundFontInfo ¶
type SoundFontVersion ¶
type Synthesizer ¶
type Synthesizer struct { SoundFont *SoundFont SampleRate int32 BlockSize int32 MaximumPolyphony int32 EnableReverbAndChorus bool MasterVolume float32 // contains filtered or unexported fields }
func NewSynthesizer ¶
func NewSynthesizer(sf *SoundFont, settings *SynthesizerSettings) (*Synthesizer, error)
func (*Synthesizer) NoteOff ¶
func (s *Synthesizer) NoteOff(channel int32, key int32)
func (*Synthesizer) NoteOffAll ¶
func (s *Synthesizer) NoteOffAll(immediate bool)
func (*Synthesizer) NoteOffAllChannel ¶
func (s *Synthesizer) NoteOffAllChannel(channel int32, immediate bool)
func (*Synthesizer) ProcessMidiMessage ¶
func (s *Synthesizer) ProcessMidiMessage(channel int32, command int32, data1 int32, data2 int32)
func (*Synthesizer) Render ¶
func (s *Synthesizer) Render(left []float32, right []float32)
func (*Synthesizer) Reset ¶
func (s *Synthesizer) Reset()
func (*Synthesizer) ResetAllControllers ¶
func (s *Synthesizer) ResetAllControllers()
func (*Synthesizer) ResetAllControllersChannel ¶
func (s *Synthesizer) ResetAllControllersChannel(channel int32)
type SynthesizerSettings ¶
type SynthesizerSettings struct { SampleRate int32 BlockSize int32 MaximumPolyphony int32 EnableReverbAndChorus bool }
func NewSynthesizerSettings ¶
func NewSynthesizerSettings(sampleRate int32) *SynthesizerSettings
Source Files
¶
- array_math.go
- binaryreader_ex.go
- biquad_filter.go
- channel.go
- chorus.go
- envelope_stage.go
- generator.go
- generator_type.go
- instrument.go
- instrument_info.go
- instrument_region.go
- lfo.go
- loop_mode.go
- midifile.go
- midifile_sequencer.go
- modulation_envelope.go
- modulator.go
- oscillator.go
- preset.go
- preset_info.go
- preset_region.go
- region_ex.go
- region_pair.go
- reverb.go
- sample_header.go
- soundfont.go
- soundfont_info.go
- soundfont_math.go
- soundfont_parameters.go
- soundfont_sampledata.go
- soundfont_version.go
- synthesizer.go
- synthesizer_settings.go
- voice.go
- voice_collection.go
- volume_envelope.go
- zone.go
- zone_info.go
Click to show internal directories.
Click to hide internal directories.