xmrs

Crates.ioxmrs
lib.rsxmrs
version0.5.13
sourcesrc
created_at2023-03-12 16:14:42.698424
updated_at2024-05-10 09:30:06.472044
descriptionA library to edit SoundTracker data with pleasure
homepage
repositoryhttps://codeberg.org/sbechet/xmrs
max_upload_size
id808145
size148,027
Sebastien Bechet (sbechet)

documentation

https://docs.rs/xmrs

README

XMrs File format library

A library to edit Sound Tracker data with pleasure.

Because "Representation is the Essence of Programming".

For now MOD Amiga Modules and XM FastTracker II files are supported.

Useful struct parts:

Load MOD file

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

Load XM file

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

Save XM file

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

Edit data using rustified structs, use Module struct.

Note: You can only save InstrDefault using XM fileformat.

Load XMrs fileformat (deflate then bincode)

let mut mod = Module::load(&data)?;

Save XMrs fileformat (bincode then deflate)

let data = mod.save()?;

data contain a small five bytes header b"XMrs" + version coming from CARGO_PKG_VERSION_MAJOR.

Commit count: 0

cargo fmt