Skip to main content

Crate xmrs

Crate xmrs 

Source
Expand description

XMrs is a Safe SoundTracker Library

Module+--->Instrument+--->InstrDefault+--->VoiceSetup+--->Envelope (Volume, Panning, Pitch)
      |              |                |              +--->Vibrato
      |              |                +--->InstrumentBehavior (NNA, DCT, DCA)
      |              |                +--->Keyboard (sample_for_pitch, note_for_pitch)
      |              |                +--->InstrMidi
      |              |                +--->Sample (Loop, Sustain Loop)
      |              +--->InstrEkn (Euclidian Rythm Instrument)
      |              +--->InstrMidi
      |              +--->InstrOpl (Yamaha OPL)
      |              +--->InstrSid (MOS6581 SID Voices)
      |              +-+->InstrRobSid+--->InstrSid
      +--->Pattern--->Row--->TrackUnit+--->CellNote (Empty, Play(Pitch), KeyOff, NoteCut, NoteFade)
                                      +--->TrackEffect
                                      +--->GlobalEffect

You can load historical IT, S3M, SID, MOD, XM files using import (see README.md)

You can serialize your work using serde

Modules§

cell_note
A typical Note CellNote — what a pattern cell can carry in its note column.
codepage
Detect the legacy 8-bit codepage of a name field and decode it to UTF-8 (CP437 vs Latin-1 vs ASCII). Detect the legacy 8-bit codepage of a text field and decode it to UTF-8.
compatibility_profile
Compatibility profile (named bundles of format + playback quirks). CompatibilityProfile — a named bundle of format-specific playback rules.
duration
Playback-duration estimator (walks the row scheduler). Estimation of a song’s playback duration.
effect
All effects
envelope
Envelope with Steroid
fixed
Fixed-point primitives, domain newtypes, lookup tables and tracker-byte conversions. Provides the integer-only substrate xmrs uses to run on FPU-less targets — every former f32 site on the runtime path has been folded onto these types. See fixed for the layer-by- layer breakdown. Fixed-point primitives for the xmrs ecosystem.
import
Import historical files. Do not use it directly: see Module load* fn impl.
instr_default
Instrument handling samples InstrDefault — the canonical xmrs instrument representation.
instr_ekn
Euclidian Rythm Instrument
instr_midi
Midi Instrument
instr_opl
Yamaha OPL Instrument
instr_robsid
Rob Hubbard Instrument
instr_sid
MOS6581 SID Instrument
instrument
Instrument with Steroid
instrument_behavior
New-Note Action / Duplicate Check rules for InstrDefault. InstrumentBehavior — how a channel reacts when an instrument is retriggered.
keyboard
IT-style keyboard remap: per-input-note sample + transposition. Keyboard — per-input-note mapping for an instrument.
mix_plugin
IT-style mix-plugin table (OpenMPT extension). IT-style mix-plugin table (OpenMPT extension).
module
SoundTracker Module with Steroid
period_helper
Period Helper Pitch ↔ period ↔ frequency conversion for tracker formats.
pitch
prelude
The Xmrs Prelude
sample
Sample with Steroid
track_unit
A slot
vibrato
Vibrato with Steroid
voice_setup
Voice-shaping parameters (envelopes, vibrato, filter, panning). VoiceSetup — the parameters that govern a voice once it’s been triggered.
waveform
All Waveform type
xorshift
A simple way for random values

Macros§

q8_8
Q8.8 from an f32 literal. Same compile-time-fold caveat as q15!.
q15
Q1.15 from an f32 literal. Compile-time foldable at release opt level.