Documentation ¶
Index ¶
- func Eight(granularity int) uint
- func Half(granularity int) uint
- func Quarter(granularity int) uint
- func Sixteenth(granularity int) uint
- func Thirtysecond(granularity int) uint
- func Whole(granularity int) uint
- type AfterDef
- type AutomationDef
- type BeforeDef
- type ChannelAutomationDef
- type ChordDef
- type ChordOnScaleDef
- type CycleChordsDef
- type EuclidianDef
- type FloatAutomationDef
- type FloatChannelAutomationDef
- type FloatRandomDef
- type FloatRegisterDef
- type FloatTransposeDef
- type IntArrayAutomationDef
- type IntArrayConstantDef
- type IntArrayIndexDef
- type IntArrayRegisterDef
- type IntArrayTransposeDef
- type IntConstantDef
- type IntTransposeDef
- type MIDISequencesDef
- type OffsetDef
- type PlayNoteEveryDef
- type PlayNotesEveryDef
- type RandomDef
- type RangeDef
- type RegisterDef
- type RepeatDef
- type ScaleDef
- type SequenceDef
- type SequencerDef
- type SwitchDef
- type TrackDef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Thirtysecond ¶
Types ¶
type AfterDef ¶
type AfterDef struct { After interface{} `json:"after" yaml:"after"` Sequence SequenceDef `json:"sequence" yaml:"sequence"` }
type AutomationDef ¶
type AutomationDef struct { BackAndForth *[]int `json:"back_and_forth,omitempty" yaml:"back_and_forth,omitempty"` Cycle *[]int `json:"cycle,omitempty" yaml:"cycle,omitempty"` Range *RangeDef `json:"range,omitempty" yaml:"range,omitempty"` Sweep *RangeDef `json:"sweep,omitempty" yaml:"sweep,omitempty"` FadeIn *RangeDef `json:"fade_in,omitempty" yaml:"fade_in,omitempty"` Random *RandomDef `json:"random,omitempty" yaml:"random,omitempty"` Register *int `json:"register,omitempty" yaml:"register,omitempty"` Transpose *IntTransposeDef `json:"transpose,omitempty" yaml:"transpose,omitempty"` IntConstant *IntConstantDef `json:"int_constant,omitempty" yaml:"int_constant,omitempty"` NoteConstant *IntConstantDef `json:"note_constant,omitempty" yaml:"note_constant,omitempty"` }
func (*AutomationDef) GetAutomation ¶
func (a *AutomationDef) GetAutomation() (IntAutomation, error)
type BeforeDef ¶
type BeforeDef struct { Before interface{} `json:"before" yaml:"before"` Sequence SequenceDef `json:"sequence" yaml:"sequence"` }
type ChannelAutomationDef ¶
type ChannelAutomationDef struct { Channel int `json:"channel" yaml:"channel"` AutomationDef `json:",inline" yaml:",inline"` }
func (*ChannelAutomationDef) GetSequence ¶
func (p *ChannelAutomationDef) GetSequence(automation func(int, IntAutomation) Sequence) (Sequence, error)
type ChordDef ¶
type ChordDef struct { Chord string `json:"chord" yaml:"chord"` BaseNote int `json:"base_note,omitempty" yaml:"base_note,omitempty"` Octaves int `json:"octaves,omitempty" yaml:"octaves,omitempty"` Inversions int `json:"inversions,omitempty" yaml:"inversions,omitempty"` BaseNoteAutomation *AutomationDef `json:"auto_base_note,omitempty" yaml:"auto_base_note,omitempty"` OctavesAutomation *AutomationDef `json:"auto_octaves,omitempty" yaml:"auto_octaves,omitempty"` InversionsAutomation *AutomationDef `json:"auto_inversions,omitempty" yaml:"auto_inversions,omitempty"` }
func (*ChordDef) GetAutomation ¶
func (*ChordDef) IsConstant ¶
type ChordOnScaleDef ¶
type ChordOnScaleDef struct { Chord string `json:"chord" yaml:"chord"` Start int `json:"start,omitempty" yaml:"start,omitempty"` Octaves int `json:"octaves,omitempty" yaml:"octaves,omitempty"` Inversions int `json:"inversions,omitempty" yaml:"inversions,omitempty"` Scale *IntArrayAutomationDef `json:"auto_scale,omitempty" yaml:"auto_scale,omitempty"` StartAutomation *AutomationDef `json:"auto_start,omitempty" yaml:"auto_start,omitempty"` OctavesAutomation *AutomationDef `json:"auto_octaves,omitempty" yaml:"auto_octaves,omitempty"` InversionsAutomation *AutomationDef `json:"auto_inversions,omitempty" yaml:"auto_inversions,omitempty"` }
func (*ChordOnScaleDef) GetAutomation ¶
func (c *ChordOnScaleDef) GetAutomation() (IntArrayAutomation, error)
type CycleChordsDef ¶
type CycleChordsDef struct { Count int `json:"count" yaml:"count"` Chords [][]int `json:"chords" yaml:"chords"` }
func (*CycleChordsDef) GetAutomation ¶
func (c *CycleChordsDef) GetAutomation() (IntArrayAutomation, error)
type EuclidianDef ¶
type EuclidianDef struct { Pulses int `json:"pulses" yaml:"pulses"` Over int `json:"over" yaml:"over"` Duration interface{} `json:"duration" yaml:"duration"` Sequence *SequenceDef `json:"sequence" yaml:"sequence"` }
func (*EuclidianDef) GetSequence ¶
func (e *EuclidianDef) GetSequence(ctx *context) (Sequence, error)
type FloatAutomationDef ¶
type FloatAutomationDef struct { BackAndForth *[]float64 `json:"back_and_forth,omitempty" yaml:"back_and_forth,omitempty"` Register *int `json:"register,omitempty" yaml:"register,omitempty"` Transpose *FloatTransposeDef `json:"transpose,omitempty" yaml:"transpose,omitempty"` Random *FloatRandomDef `json:"random,omitempty" yaml:"random,omitempty"` }
func (*FloatAutomationDef) GetAutomation ¶
func (a *FloatAutomationDef) GetAutomation() (FloatAutomation, error)
type FloatChannelAutomationDef ¶
type FloatChannelAutomationDef struct { Channel int FloatAutomationDef `yaml:",inline"` }
func (*FloatChannelAutomationDef) GetSequence ¶
func (p *FloatChannelAutomationDef) GetSequence(automation func(int, FloatAutomation) Sequence) (Sequence, error)
type FloatRandomDef ¶
type FloatRegisterDef ¶
type FloatRegisterDef struct { Register int `json:"register" yaml:"register"` Value float64 `json:"value" yaml:"value"` Automation *FloatAutomationDef `json:"auto_value,omitempty" yaml:"auto_value,omitempty"` }
func (*FloatRegisterDef) GetSequence ¶
func (e *FloatRegisterDef) GetSequence() (Sequence, error)
type FloatTransposeDef ¶
type FloatTransposeDef struct { Transpose float64 `json:"value" yaml:"value"` FloatAutomationDef `json:",inline" yaml:",inline"` }
type IntArrayAutomationDef ¶
type IntArrayAutomationDef struct { CycleChords *CycleChordsDef `json:"cycle_chords,omitempty" yaml:"cycle_chords,omitempty"` Register *int `json:"register,omitempty" yaml:"register,omitempty"` Transpose *IntArrayTransposeDef `json:"transpose,omitempty" yaml:"transpose,omitempty"` Index *IntArrayIndexDef `json:"index,omitempty" yaml:"index,omitempty"` Constant *IntArrayConstantDef `json:"int_array_constant,omitempty" yaml:"int_array_constant,omitempty"` NotesConstant *IntArrayConstantDef `json:"note_array_constant,omitempty" yaml:"note_array_constant,omitempty"` Chord *ChordDef `json:"chord,omitempty" yaml:"chord,omitempty"` Scale *ScaleDef `json:"scale,omitempty" yaml:"scale,omitempty"` ChordOnScale *ChordOnScaleDef `json:"chord_on_scale,omitempty" yaml:"chord_on_scale,omitempty"` }
func (*IntArrayAutomationDef) GetAutomation ¶
func (a *IntArrayAutomationDef) GetAutomation() (IntArrayAutomation, error)
type IntArrayConstantDef ¶
type IntArrayConstantDef struct {
Value []int `json:"value" yaml:"value"`
}
type IntArrayIndexDef ¶
type IntArrayIndexDef struct { Index int `json:"value" yaml:"value"` AutoIndex *AutomationDef `json:"auto_value" yaml:"auto_value"` IntArrayAutomationDef `json:",inline" yaml:",inline"` }
type IntArrayRegisterDef ¶
type IntArrayRegisterDef struct { Register int `json:"register" yaml:"register"` Value []int `json:"value" yaml:"value"` Automation *IntArrayAutomationDef `json:"auto_values,omitempty" yaml:"auto_values,omitempty"` }
func (*IntArrayRegisterDef) GetSequence ¶
func (e *IntArrayRegisterDef) GetSequence() (Sequence, error)
type IntArrayTransposeDef ¶
type IntArrayTransposeDef struct { Transpose int `json:"value" yaml:"value"` IntArrayAutomationDef `json:",inline" yaml:",inline"` }
type IntConstantDef ¶
type IntConstantDef struct {
Value int `json:"value" yaml:"value"`
}
type IntTransposeDef ¶
type IntTransposeDef struct { Transpose int `json:"value" yaml:"value"` AutomationDef `json:",inline" yaml:",inline"` }
type MIDISequencesDef ¶
type MIDISequencesDef struct { File string `yaml:"file"` InputChannels []int `yaml:"input_channels"` OutputChannels []int `yaml:"output_channels"` Speed float64 `yaml:"speed"` Loop bool `yaml:"loop"` }
func (*MIDISequencesDef) GetSequence ¶
func (m *MIDISequencesDef) GetSequence(ctx *context) (sequences.Sequence, error)
type OffsetDef ¶
type OffsetDef struct { Offset interface{} `json:"offset" yaml:"offset"` Sequence SequenceDef `json:"sequence" yaml:"sequence"` }
func (*OffsetDef) GetSequence ¶
type PlayNoteEveryDef ¶
type PlayNoteEveryDef struct { Note int `json:"note,omitempty" yaml:"note,omitempty"` NoteAutomation *AutomationDef `json:"auto_note,omitempty" yaml:"auto_note,omitempty"` Channel int `json:"channel" yaml:"channel"` Velocity int `json:"velocity,omitempty" yaml:"velocity,omitempty"` VelocityAutomation *AutomationDef `json:"auto_velocity,omitempty" yaml:"auto_velocity,omitempty"` Duration interface{} `json:"duration" yaml:"duration"` Every interface{} `json:"every,omitempty" yaml:"every,omitempty"` Offset interface{} `json:"offset,omitempty" yaml:"offset,omitempty"` }
func (*PlayNoteEveryDef) GetSequence ¶
func (e *PlayNoteEveryDef) GetSequence(ctx *context) (Sequence, error)
type PlayNotesEveryDef ¶
type PlayNotesEveryDef struct { Notes []int `json:"notes,omitempty" yaml:"notes"` NotesAutomation *IntArrayAutomationDef `json:"auto_notes,omitempty" yaml:"auto_notes"` Channel int `json:"channel" yaml:"channel"` Velocity int `json:"velocity,omitempty" yaml:"velocity"` VelocityAutomation *AutomationDef `json:"auto_velocity,omitempty" yaml:"auto_velocity"` Duration interface{} `json:"duration" yaml:"duration"` Every interface{} `json:"every" yaml:"every"` Offset interface{} `json:"offset" yaml:"offset"` }
func (*PlayNotesEveryDef) GetSequence ¶
func (e *PlayNotesEveryDef) GetSequence(ctx *context) (Sequence, error)
type RegisterDef ¶
type RegisterDef struct { Register int `json:"register" yaml:"register"` Value int `json:"value" yaml:"value"` Automation *AutomationDef `json:"auto_value,omitempty" yaml:"auto_value,omitempty"` }
func (*RegisterDef) GetSequence ¶
func (e *RegisterDef) GetSequence() (Sequence, error)
type RepeatDef ¶
type RepeatDef struct { Every interface{} `json:"every" yaml:"every"` Sequence *SequenceDef `json:"sequence" yaml:"sequence"` }
func (*RepeatDef) GetSequence ¶
type ScaleDef ¶
type ScaleDef struct { Scale string `json:"scale" yaml:"scale"` BaseNote int `json:"base_note,omitempty" yaml:"base_note,omitempty"` Octaves int `json:"octaves,omitempty" yaml:"octaves,omitempty"` Inversions int `json:"inversions,omitempty" yaml:"inversions,omitempty"` BaseNoteAutomation *AutomationDef `json:"auto_base_note,omitempty" yaml:"auto_base_note,omitempty"` OctavesAutomation *AutomationDef `json:"auto_octaves,omitempty" yaml:"auto_octaves,omitempty"` InversionsAutomation *AutomationDef `json:"auto_inversions,omitempty" yaml:"auto_inversions,omitempty"` }
func (*ScaleDef) GetAutomation ¶
func (*ScaleDef) IsConstant ¶
type SequenceDef ¶
type SequenceDef struct { Every *RepeatDef `json:"repeat,omitempty" yaml:"repeat,omitempty"` Switch *SwitchDef `json:"switch,omitempty" yaml:"switch,omitempty"` Euclidian *EuclidianDef `json:"euclidian,omitempty" yaml:"euclidian,omitempty"` PlayNoteEvery *PlayNoteEveryDef `json:"play_note,omitempty" yaml:"play_note,omitempty"` PlayNotesEvery *PlayNotesEveryDef `json:"play_notes,omitempty" yaml:"play_notes,omitempty"` Panning *ChannelAutomationDef `json:"panning,omitempty" yaml:"panning,omitempty"` Reverb *ChannelAutomationDef `json:"reverb,omitempty" yaml:"reverb,omitempty"` ReverbTime *FloatChannelAutomationDef `json:"reverb_time,omitempty" yaml:"reverb_time,omitempty"` Tremelo *ChannelAutomationDef `json:"tremelo,omitempty" yaml:"tremelo,omitempty"` LPF_Cutoff *ChannelAutomationDef `json:"lpf_cutoff,omitempty" yaml:"lpf_cutoff,omitempty"` HPF_Cutoff *ChannelAutomationDef `json:"hpf_cutoff,omitempty" yaml:"hpf_cutoff,omitempty"` Volume *ChannelAutomationDef `json:"volume,omitempty" yaml:"volume,omitempty"` GrainSize *FloatChannelAutomationDef `json:"grain_size,omitempty" yaml:"grain_size,omitempty"` GrainBirthRate *FloatChannelAutomationDef `json:"grain_birth_rate,omitempty" yaml:"grain_birth_rate,omitempty"` GrainSpread *FloatChannelAutomationDef `json:"grain_spread,omitempty" yaml:"grain_spread,omitempty"` GrainSpeed *FloatChannelAutomationDef `json:"grain_speed,omitempty" yaml:"grain_speed,omitempty"` After *AfterDef `json:"after,omitempty" yaml:"after,omitempty"` Before *BeforeDef `json:"before,omitempty" yaml:"before,omitempty"` Offset *OffsetDef `json:"offset,omitempty" yaml:"offset,omitempty"` Register *RegisterDef `json:"register,omitempty" yaml:"register,omitempty"` FloatRegister *FloatRegisterDef `json:"float_register,omitempty" yaml:"float_register,omitempty"` ArrayRegister *IntArrayRegisterDef `json:"array_register,omitempty" yaml:"array_register,omitempty"` MIDI *MIDISequencesDef `json:"midi,omitempty" yaml:"midi,omitempty"` Combine []*SequenceDef `json:"combine,omitempty" yaml:"combine,omitempty"` }
func (*SequenceDef) GetSequence ¶
func (e *SequenceDef) GetSequence(ctx *context) (Sequence, error)
type SequencerDef ¶
type SequencerDef struct { BPM float64 `json:"bpm" yaml:"bpm"` Granularity int `json:"granularity" yaml:"granularity"` Sequences []SequenceDef `json:"sequences" yaml:"sequences"` Tracks []TrackDef `json:"tracks" yaml:"tracks"` channels.ChannelsDef `json:",inline" yaml:",inline"` FromFile string `json:"-" yaml:"-"` }
func NewSequencerDefFromFile ¶
func NewSequencerDefFromFile(file string) (*SequencerDef, error)
func (*SequencerDef) GetSequences ¶
func (s *SequencerDef) GetSequences() ([]Sequence, error)
func (*SequencerDef) YAML ¶
func (s *SequencerDef) YAML() (string, error)
type SwitchDef ¶
type SwitchDef struct { Every interface{} `json:"every" yaml:"every"` Sequence *SequenceDef `json:"sequence" yaml:"sequence"` }
func (*SwitchDef) GetSequence ¶
type TrackDef ¶
type TrackDef struct { Name string `json:"name" yaml:"name"` Sequences []SequenceDef `json:"sequences" yaml:"sequences"` Register *int `json:"register,omitempty" yaml:"register,omitempty"` ArrayRegister *int `json:"array_register,omitempty" yaml:"array_register,omitempty"` FloatRegister *int `json:"float_register,omitempty" yaml:"float_register,omitempty"` Channel *channels.ChannelsDef `json:"channel,omitempty" yaml:"channel,omitempty"` }
Click to show internal directories.
Click to hide internal directories.