Replicating Ninja Gaiden II Fade Out

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

User avatar
Jedi QuestMaster
Posts: 603
Joined: Thu Sep 07, 2006 1:08 pm
Location: United States
Contact:

Replicating Ninja Gaiden II Fade Out

Post by Jedi QuestMaster » Fri Jun 12, 2015 7:56 am

I always liked how NGII's Musicruise would fade out music when you press "A." But it looks like it doesn't just "fade out" the channels. Is it also slowing down the tempo? :?

What's the exact rate that the volume drops?

I'd like to incorporate this type of fade out in some of my NSFs. :mrgreen:

tepples
Posts: 21842
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples » Fri Jun 12, 2015 8:08 am

How would a fade be useful in an NSF? NSF doesn't have track lengths or other metadata, and NSF 2 extensions ended up stalling.

User avatar
rainwarrior
Posts: 7719
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by rainwarrior » Fri Jun 12, 2015 11:49 am

NSFe has a fade specification, but I don't think JQM was asking about it as a feature of NSF, just how to accomplish it musically?

I didn't know NG2 has a sound test like that. Really bizarre that there are 3 versions of it? The musicruise looks like it fades the channels at different rates. The triangle not at all (just cuts off at some point), the noise much more slowly than the rest, DPCM immediately. I don't hear any change in tempo.

What do you need "exact rate" for? (And if you need that, why can't you determine it yourself?)

tepples
Posts: 21842
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples » Fri Jun 12, 2015 11:59 am

rainwarrior wrote:NSFe has a fade specification, but I don't think JQM was asking about it as a feature of NSF, just how to accomplish it musically?
I assumed that accomplishing a fade musically was intended as a means to mark the end of a piece. In this application of a fade, there needs to be some means to let the player know that the piece has ended and that if the track continues to play, all channels will remain silent until the emulated machine loses power. I mentioned NSF 2 as such a means.

User avatar
rainwarrior
Posts: 7719
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by rainwarrior » Fri Jun 12, 2015 12:19 pm

??? If you need to know when to stop, that's what a track length is for. (Or if emulated there are lots of alternatives.)

tepples
Posts: 21842
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples » Fri Jun 12, 2015 4:45 pm

rainwarrior wrote:If you need to know when to stop, that's what a track length is for.
tepples wrote:NSF doesn't have track lengths

User avatar
rainwarrior
Posts: 7719
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by rainwarrior » Fri Jun 12, 2015 4:51 pm

What did you possibly hope to accomplish by quoting this?

Honestly I feel insulted.

tepples
Posts: 21842
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples » Fri Jun 12, 2015 5:18 pm

I did not mean to insult you, just to point out a previous thing that you might have forgotten when writing a particular reply. I've noticed a habit on some forums of people reading only the latest post and replying only to that post while forgetting a detail that was mentioned earlier.

To my previous point: I'm just curious as to what such a fade would be used for in an NSF as opposed to in a game. A game would add a fade when preparing to stop and transition to a different track. A composition in a format with track lengths would add a fade at the start of the third time through the loop.

User avatar
Jedi QuestMaster
Posts: 603
Joined: Thu Sep 07, 2006 1:08 pm
Location: United States
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by Jedi QuestMaster » Fri Jun 12, 2015 6:38 pm

I'm making an album of NSFs... and for the NSFs that don't have a definite end, I'd rather fade them out using the hardware's limitations than fading them out in a sound editor.

I already started doing this, fading out each channel differently in a way that sounds right. The Triangle I would slowly decrease the note length until it reaches '0' .

But I like the way NGII does it! I want to replicate that.

tepples
Posts: 21842
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples » Fri Jun 12, 2015 7:09 pm

Jedi QuestMaster wrote:I'm making an album of NSFs... and for the NSFs that don't have a definite end, I'd rather fade them out using the hardware's limitations than fading them out in a sound editor.
Thanks. That clears things up.
I already started doing this, fading out each channel differently in a way that sounds right. The Triangle I would slowly decrease the note length until it reaches '0' .
I seem to remember Hatris doing this sort of fade.

User avatar
rainwarrior
Posts: 7719
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by rainwarrior » Fri Jun 12, 2015 9:25 pm

Seeing the Ninja Gaiden Musicruise actually makes me want to implement something like it as an "cute" fade option for NSFPlay. It'd be easy to do with the emulation.

Other games that I know do music fading, that you might want to check out:

1. Startropics (even uses Zxx to fade triangle)
2. Just Breed
3. Uchuu Keibitai SDF

User avatar
Jedi QuestMaster
Posts: 603
Joined: Thu Sep 07, 2006 1:08 pm
Location: United States
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by Jedi QuestMaster » Sat Jun 13, 2015 5:22 pm

rainwarrior wrote: 1. Startropics (even uses Zxx to fade triangle)
Th-this is a thing? :shock:

tepples
Posts: 21842
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples » Sat Jun 13, 2015 6:03 pm

Nonlinear mixing causes $4011 to also control the effective volume of the triangle channel.

User avatar
Jedi QuestMaster
Posts: 603
Joined: Thu Sep 07, 2006 1:08 pm
Location: United States
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by Jedi QuestMaster » Sat Jun 13, 2015 9:46 pm

But how does it work? I see the range is from 00-80. And both Z00 and Z80 render the triangle volume to its highest. Does that mean if I want a fadeout I go from 00-7F?

And does each value give the Triangle a unique volume level?

lidnariq
Posts: 9031
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Replicating Ninja Gaiden II Fade Out

Post by lidnariq » Sat Jun 13, 2015 9:48 pm

Yes. Values from 00 through 7F produce triangle channel volumes approximately equal to pulse channel volumes F through 7, respectively.

However, every time you change the volume, there will be a quiet click proportionate to the amount of change; some people on the famitracker forums have used 8- or 132- long DPCM samples, all +s or -s, to control the volume in a more continuous (and higher frequency) manner, however those produce quiet but audible "zipper" sounds.

The unique volume level comes from the NES APU's non-linear mixing, which in turn comes from misusing MOSFETs. (How much detail do you want?)

Post Reply