Skip to content
Hiding information inside a MIDI file
Branch: master
Clone or download
Latest commit ee7bba0 May 7, 2018


Type Name Latest commit message Commit time
Failed to load latest commit information.


Python, for all its amazing ability out of the box, does not provide you with an easy means to hide information in MIDI files. This is an attempt to do just that.

There are multiple ways to hide information in a MIDI file so that it is not noticeable to the human ear.

Both modules make use of the python-midi libraries located here:


  • A module to hide information
  • A module to reveal hidden information

Run it

The code is written in Python 2.7. You must have Python 2.x installed in your machine or in a conda environment. You could also use a virtual environment. That is up to you.

As said before, you must install in your environment They have instructions for that on their repo.

After everything is set up, to run it you need to be in the same directory as Then you should place two different files in that same directory

  1. A cool MIDI file. I have already added a cool one for you to play with: avicii.mid. You can find more cool files here:

  2. A file containing the message you want to hide in a MIDI dile. I have also added one for you: hola

To run it you just need to enter into the terminal:

python -hide avicii.mid hola

This command will generate a file called secret_in_avicii.mid. Every file you generate using the -hide flag will create a new file containing the hidden information with the name: secret_in_oldFileName.mid

Now, to reveal the hidden information you just need to change the flag to: -reveal:

python -reveal secret_in_avicii.mid

This command will generate a file containing the secret message named hidden_message_in_secret_in_avicii.

You can’t perform that action at this time.