#module #mod #xm #s3m #soundtracker

no-std xmrs

A library to edit SoundTracker data with pleasure

48 releases (7 breaking)

0.8.5 Oct 20, 2024
0.7.2 Sep 23, 2024
0.6.2 Jul 20, 2024
0.4.13 Mar 30, 2024
0.2.3 Mar 26, 2023

#82 in Audio

Download history 150/week @ 2024-07-29 8/week @ 2024-08-05 37/week @ 2024-08-12 23/week @ 2024-08-19 83/week @ 2024-08-26 12/week @ 2024-09-02 18/week @ 2024-09-09 230/week @ 2024-09-16 369/week @ 2024-09-23 289/week @ 2024-09-30 209/week @ 2024-10-07 596/week @ 2024-10-14 166/week @ 2024-10-21 34/week @ 2024-10-28 21/week @ 2024-11-04 3/week @ 2024-11-11

313 downloads per month
Used in 5 crates (4 directly)

MIT license

185KB
5K SLoC

XMrs File format library

A no_std library to edit Sound Tracker data with pleasure.

Because "Representation is the Essence of Programming".

For now MOD Amiga Modules, S3M Scream Tracker III and XM FastTracker II files are supported.

Rob Hubbard C64 SID import is a WIP.

Useful struct parts:

To edit data, use Module struct.

You can serialize Module using serde bincode (see std feature).

Load MOD file

Use import_mod feature

  1. Deserialize AmigaModule struct using AmigaModule::load(&amiga)
  2. Convert to struct Module using .to_module()

Load S3M file

Use import_s3m feature

  1. Deserialize S3mModule struct using S3mModule::load(&s3m)
  2. Convert to struct Module using .to_module()

XM file

Use import_xm feature

Load

  1. Deserialize XmModule struct using XmModule::load(&XM)
  2. Convert to struct Module using .to_module()

Save

  1. Convert Module to XmModule: XmModule::from_module(&module)
  2. Serialize using XmModule save() fn

Note: You can only save InstrDefault in XM fileformat.

About no_std

micromath is used by default in no_std. If you prefer libm, use cargo build --no-default-features --features=libm --release.

About std

if you want to use std feature use cargo build --no-default-features --features=std --release

About std demo

if you want to test examples use cargo build --no-default-features --features=std,demo --release

Dependencies

~1–2MB
~44K SLoC