Files
tinymod/original/kebby.md
T
Jason 3e5ea9e7c5 Create blog post on Amiga sound chip and MOD player
Added a blog post about the Amiga's sound chip and a .MOD player project.
2026-05-05 22:40:35 +10:00

16 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# kb's blog
random and not so random stuff/
**TinyMOD**
*Posted on 2011/10/23*
At some point in 2007 somebody told me how the Amigas sound chip, Paula, was able to modify a sounds volume digitally without using multiplication dedicated circuits for that would have been prohibitively expensive for a home computer in 1984: It simply has a 6-bit counter per voice thats incremented every cycle and if its value is above the set volume, the voice is silenced for that cycle. So effectively its PWM with a pulse frequency of about 50Khz.
“But wait, shouldnt that color the sound, ring modulation artifacts and such?” I thought. The answer is of course a resounding no (also all artifacts introduced by the PWM are outside the audible range) but that didnt stop me from trying to emulate a Paula voice at the full 3.5MHz and then filtering it down to find out how it sounds.
Yeah well, and while were at it, lets see if we can hack up a simple .MOD player too without using anything a 68000 didnt have to offer (multiplications and such). Because coding for a couple of hours and the only being able to play a single waveform is boring.
Another few hours later there was one additional never-to-be-published toy project on my HD that way able to play a few MOD files that I liked, and that was about to be abandoned… if it hadnt been for a thread on pouet.net where somebody was asking for a module player source. And I just came home from a party and was ever so slightly inebriated, so I just pasted the source code there. A discussion spawned, I cleaned up the code a bit and fixed some replay errors, and so here it is, released into the public domain for everyone to enjoy or laugh at:
Just add sound output. Have fun :)