pack

package
v0.0.0-...-dd69fc7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ADSR

type ADSR struct {
	Attack  byte
	Decay   byte
	Sustain byte
	Release byte
}

type Band

type Band struct {
	Frequency byte
	Level     byte
}

type Category

type Category byte
const (
	CategoryNone Category = iota
	CategoryArp
	CategoryBass
	CategoryBell
	CategoryClassic
	CategoryDrum
	CategoryKeyboard
	CategoryLead
	CategoryMotion
	CategoryPad
	CategoryPoly
	CategorySFX
	CategoryString
	CategoryUser
	CategoryVocal
)

type Chorus

type Chorus struct {
	Type     byte
	Rate     byte
	RateSync byte
	Feedback byte
	ModDepth byte
	Delay    byte
}

type DelayEnvelope

type DelayEnvelope struct {
	Delay byte
	ADSR
}

type Distortion

type Distortion struct {
	Type         byte
	Compensation byte
}

type Equalizer

type Equalizer struct {
	Bass, Mid, Trebble Band
}

type FadeMode

type FadeMode byte
const (
	FadeIn FadeMode = iota
	FadeOut
	GateIn
	GateOut
)

type Filter

type Filter struct {
	Routing    byte
	Drive      byte
	DriveType  byte
	Type       byte
	Frequency  byte
	Track      byte
	Resonance  byte
	QNormalize byte
	Env2ToFreq byte
}

type Genre

type Genre byte
const (
	GenreNone Genre = iota
	GenreClassic
	GenreBreaks
	GenreHouse
	GenreIndustrial
	GenreJazz
	GenreHipHop
	GenrePopRock
	GenreTechno
	GenreDubStep
)

type Knob

type Knob struct {
	Position   byte
	A, B, C, D KnobTarget
}

type KnobTarget

type KnobTarget struct {
	Destination byte
	Start, End  byte
	Depth       byte
}

type LFO

type LFO struct {
	WaveForm    byte
	PhaseOffset byte
	SlewRate    byte
	Delay       byte
	DelaySync   byte
	Rate        byte
	RateSync    byte
	Flags       LFOFlags
}

type LFOFlags

type LFOFlags byte

func (LFOFlags) CommonSync

func (f LFOFlags) CommonSync() bool

func (LFOFlags) FadeMode

func (f LFOFlags) FadeMode() FadeMode

func (LFOFlags) KeySync

func (f LFOFlags) KeySync() bool

func (LFOFlags) MultiDelayTrigger

func (f LFOFlags) MultiDelayTrigger() bool

func (LFOFlags) OneShot

func (f LFOFlags) OneShot() bool

type Mixer

type Mixer struct {
	Osc1Level       byte
	Osc2Level       byte
	RingModeLevel12 byte
	NoiseLevel      byte
	PreFXLevel      byte
	PostFXLevel     byte
}

type Mod

type Mod struct {
	Source1, Source2 byte
	Depth            byte
	Destination      byte
}

type Oscillator

type Oscillator struct {
	Wave             byte
	WaveInterpolate  byte
	PulseWidthIndex  byte
	VirtualSyncDepth byte
	Density          byte
	DensityDetune    byte
	Semitones        byte
	Cents            byte
	PitchBend        byte
}

type Pack

type Pack struct {
	Name     string
	Color    string
	Projects []*Project
	Samples  []*Sample
	Patches  []*Patch
	// contains filtered or unexported fields
}

func (*Pack) Read

func (p *Pack) Read(r io.Reader) error

func (*Pack) Write

func (p *Pack) Write(w io.Writer, f *model.Flavor) error

type Patch

type Patch struct {
	PatchName                [16]byte
	Category                 Category
	Genre                    Genre
	Reserved                 [14]byte
	Voice                    Voice
	Osc1, Osc2               Oscillator
	Mixer                    Mixer
	Filter                   Filter
	Envelope1, Envelope2     VelocityEnvelope
	Envelope3                DelayEnvelope
	LFO1, LFO2               LFO
	DistortionLevel          byte
	FXReserved1              byte
	ChorusLevel              byte
	FXReserved2, FXReserved3 byte
	Equalizer                Equalizer
	FXReserved               [5]byte
	Distortion               Distortion
	Chorus                   Chorus
	ModMatrix                [20]Mod
	Macros                   [8]Knob
}

func NewPatch

func NewPatch(sysex []byte) *Patch

func (*Patch) Format

func (p *Patch) Format(cfg *PatchConfig) []byte

func (*Patch) Name

func (p *Patch) Name() string

type PatchConfig

type PatchConfig struct {
	Flavor *model.Flavor
	Index  byte
}

type Project

type Project struct{}

func (*Project) Format

func (p *Project) Format(cfg *ProjectConfig) []byte

type ProjectConfig

type ProjectConfig struct {
	Flavor *model.Flavor
}

type Sample

type Sample struct {
	Name string
	Data io.Reader
}

type VelocityEnvelope

type VelocityEnvelope struct {
	Velocity byte
	ADSR
}

type Voice

type Voice struct {
	PolyphonyMode  byte
	PortamentoRate byte
	PreGlide       byte
	KeyboardOctave byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL