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: 688
Joined: Thu Sep 07, 2006 1:08 pm
Location: United States
Contact:

Replicating Ninja Gaiden II Fade Out

Post by Jedi QuestMaster »

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: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples »

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: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by rainwarrior »

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: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples »

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: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by rainwarrior »

??? 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: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples »

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: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by rainwarrior »

What did you possibly hope to accomplish by quoting this?

Honestly I feel insulted.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples »

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: 688
Joined: Thu Sep 07, 2006 1:08 pm
Location: United States
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by Jedi QuestMaster »

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: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples »

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: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by rainwarrior »

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: 688
Joined: Thu Sep 07, 2006 1:08 pm
Location: United States
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by Jedi QuestMaster »

rainwarrior wrote: 1. Startropics (even uses Zxx to fade triangle)
Th-this is a thing? :shock:
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by tepples »

Nonlinear mixing causes $4011 to also control the effective volume of the triangle channel.
User avatar
Jedi QuestMaster
Posts: 688
Joined: Thu Sep 07, 2006 1:08 pm
Location: United States
Contact:

Re: Replicating Ninja Gaiden II Fade Out

Post by Jedi QuestMaster »

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: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Replicating Ninja Gaiden II Fade Out

Post by lidnariq »

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