Documentation ¶
Index ¶
- Variables
- func PitchToFreq(pitch float64) (freq float64)
- type AttackReleaseEnv
- type Audio
- type AudioParamSetter
- type Beat
- type Control
- type ControlConst
- type ControlExp
- type ControlLine
- type ControlPeriod
- type Instrument
- type Line
- type MultiVoice
- type NormalOsc
- type Note
- type Params
- type Pattern
- type PolyphonicInstrument
- type SineBeat
- type SineBeats
- type SineOsc
- type Voice
Constants ¶
This section is empty.
Variables ¶
View Source
var KeyPitch = map[int]float64{ gui.KeyZ: -12, gui.KeyS: -11, gui.KeyX: -10, gui.KeyD: -9, gui.KeyC: -8, gui.KeyV: -7, gui.KeyG: -6, gui.KeyB: -5, gui.KeyH: -4, gui.KeyN: -3, gui.KeyJ: -2, gui.KeyM: -1, gui.KeyComma: 0, gui.KeyL: 1, gui.KeyPeriod: 2, gui.KeySemicolon: 3, gui.KeySlash: 4, gui.KeyQ: 0, gui.Key2: 1, gui.KeyW: 2, gui.Key3: 3, gui.KeyE: 4, gui.KeyR: 5, gui.Key5: 6, gui.KeyT: 7, gui.Key6: 8, gui.KeyY: 9, gui.Key7: 10, gui.KeyU: 11, gui.KeyI: 12, gui.Key9: 13, gui.KeyO: 14, gui.Key0: 15, gui.KeyP: 16, gui.KeyLeftBracket: 17, gui.KeyEqual: 18, gui.KeyRightBracket: 19, gui.KeyBackslash: 21, }
Functions ¶
func PitchToFreq ¶
Types ¶
type AttackReleaseEnv ¶
func MakeAttackReleaseEnv ¶
func MakeAttackReleaseEnv(attackTime float64, releaseTime float64) (x AttackReleaseEnv)
func (*AttackReleaseEnv) Attack ¶
func (x *AttackReleaseEnv) Attack()
func (*AttackReleaseEnv) Release ¶
func (x *AttackReleaseEnv) Release()
func (*AttackReleaseEnv) SetAttackTime ¶
func (x *AttackReleaseEnv) SetAttackTime(x2 float64)
func (*AttackReleaseEnv) SetAudioParams ¶
func (x *AttackReleaseEnv) SetAudioParams(params Params)
func (*AttackReleaseEnv) SetReleaseTime ¶
func (x *AttackReleaseEnv) SetReleaseTime(x2 float64)
func (*AttackReleaseEnv) Sing ¶
func (x2 *AttackReleaseEnv) Sing() (x Audio, done bool)
type AudioParamSetter ¶
type AudioParamSetter interface{ SetAudioParams(p Params) }
type Control ¶
type Control struct { Params Params Periods []ControlPeriod Out Audio // contains filtered or unexported fields }
func NewControl ¶
func NewControl(x []ControlPeriod) (c Control)
type ControlConst ¶
func (*ControlConst) Control ¶
func (x *ControlConst) Control(a Audio)
func (*ControlConst) Duration ¶
func (x *ControlConst) Duration() (d float64)
type ControlExp ¶
type ControlExp struct { Duration_ float64 Value1 float64 Value2 float64 // contains filtered or unexported fields }
func (*ControlExp) Control ¶
func (x *ControlExp) Control(a Audio)
func (*ControlExp) Duration ¶
func (x *ControlExp) Duration() (d float64)
func (*ControlExp) SetAudioParams ¶
func (x *ControlExp) SetAudioParams(p Params)
type ControlLine ¶
type ControlLine struct { Duration_ float64 Value1 float64 Value2 float64 // contains filtered or unexported fields }
func (*ControlLine) Control ¶
func (x *ControlLine) Control(a Audio)
func (*ControlLine) Duration ¶
func (x *ControlLine) Duration() (d float64)
func (*ControlLine) SetAudioParams ¶
func (x *ControlLine) SetAudioParams(p Params)
type ControlPeriod ¶
type Instrument ¶
func NewPolyphonicInstrument ¶
func NewPolyphonicInstrument(x func(_ Note) Voice) (i Instrument)
type MultiVoice ¶
func NewMultiVoice ¶
func NewMultiVoice() (x *MultiVoice)
func (*MultiVoice) Sing ¶
func (x2 *MultiVoice) Sing() (x Audio, done bool)
func (*MultiVoice) StartVoice ¶
func (x *MultiVoice) StartVoice(v Voice)
func (*MultiVoice) StopVoice ¶
func (x *MultiVoice) StopVoice(v Voice)
type Note ¶
type Note struct { Start float64 Attributes map[string][]ControlPeriod }
type Pattern ¶
type Pattern struct { Params Params Notes []Note Instrument Instrument // contains filtered or unexported fields }
func NewPattern ¶
func NewPattern(x2 []Note, x Instrument) (x22 *Pattern)
type PolyphonicInstrument ¶
type PolyphonicInstrument struct { *MultiVoice // contains filtered or unexported fields }
func (*PolyphonicInstrument) Play ¶
func (x *PolyphonicInstrument) Play(note Note)
type SineBeat ¶
func NewSineBeat ¶
Source Files ¶
- Add.flux.go
- AttackReleaseEnv.Attack.flux.go
- AttackReleaseEnv.Release.flux.go
- AttackReleaseEnv.SetAttackTime.flux.go
- AttackReleaseEnv.SetAudioParams.flux.go
- AttackReleaseEnv.SetReleaseTime.flux.go
- AttackReleaseEnv.Sing.flux.go
- AttackReleaseEnv.flux.go
- Audio.Add.flux.go
- Audio.Mul.flux.go
- Audio.MulX.flux.go
- Audio.SetAudioParams.flux.go
- Audio.Tanh.flux.go
- Audio.Zero.flux.go
- Audio.flux.go
- AudioParamSetter.flux.go
- Beat.Beat.flux.go
- Beat.flux.go
- Control.Sing.flux.go
- Control.Sing.go
- Control.flux.go
- ControlConst.Control.flux.go
- ControlConst.Duration.flux.go
- ControlConst.flux.go
- ControlExp.Control.flux.go
- ControlExp.Duration.flux.go
- ControlExp.SetAudioParams.flux.go
- ControlExp.flux.go
- ControlLine.Control.flux.go
- ControlLine.Duration.flux.go
- ControlLine.SetAudioParams.flux.go
- ControlLine.flux.go
- ControlPeriod.flux.go
- Instrument.flux.go
- Line.LineRate.flux.go
- Line.flux.go
- MakeAttackReleaseEnv.flux.go
- Mul.flux.go
- MultiVoice.Sing.flux.go
- MultiVoice.StartVoice.flux.go
- MultiVoice.StopVoice.flux.go
- MultiVoice.flux.go
- NewControl.flux.go
- NewMultiVoice.flux.go
- NewPattern.flux.go
- NewPolyphonicInstrument.flux.go
- NewSineBeat.flux.go
- NewSineBeats.flux.go
- NormalOsc.Osc.flux.go
- NormalOsc.flux.go
- Note.flux.go
- Params.Set.flux.go
- Params.flux.go
- Pattern.Sing.flux.go
- Pattern.flux.go
- PitchToFreq.flux.go
- PolyphonicInstrument.Play.flux.go
- PolyphonicInstrument.flux.go
- SineBeat.Sing.flux.go
- SineBeat.flux.go
- SineBeats.AddBeat.flux.go
- SineBeats.Sing.flux.go
- SineBeats.flux.go
- SineOsc.SineFreq.flux.go
- SineOsc.flux.go
- Sub.flux.go
- Tanh.flux.go
- Voice.flux.go
- keyPitch.go
- min-.flux.go
Click to show internal directories.
Click to hide internal directories.