nesdev.com
http://forums.nesdev.com/

Audio pitch when emulating at different speeds
http://forums.nesdev.com/viewtopic.php?f=3&t=15123
Page 1 of 1

Author:  zeroone [ Wed Nov 16, 2016 5:22 pm ]
Post subject:  Audio pitch when emulating at different speeds

In FCEUX, the pitch changes when you adjust the emulation speed. Is it possible to re-sample the audio in way that retains the normal speed pitch when emulating at different speeds?

Author:  tepples [ Wed Nov 16, 2016 5:53 pm ]
Post subject:  Re: Audio pitch when emulating at different speeds

It depends on at what level you are emulating.

If you don't mind DMC (Gimmick and Batman: ROTJ) and $4011 banging (Skate or Die 2) going out of tune with the tone generators during an overclock, you can continue to clock the APU at the ordinary 315/176 MHz while overclocking the CPU. Otherwise, you'll have to use time stretching methods.

Author:  zeroone [ Wed Nov 16, 2016 8:48 pm ]
Post subject:  Re: Audio pitch when emulating at different speeds

tepples wrote:
It depends on at what level you are emulating.

If you don't mind DMC (Gimmick and Batman: ROTJ) and $4011 banging (Skate or Die 2) going out of tune with the tone generators during an overclock, you can continue to clock the APU at the ordinary 315/176 MHz while overclocking the CPU. Otherwise, you'll have to use time stretching methods.


Maintaining the APU at the normal speed while changing the speed of the CPU is an interesting idea. I'll give that more thought.

Since the APU provide an extremely large number of samples per seconds that needs to be decimated anyway, is there some simple time stretching technique that can be used to retain the pitch?

Author:  rainwarrior [ Wed Nov 16, 2016 9:11 pm ]
Post subject:  Re: Audio pitch when emulating at different speeds

I do not recommend time stretching. Techniques like that are very prone to aliasing and other unpleasant distortion (and usually computationally expensive).

FCEUX did just get an "overclocking" feature that was about adding extra scanlines (out of time), rather than changing the CPU frequency. I believe it skips the APU during the extra scanlines and might cancel the extra scanlines when $4011 is hit? I forget the details, but depending on what you're doing it might be a better alternative to a CPU frequency adjustment?

There was a thread about it here: http://forums.nesdev.com/viewtopic.php?f=3&t=12823

Author:  Dwedit [ Thu Nov 17, 2016 1:09 pm ]
Post subject:  Re: Audio pitch when emulating at different speeds

If you don't like the sound pitch changing, use dendy mode instead?

Author:  Sour [ Thu Nov 17, 2016 3:01 pm ]
Post subject:  Re: Audio pitch when emulating at different speeds

zeroone wrote:
Maintaining the APU at the normal speed while changing the speed of the CPU is an interesting idea. I'll give that more thought

This is what Mesen does when overclocking (if the option to preserve sound pitch is enabled).
The APU keeps running at the same speed that it usually if the CPU was not overclocked.
For $4011 writes, overclocking is automatically disabled until the $4011 writes stop, so their pitch is preserved as well.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/