Table of Contents
By using the midi files, firstly converting them into json files to make them readable with lua. Then parsing the music data to play the corresponding notes with luamidi.dll. Then using the flocking simulation, The boids are triggered by the notes.
-
First install LÖVE if you haven't already.
-
Then download luamidi.dll_32 OR luamidi.dll_64 depending on the version of love you downloaded then rename it to
luamidi.dll
and place it in your Love2d folder (typically C:\Program Files\LOVE) . -
Then find a midi song you wish to play. Check bitmidi for free midi files.
Then you'll have to convert it to a json file using this Converter.
I've provided an example song in the repo.
git clone https://github.com/AhmedDawoud3/Love2d-Midi-Visualizer
cd Love2d-Midi-Visualizer/
-
You'll have to provide the json file as a command line argument as following:
love . [The Song File]
love . song.json
Et voilà
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Branch (
git checkout -b NewBranch
) - Commit your Changes (
git commit -m 'new commit'
) - Push to the Branch (
git push origin NewBranch
) - Open a Pull Request
Distributed under the MIT License. See License for more information.
Ahmed Dawoud - @AhmedDawoud314 - adawoud1000@hotmail.com
Project Link: https://github.com/AhmedDawoud3/Love2d-Midi-Visualizer