Skip to content

maxim-zhao/SampleToWav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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 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.

About

Converts sampled audio data inside ROM files to a WAV file

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages