Skip to content

Instantly share code, notes, and snippets.

@opyate
Created August 20, 2014 22:44
Show Gist options
  • Select an option

  • Save opyate/6076262895924b0d9329 to your computer and use it in GitHub Desktop.

Select an option

Save opyate/6076262895924b0d9329 to your computer and use it in GitHub Desktop.
def command(note) do
"play -qn synth 2 pluck #{note}"
end
def play(note) do
note
|> command
|> (&( String.split(&1, " ") )).()
|> (&( System.cmd( hd(&1), tl(&1) ) )).()
end
def play(note) do
note |> command |> System.cmd
end
@opyate
Copy link
Copy Markdown
Author

opyate commented Aug 20, 2014

From Elixir sips, free episode 62.
The play/1 doesn't work with the MASTER Elixir build anymore at the time of writing this, so I aim to rewrite it in new.ex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment