Algorithmic automation for various DAWs

Latest on Hackage:0.2.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

GPL-3.0-only licensed and maintained by Mark Karpov


License GPL 3 Hackage Build Status

How to algorithmically control every aspect of music using familiar, robust tools: plugins, DAWs, etc. that have not been built with this in mind? I’ve partially solved the problem in MIDA — program that generates MIDI files using simple, symmetric, declarative language. However, even though MIDA is a fine tool to create scores, it’s not sufficient if you want to control everything. Initially I thought I could find some plugins that can algorithmically control other plugins, but there are no decent tools of this sort. How automation is handled in a traditional DAW? Well, you draw it in a separate track. Wouldn’t it be a good idea to algorithmically perform exactly that — drawing of the automation track? This is simpler than it may seem: many DAWs allow to export tracks in XML format, and this is all we need to start our hacking.

How does it work?

You export your tracks in XML format, write some scripts in MIDA-like language and patch the XML file. Then you can import the files back, they will (hopefully) have fancy automation tracks in place.


  1. Install the Haskell Tool Stack.

  2. Add ~/.local/bin directory to your PATH, like this:

    # in .bashrc or similar
    export PATH=$HOME/.local/bin:$PATH
  3. Clone the repo, cd into it, and let stack do its thing:

    $ git clone
    $ cd mida
    $ stack build --copy-bins
  4. Check it out:

    $ alga --version
    ALGA 0.2.0


ALGA is a simple declarative language. Just to get feeling of it:

# Example of ALGA program

my_track.pan  = {0..16} / 16 $ [{2}]
my_track.pand = 1/8, 0

This thing changes position of stereo-panorama for track named my_track. There are 16 possible values from left to right. Panorama is changed instantly, every eighth note.

You can control volume, panorama, mute, input gain, all parameters of send slots, insertion slots, and software synths. Changes can be applied to audio tracks, group tracks, instrument tracks, and effect tracks.

See ALGA Manual for more information.


Copyright © 2015–2016 Mark Karpov

Distributed under GNU GPL, version 3.


ALGA 0.2.2

  • Refactoring, switch to Hspec for testing and Megaparsec 5.

ALGA 0.2.1

  • Fixed issues with directory package. Please use directory- or newer. stack.yaml file is updated accordingly, if you clone the repository.

ALGA 0.2.0

  • Use the path-io library.

  • Use YAML files for configuration.

  • Fixed bug with “unsupported protocol in URI” on Windows.

  • Cosmetic changes in the interface.

ALGA 0.1.0

  • Initial release.
comments powered byDisqus