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: 569
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 »

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 »

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: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Post by Bregalad »

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...
Useless, lumbering half-wits don't scare us.
User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

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

Post by tepples »

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: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

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: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: DPCM playback rate does really correlate with note freqs

Post by thefox »

~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 »

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: 59
Joined: Thu Dec 24, 2009 12:23 am
Location: Alberta
Contact:

Post by WJYkK »

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 »

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

Post by tepples »

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: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Post by Banshaku »

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 »

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: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Post by Banshaku »

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: 569
Joined: Sun Mar 12, 2006 12:36 am
Location: Rive nord de Montréal

Post by Jarhmander »

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