https://github.com/maxim-zhao/sampletowav
Converts sampled audio data inside ROM files to a WAV file
https://github.com/maxim-zhao/sampletowav
rom-hacking sega-master-system
Last synced: about 1 year ago
JSON representation
Converts sampled audio data inside ROM files to a WAV file
- Host: GitHub
- URL: https://github.com/maxim-zhao/sampletowav
- Owner: maxim-zhao
- Created: 2015-12-18T23:37:52.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-18T14:49:10.000Z (about 10 years ago)
- Last Synced: 2025-03-25T07:22:24.807Z (about 1 year ago)
- Topics: rom-hacking, sega-master-system
- Language: C#
- Homepage:
- Size: 21.5 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SampleToWav
Converts sampled audio data inside ROM files to a WAV file
This is a small program which allows you to convert data stored in binary files (initially targetting ROM images for Sega 8-bit home video game systems) into minimally-adjusted WAV representations of the same data.

This covers three aspects:
## Data extraction
Currently supported formats are:
* 4-bit SN76489 volume control data (stored in big-endian or little-endian order)
* 8-bit unsigned PCM data
* 1-bit [PDM](https://en.wikipedia.org/wiki/Pulse-density_modulation) data (stored in big-endian or little-endian order)
## Data conversion to linear PCM
Current adjustments are:
* Convert SN76489 volume control values (attenuation at 2dB per step) to linear PCM
* Pass-through (treat source data as linear PCM)
* 8-bit data truncation to SN76489 volume control values (to match operation of some sample players)
## Output conversion to WAV
Output formats are:
* 8-bit unsigned
* 16-bit signed
* 32-bit float
The sampling rate is entirely under the control of the user, subject to the WAV format's limitation of integer Hz values.