Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
#5615 05/19/06 12:41 AM
Joined: Jun 2003
Posts: 14
Junior Member
OP Offline
Junior Member
Joined: Jun 2003
Posts: 14
Is there any experimentation going on in M1 using Shay Green (Blargg)'s bandlimited synthesis technique. Quite a bit of the audio in M1 doesn't sound as good as they should. Mainly stuff like the AY-thingy.

#5616 05/19/06 06:36 AM
Joined: Mar 2001
Posts: 16,921
Likes: 57
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,921
Likes: 57
Cart, horse. M1, MAME.

#5617 05/19/06 05:02 PM
Joined: Jun 2001
Posts: 475
O
Senior Member
Offline
Senior Member
O
Joined: Jun 2001
Posts: 475
Huh? You think using mame is easier to try sound synthesis methods?

OG.

#5618 05/19/06 07:36 PM
Joined: Mar 2001
Posts: 16,921
Likes: 57
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,921
Likes: 57
It's not any harder, and in this case it's more a matter of porting his engine and adapting the various synthesizers to use it.

#5619 05/19/06 11:39 PM
Joined: Sep 2004
Posts: 392
Likes: 4
A
Senior Member
Offline
Senior Member
A
Joined: Sep 2004
Posts: 392
Likes: 4
Quote:
Originally posted by R. Belmont:
It's not any harder, and in this case it's more a matter of porting his engine and adapting the various synthesizers to use it.
I'm still not convinced it will sound significantly improved versus generating output at the native rate and then doing quality downsampling, which is what MAME does today. It would be faster, certainly, but again, I'm not sure it matters that much in the big picture. I'd be more than happy to be proven wrong, though.

#5620 05/20/06 01:53 AM
Joined: Mar 2001
Posts: 16,921
Likes: 57
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,921
Likes: 57
I would agree if MAME did quality downsampling (which involves an FFT and IFFT), but last I saw it was still fixed-point drop-sample. I'll have to check 0.106 though.

#5621 05/20/06 02:37 AM
Joined: Sep 2004
Posts: 392
Likes: 4
A
Senior Member
Offline
Senior Member
A
Joined: Sep 2004
Posts: 392
Likes: 4
Quote:
Originally posted by R. Belmont:
I would agree if MAME did quality downsampling (which involves an FFT and IFFT), but last I saw it was still fixed-point drop-sample. I'll have to check 0.106 though.
It's not fixed-point drop-sample, but it's not a full frequency domain translation either. It does a "sum of energy" weighted average over all the source samples that overlay a given target sample. This should produce roughly the same effect as playing the original at its native frequency and then sampling that output at the target frequency (assuming the ADC integrates over the time domain it is sampling at, which may be an incorrect assumption, but it does sound pretty decent and doesn't have the aliasing effects that drop sampling does smile )

#5622 05/20/06 05:40 AM
Joined: Jun 2001
Posts: 475
O
Senior Member
Offline
Senior Member
O
Joined: Jun 2001
Posts: 475
Sum of energy is good for images (which is area sampling), it's horribly wrong for sound (point sampling). ADCs do not integrate at all, they take an internal and pretty much instantaneous analog copy of the input voltage level, and then do a dichotomic search of the best binary value to use.

OG.

#5623 05/20/06 02:51 PM
Joined: Sep 2004
Posts: 392
Likes: 4
A
Senior Member
Offline
Senior Member
A
Joined: Sep 2004
Posts: 392
Likes: 4
Quote:
Originally posted by Olivier Galibert:
Sum of energy is good for images (which is area sampling), it's horribly wrong for sound (point sampling). ADCs do not integrate at all, they take an internal and pretty much instantaneous analog copy of the input voltage level, and then do a dichotomic search of the best binary value to use.

OG.
Regardless of how technically wrong it might be, it works better than point sampling and causes you to not lose all the data when high frequency sound is being made. When the first band-limited synthesis implementation comes along, I'll be happy to see its improvements in action.

#5624 05/21/06 12:37 PM
Joined: Jan 2005
Posts: 154
Senior Member
Offline
Senior Member
Joined: Jan 2005
Posts: 154
Audio ADCs may sample the instantaneous value, but there is almost always a low-pass filter between to remove frequencies above the Nyquist limit. Taking the average amplitude for each sample period is a form of low-pass filtering, so it's better than nothing. I'm assuming ADCs were brought up because a sound emulator is emulating the equivalent of the sound chip and an audio sampler.

I just looked at MAME's sound streams and it seems the change to use a more advanced resampling algorithm could be confined to streams.c around line 654. Perhaps the first thing for anyone to do is generate some comparison samples to see how much of an improvement is possible. One nice thing about my algorithm is that you get free fine-tuning of the frequency equalization to better match any filtering and even the speaker characteristics. If streams.c is indeed the file to modify, I may very well find the time to give this a try.

Page 1 of 2 1 2

Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
1 members (Cpt. Pugwash), 22 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,100
Posts119,241
Members5,019
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com