Elm Tracker - amiga mod files player prototype

I’d like to announce a little recreational project. Elm tracker is a simple amiga module format player in Elm. Only several audio effects are supported. I recommend to toggle playing off if you want to switch to another tracks. (have some bugs here)

The main goals here were 1. learn some web audio. 2. work with elm/bytes and binary data. 3. have some fun.

Live demo - https://elm-tracker.netlify.com/

Source code - https://github.com/catz/elm-tracker

The project is based on the following components:

  1. Slightly changed elm-webaudio. https://github.com/aratama/elm-webaudio Changes related to passing samples data directly from elm.
  2. elm/bytes for binary parsing

Some highlights that can be interesting to elm community.

Use pipelines to build binary Decoders in Elm.

Example:

decoder : Bytes.Decoder ProTracker
decoder =
    Pipeline.decode ProTracker
        |> Pipeline.required decoderTitle
        |> Pipeline.required decoderInstruments
        |> Pipeline.hardcoded []
        |> Pipeline.required Bytes.unsignedInt8
        |> Pipeline.required Bytes.unsignedInt8
        |> Pipeline.required (decoderPatternTable 128)
        |> Pipeline.required decoderSignature
        |> Pipeline.hardcoded []
        |> Bytes.andThen decoderPatterns
        |> Bytes.andThen decoderSamples 

Tested on

  • Desktop Mac Chrome

  • Desktop Mac Firefox

FYI Not working in Safari

Not tested on mobile devices.

Local start

This project is bootstrapped with Create Elm App.

Due to “Map.!: given key is not an element in the map” bugs in 0.19 we need to turn off time-travel debugger.

Seems fixed in 0.19.1

ELM_DEBUGGER=false elm-app start

Useful links

10 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.