View Single Post
Old 01 August 2010, 08:45   #17
Rixa
Registered User
 
Join Date: Sep 2007
Location: Tampere / Finland
Posts: 118
In the off chance that this will be of help to you, this shell code should convert all files in current directory into wav format using a tool that I think is installed by default in most Linux distributions. It assumes that everything that is not obviously an IFF file is a signed 8-bit mono raw sample recorded at 16574Hz and appends .wav into the output filename.

Quote:
for file in *; do
if [ "$(head -c4 "$file")" = "FORM" ]; then
sox "$file" "${file}.wav"
else
sox -t raw -r 16574 -b -s -c 1 "$file" "${file}.wav"
fi
done
As discussed above, the rate that the sample has been recorded with can not be deduced from the file and playback rate is determined by the note in the module. I did not read the spec, but also suspect that IFF 8SVX does not record the actual sample rate but an amiga-specific number of ticks between samples. The rate used here is calculated from the C-3 note (214) on a PAL machine like this:

3546895/214 = 16574

But an NTSC machine would play it slightly faster:

3579545/214 = 16726

The only IFF sample on ST-01 is strings6, and converted by sox it becomes the latter so sox may assume NTSC. If you want the NTSC throughout, use 16726 instead of 16574.
Rixa is offline  
 
Page generated in 0.04980 seconds with 9 queries