It is currently Sat Nov 18, 2017 1:38 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: WAV to NES converter
PostPosted: Fri Mar 02, 2012 3:34 am 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 232
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 02, 2012 6:43 pm 
Offline

Joined: Fri May 13, 2011 7:36 pm
Posts: 143
Nifty. I might be interested in inserting audio into an existing game down the road.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 02, 2012 7:39 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1919
Location: WhereverIparkIt, USA
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!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 02, 2012 8:39 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3075
Location: Brazil
Works nicely with RockNES.

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 02, 2012 10:23 pm 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 232
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 02, 2012 10:23 pm 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 232
Zepper wrote:
Works nicely with RockNES.


just tried it, yeah nice work on that it's perfect.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 03, 2012 1:05 am 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 746
Location: Shelton, Washington.
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2012 1:41 am 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 232
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. :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2012 12:40 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1919
Location: WhereverIparkIt, USA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2012 2:00 pm 
Offline

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2012 2:24 pm 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 232
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.


Top
 Profile  
 
 Post subject: Re: WAV to NES converter
PostPosted: Tue Jun 16, 2015 12:40 pm 
Offline
User avatar

Joined: Tue May 06, 2014 1:50 pm
Posts: 359
Location: Szeged, Hungary
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.

_________________
http://mrnorbert1994.uw.hu/


Top
 Profile  
 
 Post subject: Re: WAV to NES converter
PostPosted: Tue Jun 16, 2015 1:19 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2981
Location: Tampere, Finland
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: kkfos.aspekt.fi


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Yahoo [Bot] 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