diff --git a/README.md b/README.md index cc99741..947abe2 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,17 @@ On OSX: brew install fluidsynth ``` +Clone this repo or put the [Hex dependency](https://hex.pm/packages/midi_player) in your mix.exs: + +```elixir +{:midi_player, "~> 0.1.0"} +``` + ## Examples +MIDIPlayer takes "events" which for example represent to play a note for a time span. +It then converts these events to MIDI commands and schedules them. + First, let's create some events. This plays a piano sound for the C note for 1 second: diff --git a/lib/midi_player/event.ex b/lib/midi_player/event.ex index 8cfe601..aaa765d 100644 --- a/lib/midi_player/event.ex +++ b/lib/midi_player/event.ex @@ -1,6 +1,7 @@ defmodule MIDIPlayer.Event do @moduledoc """ Several musical events which can be converted to MIDI commands. + All timings are in milliseconds. """ diff --git a/mix.exs b/mix.exs index a4aa8c5..d1774ef 100644 --- a/mix.exs +++ b/mix.exs @@ -14,8 +14,13 @@ defmodule MIDIPlayer.MixProject do source_url: "https://github.com/pizzapim/midi_player", homepage_url: "https://github.com/pizzapim/midi_player", docs: [ - main: "MIDIPlayer" - ] + extras: ["README.md"], + main: "readme" + ], + + # Hex stuff + description: description(), + package: package() ] end @@ -25,6 +30,21 @@ defmodule MIDIPlayer.MixProject do ] end + defp description do + """ + A MIDI player for Elixir. + MIDIPlayer takes musical "events" like playing a note, converts them to MIDI commands, schedules them and then lets you play them. + """ + end + + defp package do + [ + name: "midi_player", + licenses: ["GPL-3.0-or-later"], + links: %{"GitHub" => "https://github.com/pizzapim/midi_player"} + ] + end + defp deps do [ {:midi_synth, "~> 0.4.0"},