It is currently Tue Sep 17, 2019 9:51 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Wed Jan 13, 2010 2:58 am 
Offline

Joined: Fri Sep 22, 2006 9:52 am
Posts: 160
Location: philly
What I thought was going to be a super simple task wound up a little more baffling than I expected. I am trying to recreate the sound as accurately as possible in famitracker and / or mml.

I've gotten very close. The instrument values are:
Code:
Volume: 14 14 14 14 13 13 13 13 12 12 12 11 11 11 10 10 10 10 9 9 9 9 8 8 8 7 7 7 7 6 6 6 6 5 5 5 5 5 4 4 4 4 3 3 3 3 2 2 2 2 1 1 1 0
Arpeggio: 0 0 0 0 0 5 (Play the note on B-4)
Duty Cycle: 2


The difficulty comes in nailing the volume envelope. Normally I would just slow the sample down, ball-park a recreation (using nsfplug for assistance in checking out the volumes), and then slow that down by the same amount and visually compare the samples in audacity. From there getting perfect volume envelopes for fairly simple sfx takes just a couple moments of tweaking.

What seems odd here is how you can't properly slow down the nsf of the original sound effect. In the same way you can't slow down a DPCM sample just by altering the playback speed of an nsf (it'll just hit when it is supposed to but last the original duration), the fade out will happen at its normal speed (while the arpeggio or note change will slow down properly, making it not in-synch with itself). This happens in both nsfplug and notsofatso.

Furthermore, nsfplug tells me the volume is 'E13', the whole time. I don't know what E stands for b/c it's not normally there on non-silent notes, and the dynamic certainly isn't static anyways!

TLDR - is this some sort of hardware effect / fade? Is the nsf just weird?
I don't think anyone would be able to tell the difference by ear, but this is bugging me anyways.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 3:56 am 
Offline

Joined: Sat Nov 17, 2007 8:44 pm
Posts: 385
I don't know how you can achieve the exact same sound (aside from getting into Mario's source files), but I wanted to point out that you can always slow down a sample. Just run an audio cable from your speaker out to your microphone in, hit record in Audacity, and play the sound. You can slow it down within Audacity then.


Top
 Profile  
 
PostPosted: Wed Jan 13, 2010 7:07 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7741
Location: Chexbres, VD, Switzerland
Quote:
Furthermore, nsfplug tells me the volume is 'E13', the whole time. I don't know what E stands for b/c it's not normally there on non-silent notes, and the dynamic certainly isn't static anyways!


I don't know what the "E" is for, but this means hadware deacay is being used.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 7:20 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21591
Location: NE Indiana, USA (NTSC)
Perhaps "E" stands for envelope. So I'm guessing one decrease per 13+1 = 14 ticks from the frame counter, which ticks once every 7457.5 CPU cycles on NTSC (and skips every 5th clock if $4017.d7 is set).

_________________
Pin Eight | Twitter | GitHub | Patreon


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 9:07 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4211
14 ticks on the frame counter = either 3.5 frames, or 4.375 frames per volume decrease. Probably the former.
Volume should start at the maximum value 15, not 14.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 9:38 am 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2157
Location: Minneapolis, Minnesota, United States
Isn't the coin sound just a simple volume decay on the notes B and E played in sequence (Or Bb and Eb; I can't recall the -exact- pitch of the top of my head)? I didn't think there was any arpeggio or anything on it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 9:56 am 
Offline

Joined: Fri Sep 22, 2006 9:52 am
Posts: 160
Location: philly
Dwedit wrote:
14 ticks on the frame counter = either 3.5 frames, or 4.375 frames per volume decrease. Probably the former.
Volume should start at the maximum value 15, not 14.

tepples wrote:
Perhaps "E" stands for envelope...

Thanks guys! This looks like it must be it. Adding or decreasing a value in famitracker would either make it slightly longer or shorter than the original. I was wondering what allowed it to do something that was 'inbetween'. Surprised I screwed up the starting volume, but should be an easy fix. Guess I'll have to settle for 'as close as possible' with the tools I'm using. :)

Celius wrote:
Isn't the coin sound just a simple volume decay on the notes B and E played in sequence (Or Bb and Eb; I can't recall the -exact- pitch of the top of my head)? I didn't think there was any arpeggio or anything on it.

