Jack bindings for Haskell

For rapid prototyping and testing I extended Soehnke Hahns Jack bindings for Haskell to include Jack MIDI.

Here is the sample code for a simple Jack client that reads a MIDI Message from the input port, prints it, and writes it to the output port:

{-# options -O2 #-}
module Main where

import Foreign.C.Types (CFloat)
import qualified Sound.JACK as Jack
import Sound.JACK.Midi

main :: IO ()
main = Jack.mainMidi foo

foo :: (MidiEvent -> IO MidiEvent)
foo e = do
    putStrLn $ show e
    return e
Advertisements

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: