trying to get the most out of converting to 8bit audio.... (sox/ssrc)
2015-05-25 10:31:05
hi, i often use this forum as reference but dont generally post... if this belongs in another subforum let me know and i'll move it i'm scripting a routine to convert 16/44 audio to a format for old amiga computers... specifically to 8bit wav at a variety of sample rates. the amiga uses a unique way of playing back audio based on cpu clock and screen refresh. there's a variety of sample rates that are optimal... i'll choose one that SSRC doesn't complain about converting to, 27928... so far my script is:sox infile.wav tempfile.wav silence 1 0.1 -48.16d reverse silence 1 0.1 -48.16d reverse pad .5 .5 -> removes any audio below -48.16 dB at the start and end of the input file and saves the remainder to a tempfile. according to wikipedia 48.16 is the SNR of 8 bit audio. sox also pad's the tempfile with .5s of silence at the beginning and end because ssrc (below) seems to have problems with short samples of audio.ssrc_hp --twopass --bits 8 --dither 2 --pdf 2 --rate 27928 --normalize tempfile.wav anothertempfile.wav -> ssrc's noise shaping sounds better to my ear than sox, or that sox won't let me use most filter options below 44100sox anothertempfile.wav final.wav trim 0.5 reverse trim 0.5 reverse -> removes the .5s padding at the start and end because of the ssrc problem above and saves the final wav file. here is an example of the above using a roland tr-808 bassdrum: infile (16/44): 808in.wav outfile (8/27828): 808out.wav and another example using a roland tr-808 cymbal: infile (16/44): cymin.wav outfile (8/27828): cymout.wav i'm curious if there's any way to improve the quality of the resulting audio. i know that's subjective... i'm mainly curious in which ways i can tweak or alter the settings in my script... for instance, if i could live without a few more decibels in SNR could i optimally reduce the amp of the noise shaping in ssrc... does that make sense? if so, then what that ratio would be... ie, -48.16 vs --amp of noise shaping... or if i might alter the script depending on the frequency range of the infile... or if there's some compression options in sox i could use that would reduce the noise shaping of the audio... or, if there is a completely different way of doing things that might result in a file sounding better (less noise, no crazy artifacts), that would be awesome... if someone can make those outfiles sound better, i'd be really interested and really grateful to hear them )