WAV to NES converter

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

Post Reply
User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

WAV to NES converter

Post by miker00lz »

i was just tinkering with PCM playing code and ended up writing a program that converts WAV audio files into a NES ROM that does nothing but play the data. i'm working on some additional features, and i'll upload the converter soon, not sure if there's much interest in it or anything.

here's a sample output ROM to demonstrate it. run it in nintendulator or nestopia for best results. the pitch is quite a bit lower than it should be if using FCEUX.

http://rubbermallet.org/wav2nes-sample.nes
snarfblam
Posts: 143
Joined: Fri May 13, 2011 7:36 pm

Post by snarfblam »

Nifty. I might be interested in inserting audio into an existing game down the road.
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Post by infiniteneslives »

So is the size dependent on the .wav file? Or does it always pump out huge files? Seems like it would be difficult to implement in a game with close to 512KB of music data.

Is it always set to MMC3? or are you able to use any mapper that can store that much data?

Either way pretty cool though even to just play around with. I'd be interested in seeing a release. nice work!
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

Works nicely with RockNES.
User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Post by miker00lz »

infiniteneslives wrote:So is the size dependent on the .wav file? Or does it always pump out huge files? Seems like it would be difficult to implement in a game with close to 512KB of music data.

Is it always set to MMC3? or are you able to use any mapper that can store that much data?

Either way pretty cool though even to just play around with. I'd be interested in seeing a release. nice work!
nope, it just depends on the WAV length. i'm converting to 18000 Hz output but i'll make that changeable. i only wrote code to do MMC3, but there is no reason it couldn't use other mappers.

i'll provide the player code too. it's really simple as you might imagine.
User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Post by miker00lz »

Zepper wrote:Works nicely with RockNES.
just tried it, yeah nice work on that it's perfect.
User avatar
Hamtaro126
Posts: 818
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

Sunsoft's FME7 and ROM with bankswitching 8-bit PCM At $6000-$7FFF should help a lot in most cases, especially when it comes to music or samples...

There is another method without stopping gameplay and stuff: a 7-bit DMC/DPCM Option, but it will lose quality.

Also there is ROM Size to consider, There is 32kb of ROM Max for most mappers along with bankswitching, so real consoles do not have this, emulators do!

So you are in a (Fuzzy) Pickle unless you do a mapper of your own, example given earlier by Tepples: Moero! Pro Yakyuu (Japanese Bases Loaded).
AKA SmilyMZX/AtariHacker.
User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Post by miker00lz »

Hamtaro126 wrote:Sunsoft's FME7 and ROM with bankswitching 8-bit PCM At $6000-$7FFF should help a lot in most cases, especially when it comes to music or samples...

There is another method without stopping gameplay and stuff: a 7-bit DMC/DPCM Option, but it will lose quality.

Also there is ROM Size to consider, There is 32kb of ROM Max for most mappers along with bankswitching, so real consoles do not have this, emulators do!

So you are in a (Fuzzy) Pickle unless you do a mapper of your own, example given earlier by Tepples: Moero! Pro Yakyuu (Japanese Bases Loaded).
yeah, my music sample ROM is very impractical for a game but it's just to demonstrate it. it would be great for short samples though. say, something at the end of a level or during a title screen, or something similar. my example being 18000 Hz sample rate is also impractical. :)
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Post by infiniteneslives »

miker00lz wrote:it would be great for short samples though. say, something at the end of a level or during a title screen, or something similar.
I really like that idea! I had passed it as total impractical in a game, but it would make for a great wow factor on a title screen.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

infiniteneslives wrote:I had passed it as total impractical in a game, but it would make for a great wow factor on a title screen.
A lot of other developers have had the same idea:
  • Wheel of Fortune and Skate or Die 2 both have a title scream. Action 52 has a sampled theme song and "Make your selection now" speech on the title screen.
  • The first Castlevania game for GBA uses an 8-bit LPCM stream on the title screen and sequenced music elsewhere.
  • Animal Crossing: Wild World for DS uses a pair of 4-bit ADPCM streams (one for each channel) on the title screen and sequenced music elsewhere.
User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Post by miker00lz »

yeah, this isn't a new idea or anything but i didn't seem to be able to find an existing program to do this.
User avatar
MrNorbert1994
Posts: 986
Joined: Tue May 06, 2014 1:50 pm
Location: Szeged, Hungary
Contact:

Re: WAV to NES converter

Post by MrNorbert1994 »

I'm aware that posting to a 3 year old topic is not the best idea, but does anybody know what is the original track's name what is in this ROM?
It says something like: "I'm back in the sea, I'm not gonna see...", but I couldn't find any track, or even lyrics with that.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: WAV to NES converter

Post by thefox »

MrNorbert1994 wrote:I'm aware that posting to a 3 year old topic is not the best idea, but does anybody know what is the original track's name what is in this ROM?
It says something like: "I'm back in the sea, I'm not gonna see...", but I couldn't find any track, or even lyrics with that.
Genesis - Dodo / Lurker (Three Sides Live) HQ
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Post Reply