Sunday, February 06, 2005

Blockade.c sound, new blog in the works

Well, I've got partial sound working in blockade.c. Definitely better than silence!

I'm trying to come up with some simple way to deal with the aliasing distortion you get from generating high-frequency square waves the "simple way". This is really apparent in Minesweeper.

For the mathematically inclined, the problem is described and completely solved by the approach in this paper:

However, it's a pretty heavy-duty approach - probably too unwieldy for MAME.

I'm also getting ready to move to a blog based on Movable Type. I really want "categories", so that I can blog about anything and not alienate the people only interested in MAME. :) I grabbed and I hope to set up shop there within a week or so. I'm going to move my content there as well.


Anonymous said...

FRANK great , great, and great!!!
Only one think also for the old arcades!!!

Frank...please , give life to Lazarian , is incredible arn't in tdrivers. why not?!..are many anothers.
He work a little with quasar driver but crash on title star.
Lazarian is one of the best game 80' years old , can't loose mame.

Anonymous said...

hi jimi....

Anonymous said...

I suppose you're locked into a sample rate? Just playing around with a sound program I've found that moving from 44100 to 96000 significantly decreases the aliasing, and at 192000 even a 1500 Hz square tone sounds very good, despite being at a much lower ratio than the 1000/1 cited in Stilson & Smith.

Though since older sound cards won't support these
higher sample rates, this doesn't really solve your

Anonymous said...

Sorry- It just occurred to me why a 1500 Hz square sounds good a 192000- 192000 is a multiple of 1500 (1500*128 to be exact.) So, pick a sample rate that is a multiple of the frequency being generated, and cheat the frequency up or down slightly if an exact multiple isn't available. It may not be fully accurate, but it's better than aliasing.

Unless there are sliding pitch changes, which makes this all moot.

Anonymous said...

OK, third post:

Seems 192000 being a multiple of 1500 is not the only reason the tone had no aliasing. I went back and tried the same thing with oddball frequencies like 1347, 1431 and 1487 and had little to no aliasing. So two "simple ways" of solving the problem are adjusting tones to a multiple of the sample rate, or upping the sample rate.

Lord Nightmare said...

You could try sampling at 4 x 44100, then summing each 4 samples and rightshifting the result by 2 (i.e. divide by 4)... That should get all the anti-aliasing benefits of the high samplerate but without the need for a ridiculously expensive soundcard.
It IS processor intensive though...

Lord Nightmare

Sega Space Tactics

Sega Space Tactics - One of those arcade games which most people have never heard of - but it brings back a feeling of nostalgia for me....