Skip to content

Demonstrating Elixir code reloading ability (with music events generation)

License

Notifications You must be signed in to change notification settings

thbar/demo-elixir-reloading-music

Repository files navigation

The code in this repository demonstrates how to use Elixir "hot-reloading" feature, together with MIDI events generation.

Youtube link:

Slides:

In short:

  • reloading.exs monitors the file system and hot-reloads music.exs
  • music.exs:
    • relies on GenServer to ensure the "midi player" will keep state between code reloads
    • creates a "tick" every 50 milliseconds
    • uses portmidi to send MIDI events to Renoise

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.exs to play around

About

Demonstrating Elixir code reloading ability (with music events generation)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages