MIDI file analyzer

Count the number of notes, tracks and other MIDI file data

Analysis results

Tracks

All notes

Upload .mid/.midi file
Processing ...

About

This service

This service allows you to analyze MIDI files.

I've created it in a few evenings to count the number of notes in Black MIDI files that usually have a tenth of thousands of notes. And only after the project was finished, I've realized that some Black MIDI files may be in terabytes of size. But my server can handle only up to 8Mb file size. But hey, I've got what I've needed. So I leave it online. Maybe it'll become useful for someone else.

I've also added some other statistics. Like MIDI file notes range, time signature, tempo and tracks information. Service displays it if possible.

If you have any thoughts you'd like to share, found any bugs or would like to see any additional features, feel free to contact me at streamdevprojects@gmail.com.

Let's Get Started!

API

Programmatic access to MIDI analysis

This API provides the same functionality as the web interface but is easier to use with programming languages.

Maka a requests

To analyze your MIDI file, follow these simple steps:

  1. Send an HTTP POST request to this URL: https://streamdevprojects.com/midi/api/v1/analyze.
  2. Ensure the file is attached using the "multipart/form-data" format (in line with RFC 2388 standards).
  3. Remember to authorize your request by including your API key in the request header as X-API-KEY. If you don’t have an API key yet, you can easily obtain one for free here.
Review the response

The response is returned in JSON format and includes a boolean success element, which indicates whether the request was successful. The analysis results are contained within the midi element. This element is an object that provides general file information, along with a list of tracks and notes.

On the right Below, you’ll find an example of a simple request and response. Use this as a guide for making your own API calls. If you have any questions or feature requests, please feel free to email me.

Get API key

Request sample cURL
curl https://streamdevprojects.com/midi/api/v1/analyze \
-X POST \
-H "Content-Type: multipart/form-data" \
-H "X-API-KEY: <your_api_key>" \
-F file=@<file_path>
Response sample JSON
{
"success": true,
"midi": {
"general": {
"notesCount": 110,
"notesRange": {
"minNum": 41,
"maxNum": 81,
"minTxt": "F3",
"maxTxt": "A6"
},
"timeSign": "4/4",
"bpm": 112
},
"tracks": [
{
"notesCount": 66,
"notesRange": {
"minNum": 55,
"maxNum": 81,
"minTxt": "G4",
"maxTxt": "A6"
},
"notesStats": [
{
"num": 55,
"txt": "G4",
"count": 7
},
{
"num": 57,
"txt": "A4",
"count": 6
},
...
]
},
{
"notesCount": 44,
"notesRange": {
"minNum": 41,
"maxNum": 48,
"minTxt": "F3",
"maxTxt": "C4"
},
"notesStats": [
{
"num": 41,
"txt": "F3",
"count": 4
},
{
"num": 43,
"txt": "G3",
"count": 8
},
...
]
}
],
"notes": [
{
"num": 41,
"txt": "F3",
"count": 4
},
{
"num": 43,
"txt": "G3",
"count": 8
},
...
]
}
}