help with recreating a sound effect

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
help with recreating a sound effect
by on (#26470)
I have been trying to recreate some sound effects into my nsfs (using either mml or famitracker).

One particular sound effect that has caught my attention is from Kid Icarus, when you kill an enemy. This sound has a flutter like effect, where the volume rapidly goes between zero and full volume. For instance: (8 0 8 0 8 0). Also, each pitch waits for an instant and jumps up to the next octave. i.e (0 12)

However, I have been unable to recreate this sound, because of timings. It seems that the volume flutters faster than "on one frame, off the next". Like 1/2 a frame on, 1/2 a frame off.

I wanted to ask someone with a more technical background than myself if this is the case, or if this is even possible on a nintendo game? And if so, is there a way to get this faster frame-rate on homebrewed nsfs?

Thanks!

by on (#26471)
This is possible because Kid Icarus don't use the same sound driver as MML or Famitracker. Maybe it uses the internal timer that allows to stop notes automatically (which most sound drivers don't need because they do it manutally), but it's possible to do so with smaller delays than 1 frame.

by on (#26472)
Thank you for that info. That sucks though...it means I can't make it sound exactly the same :(

by on (#26473)
Yes, I just examined the sound effect and the pitch starts at one octave, stays for ~8 msec, then jumps an octave up for ~8 msec. That means they're probably using the frequency sweep unit, which runs at about 120 Hz.

by on (#26488)
So each "flutter's" volume envelope is one frame on, one frame off...
But in each flutter, the first half a frame is the initial pitch and the second half is an octave above.

Blargg, I tested to see if your idea about using the frequency sweep would help me achieve the effect I desired...

Sadly, when listening to only one frame of a note of a NSF made In MCK, even when using the fastest frequency sweep setting ( s15,9 ), there is no noticible sweep in pitch. This is also the case when using the pitch-bend macro.

It's to my understanding that mml/mck and famitracker only refresh pitch once per frame, whereas some actual NES games had faster rates. If that is indeed the case, then it seems there's no way around it unless someone were to change famitracker or mml.

by on (#26489)
Exactly, the only way to get really fast pitch changes on the NES is to use hardware sweep (with fast values). In fact, one frame is pretty slow when it comes to sound, especially for sound effects. Games could implement tricks to runs their sound engines so many times per frame but that would be hard and eat comsiderable CPU time, so I think they didn't do that and just used the hardware sweep instead.