spell-music / csound-expression

Haskell Framework for Electronic Music
320 stars 31 forks source link

OSX (Mojave): Gui widgets do not appear on window #63

Closed shakfu closed 3 years ago

shakfu commented 3 years ago

Hi,

Incidentally, thanks for creating this fantastic library... made my day to find it just as I was about to learn csound.

As I went through the docs, I discovered strange problem related to widgets not appearing: when I test any of the gui code on csound-expression ver 5.3.4 on OS X Mojave (10.14.6) with ghc v version 8.4.3 I get no errors with compilation and I can run the demo with a window appearing but no widgets showing.

Interestingly, the widget are created and functional (sound is generated when I click on them) but they just don't appear. I can even print the window and they are shown.

Please see the following sequence and attachments for a reproducible demo of the problem:

module Main where

import Csound.Base
import Csound.Sam

a1 = infSig1 $ osc 220
a2 = infSig1 $ osc 330

main = dac $ mul 0.5 $ lift1 (runSam 120) $ sim 4 [("220", a1), ("330", a2)]
$ ghc --make demo.hs
ghc --make demo.hs
[1 of 1] Compiling Main             ( demo.hs, demo.o )
Linking demo ...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
$./demo

see the attached screenshot.jpg for what appears after running the above code screenshot

When I click on parts of the window the sound is generated as expected. Even more strangely, when the window is printed into a pdf the widgets are show in the print out. (see attached)

printout.pdf

anton-k commented 3 years ago

Hi, thanks for feedback!

Unfortunately UI does not work for OSX. It's Csound problem. See this issue for more details. https://github.com/spell-music/csound-expression/issues/62

anton-k commented 3 years ago

I can not fix it on Haskell level.

shakfu commented 3 years ago

Ok no problem. Thanks