- Home /
Spawn objects with MIDI file
I'm trying to spawn objects based on the notes in a MIDI file. I've looked through various libraries and asset packs and am still hopelessly confused. I'm looking to parse a MIDI file for the timing of note events so that I can spawn objects in-time with the music. It would be an added bonus to know the pitch of each note.
Any help would be really really appreciated and I promise my grandchildren will sing songs of your generosity ;)
Answer by tbriz · Jun 05, 2020 at 01:45 AM
Hi @gutsmang
This is a pretty broad question, but I have been working on a similar type of situation recently and I could point you in the right direction.
Where I am at now took many hours of research, but here is some helpful info and links to get you started if you are still looking for this information:
GitHub link to a set of very helpful midi libraries that do what you need: https://github.com/melanchall/drywetmidi
Also, this specific thread helped me figure out how to get the midi notes "drawn" to the screen in a very basic way in the style of a midi piano roll: https://github.com/melanchall/drywetmidi/issues/79
Dig into those for a while and you can accomplish what you are looking for. Good luck!
Your answer
![](https://koobas.hobune.stream/wayback/20220612222738im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rhythm Game - Using Midi Notes to trigger a coloured note on screen. 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
GameObjects not syncing with music 1 Answer
LineRenderer static movement 1 Answer