how can i do music on megadrive?

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM » Sat May 17, 2008 5:46 am

Hi,

@ Stef
See here for info on band-limited synthesis. In short, from what I understood from there, band-limited synthesis does not create ideal square waves (or other waveforms) but instead creates fourier approximation of that it using about 5 harmonics. This waveform has ripples. This is a known technique to avoid aliasing.

Blarrg told me that he runs the ym2612 at 1.5 times the output rate then resamples it to the output rate (which is lower of course) using a polyphase FIR filter.

stay safe,

AamirM

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sat May 17, 2008 9:25 am

AamirM wrote:Hi,

@ Stef
See here for info on band-limited synthesis. In short, from what I understood from there, band-limited synthesis does not create ideal square waves (or other waveforms) but instead creates fourier approximation of that it using about 5 harmonics. This waveform has ripples. This is a known technique to avoid aliasing.

Blarrg told me that he runs the ym2612 at 1.5 times the output rate then resamples it to the output rate (which is lower of course) using a polyphase FIR filter.

stay safe,

AamirM
I see, thanks for clarify.
I though than using the internal YM2612 rate would be the most accurate way of getting the correct final wave.

AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM » Sat May 17, 2008 9:37 am

Hi,
Stef wrote:I though than using the internal YM2612 rate would be the most accurate way of getting the correct final wave.
I too think this way. Blargg will be giving me some general purpose code to his sound filters (the same ones that are used in his gme program but written in SSE.MMX asm) soon and I will post it here when I get it. Then we can all test it and fix this bug once and for all :) .

stay safe,

AamirM

AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM » Sat May 17, 2008 1:28 pm

Hi,

Some more findings. Here are the frequency contents of that pirticular instrument:

Incorrect:

Image

Correct:

Image

Seems like some higher frequencies are getting aliased with lower frequencies.

stay safe,

AamirM

Post Reply