demo-elixir-reloading-music
demo-elixir-reloading-music copied to clipboard
Demonstrating Elixir code reloading ability (with music events generation)
The code in this repository demonstrates how to use Elixir "hot-reloading" feature, together with MIDI events generation.
Youtube link:
- https://www.youtube.com/watch?v=_VgcUatTilU&feature=youtu.be&t=2m2s
Slides:
- https://speakerdeck.com/thbar/elixir-hot-reloading-and-midi-events-generation
In short:
reloading.exsmonitors the file system and hot-reloadsmusic.exsmusic.exs:- relies on
GenServerto ensure the "midi player" will keep state between code reloads - creates a "tick" every 50 milliseconds
- uses
portmidito send MIDI events to Renoise
- relies on
How to use?
- Install Renoise demo and load
Song.xrns - Run the code:
brew install portmidi
mix deps.get
mix run --no-halt reloading.exs
- Edit
music.exsto play around