Friday, February 7, 2020

Beautiful Music With MIDI

Introduction


I'm a sucker for retro games (especially retro arcade games like those available via MAME). In particular, I like that old-school arcade theme music. Fortunately, there is a ton of this old-school arcade music on various websites. Unfortunately, a lot of this music is in the MIDI format.

MIDI


The Musical Instrument Digital Interface (or "MIDI") is a "technical standard for a communications protocol." But for our purposes, we are interested only in its ability to represent music in very small files (compared to MP3, WAV, etc.).

Playing Music With C#


I decided to see how difficult it would be to play MIDI music via C#. Short answer: It's not too bad!

I started with an article titled Making Music with MIDI and C#. From this article, I created some sample C# code that you can find on my "Misc-csharp" public GitHub repo in the "MidiSample" folder:
https://github.com/mdhatmaker/Misc-csharp

Playing Music With Python


Starting with an article titled Embed and Play Midi Music in your Code (Python), I created sample python code that you can find on my "Misc-python" public GitHub repo in the "Audio" folder:
https://github.com/mdhatmaker/Misc-python

I also added some sample ".mid" files to the "data/midi" folder.

Conclusion


Playing MIDI music from C# is pretty simple.

I'd like to add to the MidiApp project the ability download ".mid" files directly from the Video Game Music Archive website.


1 comment:

  1. Best No Deposit Bonus Codes in India - Herzamanindir.com
    5 바카라 사이트 steps1.Visit the kadangpintar official website of No Deposit India.
    Benefits of using a no deposit bonus.
    Benefits of using a no deposit bonus.
    Benefits of using 토토 사이트 a no deposit bonus.
    Online Sincere Accessory domain https://septcasino.com/review/merit-casino/ www.online-bookmakers.info

    ReplyDelete