midi2hydrogen: ready to rock ?


Midi files are good and small but I don’t like their sound…
Hydrogen is powerful and perfect to use as drum machine while playing guitar but I’m too lazy to write down the rhythm of the famous songs that I want to play…

The solution ? midi2hydrogen

It’s a small python script that creates a Hydrogen file from the drum channel of a MIDI file.
It’s designed to work “out of the box” with Hydrogen YamahaVintageKit (I like its sound). You can find it in the Hydrogen website (for free).

Other drumkits are not supported (yet). That means that you’ll find all the patterns messed up (ex. the rhythm of the crash in the row of the snare… and so on).

Download midi2hydrogen

How to use

First of all, you have to install python. Then you can open a terminal and start to use the script.

The syntax to use is:

python midi2hydrogen.py input.mid output.h2song

That’s all.


The Tempo will certain be wrong and notes can be not aligned with Hydrogen’s grid.
It’s very far from layout perfection…

Future plans

I’m preparing a GUI, for the configuration and the file selections.

Thank to

The creator of Python Midi Package

This script is not recomended by any famous rock star. 😛


6 thoughts on “midi2hydrogen: ready to rock ?

  1. Can’t convert midi from here

    $ python midi2hydrogen.py drum_patterns.mid drum_patterns.h2song
    Traceback (most recent call last):
    File “midi2hydrogen.py”, line 152, in
    for battuta in range(event_handler.size()):
    File “midi2hydrogen.py”, line 99, in size
    return self.duration()/self.maxDim + 1
    File “midi2hydrogen.py”, line 102, in duration
    return self.melodia[-1][0]
    IndexError: list index out of range

    Is it a too big midi?

    • Well… I don’t know =D

      That script needs some love.
      It uses a MIDI python library that is buggy.. and the script is buggy itself.
      Maybe in the near future (~1 month) I’ll improve it a bit.
      I’ll send you a mail in that case.

  2. C:\Users\Anwender\midi2hydrogen>python midi2hydrogen.py sting.mid sting.h2song
    Traceback (most recent call last):
    File “midi2hydrogen.py”, line 144, in
    File “C:\Users\Anwender\midi2hydrogen\MidiInFile.py”, line 48, in read
    File “C:\Users\Anwender\midi2hydrogen\MidiFileParser.py”, line 169, in parseMT
    self.parseMTrkChunk() # this is where it’s at!
    File “C:\Users\Anwender\midi2hydrogen\MidiFileParser.py”, line 131, in parseMT
    File “C:\Users\Anwender\midi2hydrogen\EventDispatcher.py”, line 67, in sysex_e
    AttributeError: Transposer instance has no attribute ‘sysex_event’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s