Skip to main content

Crate xmrs

Crate xmrs 

Source
Expand description

§xmrs — A Safe SoundTracker Library

§Architecture

xmrs
├── core/                        ← Modern DAW data model (format-agnostic)
│   ├── module::Module
│   │    ├── instrument: Vec<Instrument>
│   │    ├── tracks: Vec<Track> ──► Cell { event, effects: Vec<TrackEffect> }
│   │    ├── clips: SortedClips
│   │    ├── automation: Vec<AutomationLane>
│   │    ├── timeline_map: TimelineMap
│   │    └── quirks: PlaybackQuirks (default all-off)
│   ├── compatibility::{PlaybackQuirks, PanResetPolicy}
│   ├── daw/                     ← AutomationLane, Clip, Track, TimelineMap, Euclidean
│   └── fixed/                   ← Q-format primitives
│
└── tracker/                     ← Historical-format support
    ├── format::ModuleFormat     ← (gated on any `import_*`)
    ├── profiles::{ft2, it214, st3, pt}    ← preset quirks
    ├── period::FrequencyType
    ├── codepage                 ← CP437 / Latin-1
    ├── mix_plugin               ← IT OpenMPT extension (cfg import_it)
    ├── instr_{opl, sid, robsid} ← cfg-gated per importer
    └── import/                  ← XM / IT / S3M / MOD / SID readers
        ├── build/               ← Pattern → Tracks + Clips + TimelineMap
        └── extract/             ← TrackImportUnit → AutomationLane

§Features

Default std + import matches the desktop / server case. For a clean no-tracker build:

[dependencies]
xmrs = { version = "0.13", default-features = false, features = ["std"] }

In this mode Module carries only the universal fields; no origin, no mix_plugins, no Opl/Sid/RobSid instrument variants. The historical presets in tracker::profiles are absent — quirks are all-off by default.

You can serialize your work using serde.

Modules§

core
Core data model — format-agnostic. Core data model — format-agnostic.
edit
Edit command API (atomic, undoable mutations of Module) Editing API: atomic, validated, undoable commands.
generators
Signal / event generators (runtime synthesis & rhythm engines) — see the module docs. Sits beside core and tracker: not format I/O, not the bare model, but the things that generate at playback. Signal / event generators — the runtime engines that produce sound or note events at playback, as opposed to crate::core (the format-agnostic data model) and crate::tracker (format I/O and the format-tied data structures).
prelude
The Xmrs Prelude The Xmrs Prelude.
tracker
Format-tied items: presets, importers, format-specific instruments. Each sub-module is gated behind one or more import_* features. Format-tied items: presets of crate::core::compatibility::PlaybackQuirks mirroring historical trackers, the format::ModuleFormat tag, format-specific instruments, and the import readers / build / extract pipelines.

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.