SCC Envelopes?

By LeoSantos

Supporter (7)

LeoSantos's picture

22-11-2020, 07:56

Hi,

I've been studying/reverse engineering some of my favorite SCC songs, and ran into something interesting.

The lead instrument in the first level of the game "Quarth" exhibits what looks like a triangle envelope modulating its volume. Initially I though it was being changed every "tick" (1/60 of a second), as it's normally the case, but inspecting the wave form in an audio app revealed that the volume was changing much more rapidly, about 5 times per tick.

How was this accomplished? Could MSX games manipulate the sound data at a rate higher than once every frame?

Check the images. The first one has a zoomed out view showcasing a few ticks, and you can clearly see the volume oscillating a few times per tick. The second image is a close up view, and you can see that the envelope only fully loops after 64 columns - instead of the usual 32 columns that the SCC provides.

https://msx.pics/image/jq7wF
https://msx.pics/image/jqTu6

The audio was isolated using and emulator (OpenMSX) outputting individual wave files for each channel.
Thanks!

Login or register to post comments

By LeoSantos

Supporter (7)

LeoSantos's picture

22-11-2020, 08:13

Never mind! I'm stupid.

The reason why it appears to have 64 "columns" is that the sound is high-frequency enough that what I mistook for columns (each byte in the wavetable) are actually the individual samples in the output wave file... and the "envelope" in the zoomed out image is probably just an artifact from reducing the number of samples to fit on the screen. I think.

By Metalion

Paragon (1215)

Metalion's picture

22-11-2020, 11:33

LeoSantos wrote:

How was this accomplished? Could MSX games manipulate the sound data at a rate higher than once every frame?

For the sake of answering you question : yes, you can manipulate the sound data at a rate higher than once every frame, simply by using the HBLANK interrupt.

By Grauw

Ascended (9396)

Grauw's picture

22-11-2020, 13:47

Metalion wrote:

For the sake of answering you question : yes, you can manipulate the sound data at a rate higher than once every frame, simply by using the HBLANK interrupt.

And for the sake of completeness: I’m pretty sure Quarth doesn’t do that.