Enter username and password to continue.

midiHogg

A browser-based MIDI file parser and OGG audio generator

This new toy has caused me quite a bit of work and - as is necessarily the case with MIDI - quite a bit of frustration. Although I first developed it a few years back, I revised the code (all Javascript) extensively in the past few months.

midiHogg parses binary MIDI files to extract valuable information and make that available to Javascript to accomplish three things:

  • It transforms the data to generate OGG audio format files that are compatible with the HTML5 audio players.

    MIDI is like tablature: it tells you what to do to produce music but it does not do it for you! Generating actual sound from a MIDI file is a fairly complicated process that involves samples of instruments and dedicated software that can interpret the MIDI instructions to convert them into an audio stream. That audio stream in turn is interpreted by an HTML enabled player.

    midiHogg takes care of all that for you so your browser can happily play the music ... as long as you are not using Microsoft Explorer, that does not support the OGG audio format for some unfathomable reason.

    If your browser supports OGG audio, you can save the audio stream simply by right=clicking on the player for further use if you wish. This can be useful for practice, for instance, or to ply duets if you have not found another lutenist on the lutenists map of the world.

  • It generates a score

    midiHogg has an auto-score feature that seeks to convert the MIDI stream into a readable score in regular notation. This can be more or less successful depending on the MIDI source. Also, the browser-based interpreter I use (vexflow) has its own limitations that can be frustrating. All in all, it can still give you an idea of what the score might look like and if it does not do any good, it does not do any bad either.

    The vexflow interpreter generates an image in png format that you can save as is.

  • It allows for some editing features

    midiHogg allows for some manipulation of both the MIDI data and the generated score. The MIDI data is parsed into tracks, further parsed into channels, that usually corresponds to a specific instrument : piano, guitar, voice, etc. Editing in midiHogg is done at the channel level.

    You can edit a channel's patch (instrument), modify the tempo map, modify the average velocity, panning, volume, and other MIDI specific elements. You can save the modified MIDI data if you want.

    At the score level, you can modify or add a time signature, a key signature, modify the density (number of chords per staff), and select a zooming resolution for the generated image. This can be very useful if you want to insert an image for a bit of score directly into an HTML file.

A free account on the site is needed to access midiHogg.

Click here to view a sample of a saved midiHogg generated file, complete with score rendition and audio rendition for the MIDI file and each individual channel.

I also added a tool to automatically convert notation to tablature for a small number of instruments: guitar, lutes, mandolin, banjo. Here is an example using a Renaissance lute tuning.