MIDI and SoundFonts


 Summary

Some old music that is in the form of MIDI files require a SoundFont to be played with. One great SoundFont out there comes from the hand of Rich Nagel, with his WeedsGM3 SoundFont, which comes complete for all instruments in the General MIDI definition.

At the end of the post you'll find some links to download the original WeedsGM3 SoundFont, and an alternative version I edited to change how Hi-Hats behave. Rich has given me permission to publish the edited one, but I will also include his original, and a link to his site for more information about the SoundFonts he built.

In this short post, I will briefly dive into what MIDI is, what it does, a little bit of history, and what sound fonts are. Nothing too technical, just a brief introduction.

What is MIDI anyway?

MIDI stands for Musical Instrument Digital Interface, and it's a standard that is pretty much mandatory nowdays for connecting instruments to a workstation, and creating music with it.

It was born as a technical paper in 1981, during the peak age of synthesizer music, at the hands of the president of Sequential Circuits, Dave Smith, company that is famous for the creation of the legendary PROPHET-5 synthesizer. Many well renown companies were involved in the definition of this standard, including Korg, Yamaha, Kawai and Roland. After a year of work it was announced by Robert Moog, the founder of the Moog Music company, and presented for the first time as MIDI on an issue of Keyboard (music magazine). By 1983, some of the companies involved in the creation of the MIDI standard began to implement it on their instruments and released to the general public, planting foot at the beginning of a massively adopted standard for music instrument integration.

Several revisions were made along the years to improve and add new features to the standard, however the standard we are using today still is the MIDI version 1.0. In 2020, the version 2.0 was announced though it's not yet massively adopted as version 1.0 was.

Nowdays, almost every instrument or software that is related to music has MIDI integrated and can connect to any other MIDI workstation or instrument. Modern synthesizers, digital keywords, workstations, electronic drums, even some electronic guitars and wind-based instruments implement some of it, making the standard greatly successful along the years.

So 'what is it?' you may still be asking. It's a digital message system to communicate events between devices. And yeah, that's pretty much it. The standard defines different types of binary messages, like NoteON, NoteOFF, Velocity, and many many more. Any device reading those messages can then react to them and do something, The dumb example I can give you is the NoteON event, when your keyword receives this message, along with a key number and a velocity, it will then play the note received at the velocity received, with whatever sound that key was configured with.

One of the goals of MIDI is synchronization between instruments. Prior to the existence of the standard, musicians only have signal gates to sinchronize their instruments, which depended on the devices connected to accept a specific voltage according to the manufacturer, so different devices may require different voltages. Not very practical. MIDI defines clock messages, and being a standard binary messaging system, any microcontroller can implement reading/sending messages. The standard defines the electronical circuit and voltage opreations as well.

Today MIDI is widely used in the music sector. From Digital Audio Workstations (DAW), to phyisical instruments like keyboards, to controllers. Modern synthesizers like the Korg Volcas also support MIDI. Devices and controllers often implement a subset of the standard, while DAWs and editors software may implement more, like presets, banks, song structuring and more. So chances are that if you're doing something related to music, MIDI will be there to help you one way or another.

'But what about the sound?' you may ask. Well, MIDI has no sound at all in its definition. Since it's a messaging system, it can't transmit audio or any audio signals. It's the job of the devices to produce their sound as a reaction to messages. Many people believe that MIDI has sound and typically associate 'the sound of MIDI', to some widely redistributed sound packs. Sound cards for PC had to include some audio samples in the form of sound packs along with MIDI reading to be able to play game music files made with MIDI, and depending on the sound card, the music may sound different.

On the PC side of things, during the 80's, different companies started to produce expansion cards for the early PC. Yamaha that developed the DX7 FM Synthesizer, began developing chips for sound cards that included similar capabilities as the FM synthesizer, able to produce a lot of instrument sounds. This became the famous OPL sound of early games, played from... (you guessed it) MIDI files from the games. Worth noting that the OPL is a full FM synthesizer, with presets defined for the General MIDI instruments, so no audio samples on it. As computers progressed, it became possible to use actual audio recording samples to make the instruments on the General MIDI and sound cards evolved to include that capability with a more realistic sound. When Windows 95 and 98 came along, Microsoft introduced their own sound pack to the operative system, and nowdays, this specific sound pack is regarded as the typical 'midi sound', also known as the Microsoft WaveTable.

MIDI SoundFonts

As its name suggests, a SoundFont is a collection of sounds (audio samples) mapped to known instruments as how would they sound. The MIDI specification also include whats known as General MIDI, and defines a collection of typical instruments that can be implemented on devices. This specification states banks and presets mostly, for devices to implement them. For example, there are presets like Guitar, Acoustic Piano, Violin, Viola, String Ensemble, Electric Bass, and many more. The common bank used mostly has 127 instruments defined including most of the real instruments out there, like wind instruments (Flute, Ocarina, Recorder, etc), string instruments (Guitars, Pianos, etc), electric instruments (Electric Guitar, Electric Piano), synthesisers (Synth Bass, Saw, Square, etc), drumkits and so on.

A SoundFont implements the actual audio for those specified instruments, and changing the SoundFont can alter how everything sounds, it contains the samples that will later be played back when reading MIDI events from a MIDI file.

There are numerous SoundFonts out there, with different sounds and quality. In the early time of computers, size was a luxury, so SoundFonts on that era tend to be of low quality and small to be able to pack them for the slow computers. As time passed, computers got faster and better, allowing for bigger samples and better quality overall. Some studio gear also features SoundFonts with greater quality for creating music like the Roland-MT32 machine.

In this opportunity I want to introduce Rich Nagel's SoundFont called WeedsGM3. I have been using this SoundFont for a long time, it's quite a refreshing sound while not being extremely realistic as other SoundFonts. It covers all the basic instruments defined in the General MIDI specification, and doesn't weight too much. I do enjoy playing MIDI files with it. The common Microsoft WaveTable is not bad in itself, but it's a bit outdated and basic. Instruments like String Ensemble aren't great.

Feel free to download WeedsGM3 from Rich's official site to give it a bit more life to those old MIDI files you might have around.

WeedsGM3 is great. However, there is a very tiny detail in the original version that might sound a bit odd to some peoeple. In the original SoundFont the Hi-Hat in the drumkits do not act like a real Hi-Hat. Now, this is not so much about realism in general, but typically open Hi-Hats get cut when a closed/pedal Hi-Hat is triggered. This does have to do with how Hi-Hats work in a real drum kit, but generally, many SoundFonts, physical instruments and drum machines implemented that little trick for Hi-Hats. 

In addition to the original WeedsGM3, I'm also including an alternative version with the edited Hi-Hats. You can play with both to hear the difference. It's not much, but it's noticeable, specially if the MIDI track has rapid notes on it.

How to use a SoundFont?

In general you will need some dedicated software. A simple way to do it is to use a dedicated MIDI player, such as XM-Play which can not only play MIDI files, but also lets you select SoundFonts to play them.

To configure the SoundFont in XM-Play simply open its settings, and under Input there should be a MIDI plugin option. Open its configuration and you'll have control over how MIDI is played, including the SoundFont you want.

There are many SoundFonts out there made with love by people, so you can search for different sounds. Some of them replicate the sounding of old sound cards even.

There's obviously a lot more going on about MIDI and SoundFonts that isn't covered here, this is just a simple introduction. The actual MIDI 1.0 specification is available to download as well, which can be very useful when trying to make a microcontroller support MIDI.

Links