Offline

Hi!

I made a short script that converts mono .wav files into 8-bit 8363Hz .pcm files.  You can get it from https://github.com/ZoeB/wave-tools/blob … keamiga.py .  Suggested usage: "python3 makeamiga.py *.wav"  I hope it's helpful for someone out there!  I'm using it with Scream Tracker 3 myself, and it's working like a charm.

All the best,
Zoƫ.

Offline

nice

Last edited by 4mat (Sep 26, 2012 6:23 pm)

Offline
New York City

Hi Zoe,

Nice one, more tools like this are needed.
However, I got a question: why the arbitrary sample rate?
8363 Hz corresponds to C-2. What if the original sample is not even a C? I think a choice would be better.
The default landing note of ProTraker is C-3, too. Perhaps is best to work with that value (16726Hz) although that's mostly for when you want higher quality samples that you won't be pitching up much. The solution to this problem is always complicated (there's thousands of detunes module files from back in the day because of problems with sample rates and notes and shit)

Last edited by akira^8GB (Sep 26, 2012 7:54 pm)

Offline

The 8363Hz sample rate is what Scream Tracker expects.  I'd assumed it was what the Ultimate Soundtracker expected too, due to what was easiest to play on the Amiga's Paula chip, but the only ST-XX disks I can find (archive.org's versions) have been converted to .wav, Wikipedia doesn't seem to mention it, and I don't have an Amiga, so I can't verify this.  While sample rates don't really have anything to do with a pitched sound clip's fundamental harmonic (Nyquist-Shannon sampling theorem aside, as ~8kHz isn't going to be high enough to capture all the upper harmonics anyway, as evidenced by listening to such samples), 8372Hz is the fundamental harmonic of C-9 according to the Csound manual, appendix B, so it does indeed seem likely that someone's original thought was to use a sample rate that's a multiple of the note's harmonic, although why they did this, I have no idea.  I can't think of an advantage to that.  I guess it might theoretically make the in-tune sine waves slightly smoother?

Anyway, yes, you're right, I should allow the user to define an arbitrary sample frequency (and ideally bit resolution) to convert the files to, ideally with the whole 8-bit 8363Hz thing having a preset option like --tracker or something.  I'll reserve the right to modify my script to allow this at some point, although it's not a high priority right now.  It's open source though, so if anyone else would like to add any features, and they're useful and well coded, I'll be happy to merge them in.

Thanks for the advice!