Yup, and it is B and E! Crazy memory or great ear. E is five half steps above B, and occurs on the 6th frame, which explains my arpeggio effect. So yeah, it's not an arpeggio in the musical sense, but using the arpeggio effect is an easy way to tell a note when to change down to the exact frame. This is something I've gotten exact to the original. :)


Last edited by bucky o'hare on Wed Jan 13, 2010 10:04 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 9:59 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21591
Location: NE Indiana, USA (NTSC)
So at this point, I guess all that remains is to log the writes to discover
  • whether the envelope restarts at that point
  • whether or not SMB1 is using the 5-step APU frame counter sequence


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 9:19 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2157
Location: Minneapolis, Minnesota, United States
bucky o'hare wrote:
E is five half steps above B, and occurs on the 6th frame, which explains my arpeggio effect. So yeah, it's not an arpeggio in the musical sense, but using the arpeggio effect is an easy way to tell a note when to change down to the exact frame. This is something I've gotten exact to the original. :)


Oh, I get it now. Yeah, that actually might be a simpler way to go about making that sound effect. And plus, you could transpose it however you like if you play it in music. Perhaps the first B starts out decaying just like the E, as if it were just the two notes using the same decay envelope played in sequence. It's strange how it would be hard to replicate, but little things like that I guess are surprisingly precise.

bucky o'hare wrote:
Yup, and it is B and E! Crazy memory or great ear.


Oh, well I think it's both :) ! No, just kidding. Seriously though, I've been playing music by ear my whole life, so I've developed a very strong memory for remembering sounds. I can replay a boat load of sound effects from various games in my head, and I can usually figure out what pitches will go into making that sound. For example, I focused on my memory of the coin sound effect, and listened to the pitch it played in my mind, and determined it was B and E. But sometimes I remember it transposed up or down one. We all make mistakes!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 9:44 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 10:17 pm
Posts: 154
Code:
@v0 = {13  13  12  12  11  11  10  10  9  9  8  8  8  7  7  7  6  6  6  5  5  5  4  4  4  3  3  3  2  2  2  1  1  1  0}

A t162

A @2 @v0 o5 l16 q8

A b>e1


http://4x86.com/smb_coin.nsf


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 14, 2010 11:17 am 
Offline

Joined: Fri Sep 22, 2006 9:52 am
Posts: 160
Location: philly
RushJet1 wrote:
Code:
@v0 = {13  13  12  12  11  11  10  10  9  9  8  8  8  7  7  7  6  6  6  5  5  5  4  4  4  3  3  3  2  2  2  1  1  1  0}

A t162

A @2 @v0 o5 l16 q8

A b>e1


http://4x86.com/smb_coin.nsf


Ah, that's not quite the same though. Here's a comparison (top = original):
Image
Asides from fading out quicker, I think yours may also last on B for one frame too long. It's not quite apparent from this level of zoom in audacity though.

Here's what it looks like with some tweaking of the envelopes from before-
Image

SMB Coin NSF
Code:
Volume: 15 15 14 14 13 13 13 13 12 12 12 12 11 11 11 11 10 10 10 10 9 9 9 8 8 8 8 7 7 7 7 6 6 6 6 5 5 5 5 4 4 4 4 3 3 3 2 2 2 2 1 1 1 0
Arpeggio: 0 0 0 0 0 5 (Play the note on B-4)
Duty Cycle: 2


Still not perfect. Looking at it now I can see that changing a couple of values may get it closer. But after that, that may be as close as I can get without replicating the hardware fade or somehow getting frames split to decimal places (not possible in famitracker?) as dwedit / tepples pointed out.
I'll have the final version later on. Back to work. :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 14, 2010 11:25 am 
Offline

Joined: Fri Sep 22, 2006 9:52 am
Posts: 160
Location: philly
Celius wrote:
bucky o'hare wrote:
Yup, and it is B and E! Crazy memory or great ear.


Oh, well I think it's both :) ! No, just kidding. Seriously though, I've been playing music by ear my whole life, so I've developed a very strong memory for remembering sounds. I can replay a boat load of sound effects from various games in my head, and I can usually figure out what pitches will go into making that sound. For example, I focused on my memory of the coin sound effect, and listened to the pitch it played in my mind, and determined it was B and E. But sometimes I remember it transposed up or down one. We all make mistakes!

Hahah, that's nice. I'm almost strictly a drummer when it comes to music so naturally my ear kind of sucks. I just used piano view in nsfplug to tell me what was going on. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group