Graphics canvas for live coding
Haskell Vim script GLSL
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Graphics canvas for live coding

Hydra is a program written in Haskell for live coding OpenGL with Lua. The main goal of the project is to create a fast, lightweight "canvas" suitable for for rendering realtime (and eventually fixed media also) visuals, controlled remotely via Lua code. Emphasis is places on ease of use in a live coding environment, and the ability to control multiple instances remotely for use with distributed and/or multi-projection use.

I recommend using cabal-dev to build it currently:

cd /path/to/Hydra
cabal-dev install

Then to run it:


If all goes well, you should see a black 640x480 window in the center of your screen! In order to make it do anything, you need to send it Lua code via OSC. I currently use oscsend from the command line via a vim plugin I wrote (vim-hydra). If you have both that and oscsend installed, you can run the following code in vim:

function draw()

by selecting it (easiest is with <shift>-v) and pressing <leader>h

There is currently no documentation. Some of the functions are defined in the Haskell source, while others are in lib/libHydra.hydra if you are interested.

NOTE: this project is very new and will be in flux for quite a long time. Bear with me...

I have been running into a bug with hslua hsmethod__call function failing, which causes a crash. While you can use the current hackage version (0.4.0), I am building agains a version I've patched to fix this crash.