On Fri, 22 May 2015, Miguel Negrão wrote:
> On 22-05-2015 12:01, Henning Thielemann wrote: >> >> On Fri, 22 May 2015, Miguel Negrão wrote: >> >>> Does anyone have some example code of how to use alsa-seq to get midi events >>> from a midi controller. >> >> This should help: >> https://hackage.haskell.org/package/alsa-seq-0.6.0.5/src/examples/dump.hs >> > > Running the code in that file doesn't produce any output after "waiting > for an event:" when I move the sliders. I have the controller connected > and it appears in the list-ports.hs example. I'm I supposed to change > something in the code to point to the port of my controller ? Have you connected the controller to the dump example using 'aconnect' or 'patchage' or the like? E.g. I have to run: $ aconnect 'SAMSON Graphite 49' Haskell-Dump > Is portmidi perhaps easier to use ? I did get that working, but it > doesn't seem to have any callback interface, it seems I have to poll it, > and it is a bit low level too. I have no experience with PortMidi. JACK and the Haskell jack package are an alternative. > It would be nice to have higher level MIDI device layer similar to > SuperCollider. There is the midi-alsa package that maps alsa-seq events to events from the 'midi' package. Do you consider this higher level? There is also the reactive-balsa package that provides functional reactive programming of ALSA via tha reactive-banana framework. -- Read the whole topic here: Haskell Art: http://lurk.org/r/topic/KNUwMta2GVsvncKbRnTBz To leave Haskell Art, email haskell-...@group.lurk.org with the following email subject: unsubscribe