You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#1
Midi2VB Converter
Posted on: 2012/3/6 22:16
PVB Elite
Joined 2011/7/1
Germany
1109 Posts
CoderContributorTop10 PosterLong Time User (8 Years) App CoderPVBCC 2013 Entry
So here it is: The Midi2VB converter including all c# sources. It is able to convert Midi Files to a header format that can be used by the VirtualBoy. It does support the GameHero Midi-Player as well as the SU Sound Engine.

All of the GameHero music has been produced (within one day) using this tool. However, it is not perfect. It can only extract one track from a midi file. This means if the midi file uses multiple tracks you have to choose one. The converter does also not convert every midi file as the library I used does not support every format (also Midi files are a big mess). I got pretty got results if the midi file had a solid piano or melody track. I found all midis at "http://www.vgmusic.com/music/console/nintendo/nes/index-classic.html". I tried to convert other music then NES-Gamemusic but I did not like the results.

However, I think the music in GameHero is really awesome. And now you guys can use midi tools to do your music and then put it on your VB.

Ok, some more words about the program. Make sure you got the .net framework installed. I used Visual Studio 2005 to compile the sources. You will have to add the NAudio Librarys from the zip file to your references.

You can start the program using the commandline. Just enter "Midi2VB.exe AbsolutPathToMidiFile". The program then asks for some parameters.

name: this is going to be the file name and variable prefix
Tracks: All legal tracks found in the midi file. Choose one by entering the corresponding number
Max Notes: Maximum number of nodes that are include in the header file (pauses count as notes)
FPS: Estimated frames per second on target system. Default should be 60. This can be used to speed up and slow down the music. It is also great if your game code slows down the music. Then you can just speed up the music again.
Replay: Sets how often the music should be replayed. -1 means endless
Octave Shift: Shifts the octaves up or down
Target: GameHero Midi Player or SU Sound engine.

It should say "All Done" as soon as... well... all is done.
After that you should find a [name].h file in the Midi2VB directory.

Ok, thats it. Feel free to do what ever you want with this code. As long as you build VB Games I am happy.

Cheers
thunder

Attach file:


zip Midi2VB.zip Size: 272.71 KB; Hits: 187
zip Midi2VB_src.zip Size: 188.17 KB; Hits: 191
Top

#2
Re: Midi2VB Converter
Posted on: 2012/3/6 23:08
PVB Elite
Joined 2008/12/28
Slovenia
628 Posts
Highscore Top ScoreHighscore Top ScoreCoderContributor10+ Game RatingsLong Time User (10 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
It's great! An obvious enhancement would be to make it support more MIDI files, but I have no idea how hard that would be. What's important is that the VB homebrew community finally has an easy way to put sounds and music into games.
Top

 Top   Previous Topic   Next Topic


Register To Post