Original Post

It seems that everybody complains about VB audio. I for one, love the music of Mario Clash especially. I think the VB would be great for chiptunes, probably better than Game Boy. So, does anybody know how to change the MIDI file that MIDI music player plays?

16 Replies

in3D wrote:

It seems that everybody complains about VB audio. I for one, love the music of Mario Clash especially. I think the VB would be great for chiptunes, probably better than Game Boy. So, does anybody know how to change the MIDI file that MIDI music player plays?

I happen to love VB music I just wish that we could do things to the caliber of commercial VB audio.

The VB has some great tracks spread throughout the game library. It has a capable audio chip in there for sure. Keeping in mind all these games are first gen games, imagine what developers would have produced a couple years in!

in3D wrote:
It seems that everybody complains about VB audio. I for one, love the music of Mario Clash especially. I think the VB would be great for chiptunes, probably better than Game Boy. So, does anybody know how to change the MIDI file that MIDI music player plays?

I’m not sure if I get your question right. I guess you want to know if it is possible to exchange the music in a commerical VB game with something else (like a midi file). First of all, the VB is not capable of playing Midi files. However, the way the VB handles chiptune music is quite similar to how midis are handled. You basically say which note is played for how long on which channel with which waveform. This is relatively easy compared with how music is handled on other systems (e.g. the NES). That said, this also leads to one problem. Pretty much every commercial game has it’s own sound engine, own sound format and so on. This makes it rather hard to exchange music within a ROM as you would have to reverse engineer the specific sound format first and then bring your music into this format.

morintari wrote:
I happen to love VB music I just wish that we could do things to the caliber of commercial VB audio.

Actually, there is not much holding you back from producing commercial quality audio. Pretty much everything is known about the VSU. There are plenty of examples showing how to use the system (including my sound engine). It is just a matter of fine tuning your music/waveforms to sound the way you want it. You just need to be a good musician.

I think there are a couple of commercial games that manage to play PCM music during the game instead of using the chiptune. It would be really interesting how this works. The explanations from Guy Perfect in this thread (http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=5189&viewmode=flat&order=ASC&type=&mode=0&start=0) sound plausible but I never had a look at it myself.

Holy crap! The sound samples from that other topic are amazing! Can that be done on other systems, say, Game Boy? That’d be cool. My original question though, was about the homebrew title MIDI Music Player. I wanted to know how to change the MIDI file that it plays.

in3D wrote:
My original question though, was about the homebrew title MIDI Music Player. I wanted to know how to change the MIDI file that it plays.

OK, that is easy. You will need to convert your Midi, put the converted file into the midi player project and recompile it.

If you don’t have a VB development environment already get vbde (http://www.planetvb.com/content/vbde_preview4.7z) and extract it to c:\ . You will want to download the Midi Player sources (http://www.planetvb.com/content/downloads/tools/GH-MidiPlayer.zip) and put the project into the folder “C:\vbde\projects\midiPlayer”. You can try compiling it by starting vbde, open the example.c and press the compile button (second from the left).

Now you will need to download the Midi Converter (http://www.planetvb.com/content/downloads/tools/Midi-Converter-bin.zip). You will also need the microsoft .net framework installed in order to start the MidiGui.exe (Chances are good you already got it). You can then simply pick your midi file (choose a simple name without special characters for the midi like ‘yourmidi.mid’), and choose the output directory (C:\vbde\projects\midiPlayer\music). Then select the tracks you want to convert, choose a channel and instrument for each track and press the convert button. If everything went fine you should see a new .h file (yourmidi.h) in your music directory.

Some words about the midi: The published version has some limitations. It might crash on certain midis. Try to use tracks that don’t play multiple notes at the same time. The converter might also screw up notes that play very long. I fixed all of this in the new version of the converter. So you might be able to switch to a better version when I publish it.

OK, you are nearly done. Open the .h file that popped up in your music directory. At the bottom you will find two lines that look like this:

//#include “../music/yourmidi.h”
//mp_loadSong_yourmidi();

Copy the first line (without the //) into the example.c next to the other includes. Replace the line
mp_loadSong_the_legend_of_zelda();
with the second line (without the //).

Now compile it and test. If you get stuck let me know.

You can also send me your midi and I can try it with my current converter.

It worked! The output file plays a rudimentary rendering of King Dedede’s theme (That could be just because I only tested it in Mednafen and RB). This is cool. Now I just need to find the VB emu with the most accurate sound emulation. Nice artwork in the MIDI player, BTW. I love that show!

in3D wrote:
It worked! The output file plays a rudimentary rendering of King Dedede’s theme (That could be just because I only tested it in Mednafen and RB). This is cool. Now I just need to find the VB emu with the most accurate sound emulation. Nice artwork in the MIDI player, BTW. I love that show!

Great to hear someone is using it. Are you working on a game or just trying out stuff?

Unfortunately, from all the emulators mednafen seems to be most accurate in terms of sound. The new version of the midi converter is more advanced and makes allot of things easier. I still need to fix some things on a UI level though.

I’m just using it to make music. It’s too bad none of the emulators available have good sound emulation. Maybe someone could combine the virtual boy sound generator with one of the available emus.

in3D wrote:
I’m just using it to make music. It’s too bad none of the emulators available have good sound emulation. Maybe someone could combine the virtual boy sound generator with one of the available emus.

If you have a flashboy you can try it on hardware. I’m not a big Kirby fan so I don’t know if the king dedede theme is somewhere played in Kirby’s Adventure. However, here is some Kirby music which I just converted.

Attachments:

No it’s not in Kirby’s Adventure. What are the controls for this ROM you uploaded?

in3D wrote:
No it’s not in Kirby’s Adventure. What are the controls for this ROM you uploaded?

Just up and down on one of the d pads. Not sure what the default mapping in mednafen is.

Oh. It must not work in reality boy.

in3D wrote:
Oh. It must not work in reality boy.

Yeah, the sound emulation in reality boy is very bad. I spotted several bugs (apparently the sound registers are interpreted backwards) and stopped supporting it. If you run my rom in mednafen you should get a decent result. However, the best way to listen to it is always on hardware.

I would use mednafen, I just don’t believe in multi-system emus. They’re always best at emulating one console, and I’d rather use different emus for the other ones. Plus it doesn’t have a gui.

Well, the thing with Mednafen is, it’s actually based on a bunch of other open-source emulators, usually with improvements to each, so it emulates each system quite well. Its GBA support is especially well done. The lack of a GUI is moot; just associate file types and use your system’s built-in file browser! Besides, with its nice help system to list the major hot-keys (press F1), and an automatic controller mapper, it’s quite “GUI-like”, only lacking a (superfluous, IMO) file chooser. On top of all that, it’s pretty much the best VB emu out there (sound support being a prime example of this), and the only one (to my knowledge) still being maintained.

If you still want a “single-system” emu, there’s always VBJin, which is (a usually out-dated version of) the Mednafen VB core, with a GUI tacked on.

in3D wrote:
I would use mednafen, I just don’t believe in multi-system emus. They’re always best at emulating one console, and I’d rather use different emus for the other ones. Plus it doesn’t have a gui.

It took me a very long time to get used to mednafen for the same reasons.

 

Write a reply

You must be logged in to reply to this topic.