Documentation
¶
Overview ¶
Package it loads and replays Impulse Tracker modules.
Index ¶
Constants ¶
const Profile = "Impulse Tracker PCM sample and instrument modes"
Profile is the name of the supported playback profile.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct {
Mask, Note, Instrument, Volume, Command, Param uint8
}
Cell retains the resolved note, instrument, volume-column, and command fields. Mask carries the native packing bits, including reuse flags.
type Envelope ¶
type Envelope struct {
Flags, LoopStart, LoopEnd, SustainStart, SustainEnd uint8
Points []EnvelopePoint
}
Envelope contains native interpolation points and loop indices.
type EnvelopePoint ¶
EnvelopePoint is a native tracker tick and its signed value.
type Instrument ¶
type Instrument struct {
Name, Filename string
NewNoteAction, DuplicateCheck, DuplicateAction uint8
Fadeout int
PitchPanSeparation int8
PitchPanCenter, GlobalVolume, Pan uint8
RandomVolume, RandomPan uint8
FilterCutoff, FilterResonance uint8
MIDIChannel, MIDIProgram uint8
MIDIBank int
Keys [120]Key
VolumeEnvelope, PanEnvelope, PitchEnvelope Envelope
}
Instrument contains the native IT keymap, voice actions and envelopes.
type Key ¶
type Key struct {
Note, Sample uint8
}
Key maps an IT note to a transposed note and a one-based sample number.
type Module ¶
type Module struct {
Title, Message string
CreatedVersion, CompatibleVersion, Flags, Special int
HighlightMinor, HighlightMajor uint8
GlobalVolume, MixVolume, Speed, BPM, Separation, PitchWheelDepth uint8
ChannelPan, ChannelVolume [headerChannels]uint8
Orders []uint8
PlayableOrders []int
InstrumentOffsets []int64
Instruments []Instrument
Patterns []Pattern
Samples []Sample
// contains filtered or unexported fields
}
Module contains the native order table, timing, channel settings and samples.
type Replay ¶
Replay implements the IT PCM sample and instrument profiles.
func NewReplayWithOptions ¶
func NewReplayWithOptions[T audio.Sample](m *Module, options ReplayOptions) (*Replay[T], tracker.ReplayConfig[T], error)
NewReplayWithOptions builds a native IT replay with the selected clock.
func (*Replay[T]) StepTick ¶
func (r *Replay[T]) StepTick(ctx *tracker.TickContext) error
StepTick applies IT sample-mode row commands and later-tick slides.
func (*Replay[T]) StoppedAtRestart ¶
StoppedAtRestart reports whether StopAfterLoop ended the current pass at a jump to a previously played row.
type ReplayOptions ¶
type ReplayOptions struct {
ImpulseTrackerWAV bool // Use the original WAV driver's clock and PCM mixer.
// StopAfterLoop ends playback when a position jump attempts to re-enter
// a row already visited in this pass. Pattern-loop commands still run.
StopAfterLoop bool
}
ReplayOptions selects the output clock for an IT replay.
type Sample ¶
type Sample struct {
Name, Filename string
GlobalVolume, Flags, Volume, Convert, Pan uint8
Length, LoopStart, LoopEnd, C5Speed, SustainStart, SustainEnd, DataOffset int64
VibratoSpeed, VibratoDepth, VibratoRate, VibratoType uint8
PCM audio.Buffer[float64]
}
Sample retains the sample-mode PCM header and decoded sample planes. Lengths and loop points are in source frames.