Skip to content

An Elixir application that models the sequencer part of a drum machine.

Notifications You must be signed in to change notification settings

seejohnplay/beat_machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BeatMachine

An Elixir application that models the sequencer part of a drum machine.

Drum samples courtesy of 99sounds.org.

Requirements

Run the tests

> cd beat_machine
> mix test

Usage

To play the demos:

> mix escript.build
> ./beat_machine

To create your own beats in IEX:

> cd beat_machine
> iex -S mix

iex(1)> alias BeatMachine.{Song, Sequencer}
iex(2)> song = Song.new(120, "New Song")
iex(3)> {:ok, song} = Song.add_pattern(song, "kick", [1, 0, 0])
iex(4)> {:ok, song} = Song.add_pattern(song, "snare", [0, 0, 0, 0, 1, 0.2, 0, 0])
iex(5)> {:ok, song} = Song.add_pattern(song, "hihat", [0.2, 0, 1, 0.2, 0.2, 0.2, 1, 0.2])
iex(6)> Sequencer.play(song)

Output example

About

An Elixir application that models the sequencer part of a drum machine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages