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
1118 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: 193
zip Midi2VB_src.zip Size: 188.17 KB; Hits: 196
Top

#2
Re: Midi2VB Converter
Posted on: 2012/3/6 23:08
PVB Elite
Joined 2008/12/28
Slovenia
629 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

#3
Re: Midi2VB Converter
Posted on: 10/19 5:24
Newbie
Joined 10/19
1 Posts
So how do i playback the.h file or listen to it? i was told it plays back the converted audio but im not sure how to use it. the readme didn't help as much.
Top

#4
Re: Midi2VB Converter
Posted on: 10/20 14:04
PVB Elite
Joined 2011/7/1
Germany
1118 Posts
CoderContributorTop10 PosterLong Time User (8 Years) App CoderPVBCC 2013 Entry
Quote:

NyTR0S96 wrote:
So how do i playback the.h file or listen to it? i was told it plays back the converted audio but im not sure how to use it. the readme didn't help as much.


It's a source code file. You will need a c project that includes the music player code as well and compile it.

This project is very old though. VuEngine now has sound support. They used my latest code as a template and modified my music converters to output in their format. I guess it's way easier using that even though I have not tried it myself.
Top

 Top   Previous Topic   Next Topic


Register To Post