spell-music / csound-expression

Haskell Framework for Electronic Music
320 stars 31 forks source link

Virtual midi controller and keyboard from tutorial examples are not working on macOs? #62

Closed martyall closed 3 years ago

martyall commented 3 years ago

In following the tutorial there are times when you are using a virtual keyboard or midi controller for input. On macOs I have used the installer available from the latest version of csound 16.5.0 but whenever I run examples in ghci I get a blank window like

Screen Shot 2021-01-24 at 11 08 19 AM

However, if you just randomly click around in this blank window, you can discover that the keys or sliders are actually working, in the sense that you can still create or manipulate sound. As far as I can tell, the appropriate flags are being set:

...
Creating score
rtaudio: PortAudio module enabled ...
using callback interface
rtmidi: PortMIDI module enabled
...

I wonder if it has something to do with the release note:

Starting from this release, no third-party graphic frontends are shipped with the installation packages on MacOs and Windows.

Does anyone else have this problem or a solution for it?

anton-k commented 3 years ago

Unfortunately it seems to be a problem with FLTK on MacOS, FLTK is used as default lib to render UIs in Csound and it seems to be broken on Mac.

this is related: https://github.com/csound/csound/issues/1325

anton-k commented 3 years ago

I can not fix it on Haskell level

anton-k commented 3 years ago

Thanks for bringing this up. I should mention it in the docs. I can not test the code on mac.

martyall commented 3 years ago

thanks for looking into it!