DPCM playback rate does really correlate with note freqs

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

Moderator: Moderators

User avatar
Jarhmander
Formerly ~J-@D!~
Posts: 488
Joined: Sun Mar 12, 2006 12:36 am
Location: Rive nord de Montréal

DPCM playback rate does really correlate with note freqs

Post by Jarhmander » Thu Aug 06, 2009 8:30 pm

I have posted that on 2A03.org 2 years ago http://2a03.org/forum/viewtopic.php?id=924. (all the data in the period column is from blargg APU reference, so I assume it's accurate ;) ) It shows the same info like in any docs that talks about DPCM, but I've added one crucial info: the obvious detuning of some speeds.

But recently I thought, "Well, it's surely all detuned, but those freqs are high and it's nearly impossible with a "timer" system to stay in tune in high freqs. Are those speeds the closest possible to tuned note frequencies?"

I took my Voyage200 and divided the 2A03 master clock (1.7897725MHz) by all the frequencies of the tuned notes, rounded it to the closest integer (so I get a value of what I'm supposed to put in the internal DPCM period register to be at the closest possible frequency) and I compared the result with the period of each speed.

The error is within -1 to 1, half of the time being 0.

Bananmos were not sure if "Nintendo designed certain values to be notes, or if it's just blind luck that they are". Well, there's strong evidence here that those periods were chosen according to how close it gets to some note's frequencies.

P.S.: If you really want to see all my calculations, I can post them on demand.

bucky o'hare
Posts: 160
Joined: Fri Sep 22, 2006 9:52 am
Location: philly

Post by bucky o'hare » Mon Aug 10, 2009 6:04 pm

So if I read this correctly, it seems that they did try to get every DPCM value to be as close to the corresponding pitches as possible?

Pretty cool. But that kind of makes me wonder why Nintendo never bothered making use of that. There were zero first party games that used DPCM for melodic parts, correct? I know there were issues of cost, space, and efficiency regarding samples, but it seems a bit funny that they'd let some 3rd party companies essentially figure it out on their own (as I would assume), and do nothing with it themselves.

Also, thanks again for making that table. I've made use of it. :)

User avatar
Bregalad
Posts: 7766
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Tue Aug 11, 2009 12:09 am

That's a great finding, and it seems logical, all the heavy DPCM usage by Sunsoft wouldn't have been possible if all pitches were just random, or they'd have to store dozens of samples instead of just 5/6 which wouldn't have been possible.

Anyway altough I like music in Sunsoft games, the DPCM bass often sounds detuned and "windy". If only Nintendo would have provided us another sample encoding instead...
Life is complex: it has both real and imaginary components.

User avatar
RushJet1
Posts: 154
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 » Tue Aug 11, 2009 5:12 am

Bregalad wrote:Anyway altough I like music in Sunsoft games, the DPCM bass often sounds detuned and "windy". If only Nintendo would have provided us another sample encoding instead...
pff you can do that forever though, if only nintendo had given us 3 squares instead of two, or if only the triangle had volume

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

Post by tepples » Tue Aug 11, 2009 6:20 am

The only "if only" I care about is "if only Nintendo had run the audio path through the Game Pak connector on the NES as it had on the Famicom".

User avatar
RushJet1
Posts: 154
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 » Thu Aug 13, 2009 2:57 pm

tepples wrote:The only "if only" I care about is "if only Nintendo had run the audio path through the Game Pak connector on the NES as it had on the Famicom".
yes this one is valid, though at least we got detachable controllers

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: DPCM playback rate does really correlate with note freqs

Post by thefox » Fri Aug 14, 2009 5:48 am

~J-@D!~ wrote:Bananmos were not sure if "Nintendo designed certain values to be notes, or if it's just blind luck that they are". Well, there's strong evidence here that those periods were chosen according to how close it gets to some note's frequencies.
Actually it was Memblers who wrote that doc, not Bananmos ;) Anyways, cool that somebody actually bothered to try this out.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

tmro
Posts: 1
Joined: Mon Mar 01, 2010 11:39 am

Post by tmro » Mon Mar 01, 2010 11:42 am

I know this is an old topic but that link is bad. does anyone have those freqs/maths for dpcm tuning? could you post.

thanks in advance.

WJYkK
Posts: 60
Joined: Thu Dec 24, 2009 12:23 am
Location: Igloo and Bear Land (Canada)
Contact:

Post by WJYkK » Mon Mar 01, 2010 9:59 pm

tmro wrote:I know this is an old topic but that link is bad. does anyone have those freqs/maths for dpcm tuning? could you post.

thanks in advance.
A2O3 Homepage wrote:GENERAL NOTICE!

I'm sad to say that due to a mistake on my host's behalf the whole website account got deleted.
In practise this means we lost over a year of the most recent forum data and possibly some NSF files.
However, this does not mean the website isn't coming back. It will take a while so I ask for your patience.
In the meantime support and help is welcome at the official IRC channel #8bitpeoples (EFNet).

-Snowrobot
If their host didn't suck and Google Cache didn't crap out, it might have been recoverable. One more reason to have your own hosting instead of relying on unreliable fucks. :wink:

User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg » Tue Mar 02, 2010 7:35 am

Keep a local mirror of files on your host. You should never rely on a host for anything but the server availability (and if they are unable to deliver on that, simply switch hosts).

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

Post by tepples » Tue Mar 02, 2010 7:42 am

How often are the databases of wiki.nesdev.com and nesdev.com/bbs backed up?

That said, as soon as someone comes up with a test ROM to confirm the PAL frequency timings, I'll add the relative note frequencies to the wiki.

User avatar
Banshaku
Posts: 2328
Joined: Tue Jun 24, 2008 8:38 pm
Location: Fukuoka, Japan
Contact:

Post by Banshaku » Tue Mar 02, 2010 4:45 pm

tepples wrote:How often are the databases of wiki.nesdev.com and nesdev.com/bbs backed up?
I think you don't have to worry about that part. I think it's every day and kept for 30 days. Koitsu is doing a good job about it. And if you're that worry, I'm sure he could give us a backup anytime if that was the case but I'm not that worried compared to the last wiki server ;) Parodius do their job well, period.

User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg » Wed Mar 03, 2010 4:40 am

I've always been concerned about the Wiki's well-being. It's one advantage I find for local text documents over it. How big is the database, if one wanted to keep his own copy?

User avatar
Banshaku
Posts: 2328
Joined: Tue Jun 24, 2008 8:38 pm
Location: Fukuoka, Japan
Contact:

Post by Banshaku » Wed Mar 03, 2010 6:47 am

blargg wrote:I've always been concerned about the Wiki's well-being. It's one advantage I find for local text documents over it. How big is the database, if one wanted to keep his own copy?
That's a good question, I never checked the size. BUT for people that want a local copy, if you were not aware, there exist a local html version of the wiki here. It's the same thing as the wiki except static. I use a plug-in to extract the content. I update it once in a while. I thought it was a nice thing to have for people that sometime don't have access to the net but still want to see the wiki content. It can serve as a somewhat "poor man backup" if something goes very wrong: as long as you update the local version often.

There a way to ask the wiki for an xml version of the complete wiki that you can import in yours so there is always a way to get the content without having access to the DB. I was not aware of that when I moved the content... I would have saved time.

User avatar
Jarhmander
Formerly ~J-@D!~
Posts: 488
Joined: Sun Mar 12, 2006 12:36 am
Location: Rive nord de Montréal

Post by Jarhmander » Tue Mar 23, 2010 6:27 pm

just FYI, the site is now back, and the data is still here.

Post Reply