Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Question on Midi files

Author
Message
Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 3rd May 2007 14:36
I've downloaded Anvil studio with a view to creating my own game audio, but the Midi general bank I've got doesn't quite have the range of sounds I'd like. Don't get me wrong, the library is extensive, but is there a way of adding new instruments to it?

On our way 'ome, on our way 'ome...
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd May 2007 19:25
Hello,

There are many ways to extend the sound capabilities of midi depending on software and hardware. I'll describe one method that uses sound fonts.

I don't know if Anvil uses a software method to deal with a type of midi sound extension called sound font (SF2). By that I mean can it play a type of sample in the format SF2 that doesn't require a compatible sound card? Soundfonts will extend the sound quality of midi patches to a virtually limitless measure. It maps samples (recorded sound) to the individual midi patches.

Anvil midi

If you don't have a sound font compatible card there are alternatives. There are many sound formats that pair well with midi that can extend the instrument selection and quality of the sound but let's stick with SF2 (sound fonts). These are basically samples that are mapped to different midi banks. In general, they require a sound font compatable sound card but there are programs that allow you to use sound fonts with any sound card.

You can take a couple of different approaches to using sound fonts with your game audio. If your goal is distribution then you can't rely on someone having the correct sound card so you would most likely distribute a soundfont software with the app. You can include a dll or exe that will play the sound font instruments in real time as a midi file plays. This will take processing power away from your app and unless it is small, it may not be worth it.

The best way would be to use the sound fonts and sound font software to convert your midi files to wav or mp3 or ogg, and then distibute that newly created media with your app.

A great sound font player/converter is SynthFont (freeware I think). It's fairly easy to use and offers many options including sound conversion/playing, VST plugin, full midi editing, and a sound font editor.

SynthFont

In my opinion, one of the best freeware midi to wav/mp3 player/converters is Timidity++. It was written as a command-line app which is where it's true power lies - but most people don't like to fool around with that sort of thing. It was originally written for Linux but there is a port for Windows with a GUI that works quite well. It can be tricky though to manage the configuration files, but once that's done, you don't have to do it again. It's a bit old, and I don't think it's been updated in years but worth checking out.

Timidity++

Also check out Fruity Loops. I haven't messed with this in years but I had a free version that allowed the playing and assigning of sound fonts to different instrument patches, loading a midi file and converting the patches to soundfonts for mp3 or wave export, a complete array of special effects, analog and digital synthesis, a complete drug machine and midi editor...

Fruity Loops

Here's a link to sound font sources and resources:

HammerSound

Enjoy your day.

Login to post a reply

Server time is: 2026-07-05 18:38:56
Your offset time is: 2026-07-05 18:38:56