An open API service indexing awesome lists of open source software.

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

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.

![Screenshot](http://i.imgur.com/mAZhVHB.png)

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.