All of this will be invaluable info - please make sure you actually update the online psg.txt
Well, you linked to the Beta3 version of that document. Beta3's never changing. Unfortunately, I don't have things set up so you can view my latest SVN version over the web.
Just to be sure I understand, disabling both noise and tone and setting the envelope to a fast repeating pattern... LFO modulation?
Maybe not in the sense that's commonly understood (ie. for effects like tremolo). It's the same old envelope generator. Instead of setting the volume of a tone or the volume of some noise, it's setting the volume of a digital '1'.
Here's the way to think about it: Digital 0s go out as 0v. Digital 1s go out as some voltage between 0v and 1v determined by the volume register. (Note: I'm using the voltages 0v and 1v as an example. I don't know the precise voltage range in the Intellivision, but it's not necessary for understanding the mechanism to a first order.)
The volume steps on the PSG are spaced logarithmically, 1/sqrt(2) apart. So, assuming a 0v to 1v range, the volume levels are roughly:
- 15 = 1.0v
- 14 = 0.707v
- 13 = 0.5v
- 12 = 0.354v
- 11 = 0.25v
- 10 = 0.177v
- 9 = 0.125v
- ... and so on
- 0 = 0v
Logarithmic steps are perceptually uniform, but not uniform in voltage. For slow volume changes, they work like you'd expect, like a volume knob, with each step corresponding to an equal turn of the volume knob.
The envelope generator changes the effective volume in unit steps between 0 and 15. In the psg.txt file, they show different envelope waveforms:
For the repeating waveforms (1000, 1010, 1100, 1110), you get repeating ramps of 0..15, and/or 15..0 for the volume. When applied to a tone or noise, you'll hear a tone or noise that gets louder and softer with time, and if the envelope frequency is slow enough, it'll sound like someone turning a volume knob up and down. If you apply that exact same envelope to a digital '1', it probably won't sound like much of anything, because it'll be at a frequency below what humans can hear (20Hz).
But, the envelope generator can operate at frequencies in the audible range (ie. above 20Hz). If you apply that fast envelope to noise or tone, it's a form of ring modulation. You're multiplying the the envelope waveform with the tone or the noise waveform. If you apply that envelope to a digital '1', you get to here the envelope by itself.
Now, I pointed out above that the voltages associated with the volume register are logarithmically spaced. If you listen to a fast envelope, it's not going to sound at all like a triangle wave, despite being depicted as one. It's due to that logarithmic spacing. Instead, it's going to sound closer to being a series of impulses—ie. somewhat "prickly."
Indeed, it was just that technique I used for the "ghost steals back presents" sound effect in Christmas Carol. Fast envelope applied to no-tone, no-noise channel, and I just modulated the envelope frequency in software.
And fun fact: The RAZZ sound effect arises from applying a fast envelope to some low-pitched square waves, giving it its characteristic sound.
Edited by intvnut, Thu Feb 26, 2015 9:22 AM.