DSL that implements the music patterns and functions to make it easy to write music and parse its structures to send to browser.
Intrument type
Music action
Music pattern
Song type
Track type
List TrackObject
Song data to send to JS
{ songName : SongName
, song : Song
}
Song identifier type
String
Song name type
{ instrument : Basics.Int
, actions : List String
}
Track data to send to JS
Msg type
{ songs : List SongIdentifier
, currentSong : SongName
}
Model type
init : List SongIdentifier -> ( Model, Platform.Cmd.Cmd Msg )
Init program with a list of song identifiers
update : Msg -> Model -> (SongData -> Platform.Cmd.Cmd Msg) -> ( Model, Platform.Cmd.Cmd Msg )
Update program
repeat : Basics.Int -> List MAction -> List MAction
Repeat action lists