Crates.io | lsdj |
lib.rs | lsdj |
version | 0.1.0 |
source | src |
created_at | 2022-04-29 14:18:55.079266 |
updated_at | 2022-04-29 14:18:55.079266 |
description | Library for interfacing with LSDJ files and memory |
homepage | https://github.com/stijnfrishert/lsdj-rs |
repository | https://github.com/stijnfrishert/lsdj-rs |
max_upload_size | |
id | 577384 |
size | 103,132 |
LittleSoundDj, or LSDJ for short, is popular music tracker software for the original Nintendo Game Boy. While the handheld console originally was released in 1989, (chiptune) musicians still use its hardware to create and perform electronic music nowadays.
While LSDJ has a built-in filesystem for managing tracks, you need tools to get out the individual files for back-ups or constructing new save files from exported tracks. This crate provides a library for manipulating LSDJ save files/SRAM, in combination with a command-line utility crate for managing your songs. It was inspired by my work on liblsdj, an equivalent library in C.
The developer behind LSDJ has also made LSDPatcher, a GUI package for managing your songs.
use lsdj::{
sram::SRam,
fs::{Index, File}
};
// Load a save file from disk
let sram = SRam::from_path("bangers.sav").expect("Could not load SRAM");
// Access one of the files
if let Some(file) = sram.filesystem.file(Index::new(0)) {
// Convert the file to an .lsdsng (common song format)
let lsdsng = file.lsdsng().expect("Could not convert file to LsdSng");
// Store the song on disk
lsdsng.to_path("put_yo_hands_up.lsdsng").expect("Could not save LsdSng");
}
The crate currently supports the following functionality:
SRAM
serialization and deserializationFilesystem
manipulation (querying, inserting and removing files)LsdSng
serialization and deserializationThese are features I'm interested in exploring/adding at a certain point:
SongMemory
parsing into song structures per format version. (This would allow manipulating songs.).lsdprj
supportROM
handling, mainly for sample manipulationIf you like this crate and want to support me somehow, consider buying some of my music.