channel

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	What       s3mfile.PatternFlags
	Note       s3mfile.Note
	Instrument InstID
	Volume     s3mfile.Volume
	Command    uint8
	Info       DataEffect
}

Data is the data for the channel

func (Data) Channel

func (d Data) Channel() uint8

Channel returns the channel ID for the channel

func (Data) GetInstrument

func (d Data) GetInstrument(stmem note.Semitone) instrument.ID

GetInstrument returns the instrument for the channel

func (Data) GetNote

func (d Data) GetNote() note.Note

GetNote returns the note for the channel

func (Data) GetVolume

func (d Data) GetVolume() volume.Volume

GetVolume returns the volume for the channel

func (Data) HasCommand

func (d Data) HasCommand() bool

HasCommand returns true if there exists a command on the channel

func (Data) HasInstrument

func (d Data) HasInstrument() bool

HasInstrument returns true if there exists an instrument on the channel

func (Data) HasNote

func (d Data) HasNote() bool

HasNote returns true if there exists a note on the channel

func (Data) HasVolume

func (d Data) HasVolume() bool

HasVolume returns true if there exists a volume on the channel

func (Data) ShortString

func (d Data) ShortString() string

func (Data) String

func (d Data) String() string

type DataEffect

type DataEffect uint8

DataEffect is the type of a channel's EffectParameter value

type InstID

type InstID uint8

InstID is an instrument ID in S3M world

func (InstID) IsEmpty

func (s InstID) IsEmpty() bool

IsEmpty returns true if the instrument ID is 'nothing'

func (InstID) String

func (s InstID) String() string

type Memory

type Memory struct {
	Shared *SharedMemory
	// contains filtered or unexported fields
}

Memory is the storage object for custom effect/command values

func (*Memory) GetPatternLoop

func (m *Memory) GetPatternLoop() *formatutil.PatternLoop

GetPatternLoop returns the pattern loop object from the memory

func (*Memory) LastNonZero

func (m *Memory) LastNonZero(input DataEffect) DataEffect

LastNonZero gets or sets the most recent non-zero value (or input)

func (*Memory) LastNonZeroXY

func (m *Memory) LastNonZeroXY(input DataEffect) (DataEffect, DataEffect)

LastNonZero gets or sets the most recent non-zero value (or input)

func (*Memory) PortaToNote

func (m *Memory) PortaToNote(input DataEffect) DataEffect

PortaToNote gets or sets the most recent non-zero value (or input) for Portamento-to-note

func (*Memory) ResetOscillators

func (m *Memory) ResetOscillators()

ResetOscillators resets the oscillators to defaults

func (*Memory) Retrigger

func (m *Memory) Retrigger()

Retrigger runs certain operations when a note is retriggered

func (*Memory) SampleOffset

func (m *Memory) SampleOffset(input DataEffect) DataEffect

SampleOffset gets or sets the most recent non-zero value (or input) for Sample Offset

func (*Memory) StartOrder

func (m *Memory) StartOrder()

StartOrder is called when the first order's row at tick 0 is started

func (*Memory) TempoDecrease

func (m *Memory) TempoDecrease(input DataEffect) DataEffect

TempoDecrease gets or sets the most recent non-zero value (or input) for Tempo Decrease

func (*Memory) TempoIncrease

func (m *Memory) TempoIncrease(input DataEffect) DataEffect

TempoIncrease gets or sets the most recent non-zero value (or input) for Tempo Increase

func (*Memory) Tremolo

func (m *Memory) Tremolo(input DataEffect) (DataEffect, DataEffect)

Tremolo gets or sets the most recent non-zero value (or input) for Vibrato

func (*Memory) TremoloOscillator

func (m *Memory) TremoloOscillator() oscillator.Oscillator

TremoloOscillator returns the Tremolo oscillator object

func (*Memory) TremorMem

func (m *Memory) TremorMem() *tremor.Tremor

TremorMem returns the Tremor object

func (*Memory) Vibrato

func (m *Memory) Vibrato(input DataEffect) (DataEffect, DataEffect)

Vibrato gets or sets the most recent non-zero value (or input) for Vibrato

func (*Memory) VibratoOscillator

func (m *Memory) VibratoOscillator() oscillator.Oscillator

VibratoOscillator returns the Vibrato oscillator object

type SharedMemory

type SharedMemory struct {
	VolSlideEveryFrame  bool
	LowPassFilterEnable bool
	// ResetMemoryAtStartOfOrder0 if true will reset the memory registers when the first tick of the first row of the first order pattern plays
	ResetMemoryAtStartOfOrder0 bool
	// ST2/Amiga quirks
	ST2Vibrato          bool
	ST2Tempo            bool
	AmigaSlides         bool
	ZeroVolOptimization bool
	AmigaLimits         bool
	// Mod quirks mode
	ModCompatibility bool
}

Jump to

Keyboard shortcuts

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