Documentation
¶
Overview ¶
Package mtm loads MultiTracker modules with reusable tracks and PCM samples.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrRenaissanceRows = errors.New("tracker/mtm: MultiTracker Renaissance requires 64 rows per pattern; use the OpenMPT profile for shorter patterns")
ErrRenaissanceRows indicates a row count the original editor cannot load.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct {
Note, Sample, Effect, Param uint8
}
Cell holds a native pitch, one-based sample number, and effect command.
type Module ¶
type Module struct {
Title string
Version uint8
Rows, Channels int
Pan [maxChannels]uint8
Orders []uint8
Tracks []Track
Patterns []Pattern
Comments string
Samples []Sample
}
Module contains the order list, reusable tracks, and sample bank.
type Pattern ¶
type Pattern [maxChannels]uint16
Pattern holds one-based track references. Zero selects an empty track.
type Profile ¶
type Profile uint8
Profile selects a driver and its speed and tempo policy. RenaissanceGUS uses separate row and effect timers and a 32-voice mixer with 64-row patterns. OpenMPT preserves both commands when a row sets speed and tempo.
type Replay ¶
Replay applies MultiTracker commands to the shared tick player.
func NewReplay ¶
func NewReplay[T audio.Sample](m *Module, profile Profile) (*Replay[T], tracker.ReplayConfig[T], error)
NewReplay builds a MultiTracker replay and its PCM instrument bank.
type Sample ¶
type Sample struct {
Name string
FineTune int8
Volume uint8
Bits int
LoopStart, LoopEnd int64
PCM audio.Buffer[float64]
}
Sample describes unsigned PCM decoded into normalized mono frames. FineTune is signed and measured in eighths of a semitone. LoopStart and LoopEnd retain the byte offsets from the file header.