Download and Installation

Mac Midi Setup

Mac Midi Setup

Bookmark the permalink.

7 Responses to Mac Midi Setup

  1. Zoe says:

    I get
    *** Exception: PortMidi: toEnum out of bound
    when trying to play a sound. Is this related to the midi setup stage? I’m using Haskell 64-bit for mac. Some people seem to have problem with this setup but someone also commented that everything worked fine for him. Should I try switching to the 32-bit version?

    Thank you.

    • Mark Santolucito says:

      This is an issue with the way we treat the default midi port. On some mac OS it seems to not match our implementation depending on your setup. you can try this approach to get the correct devID, then play using the custom play function. We will push a bug fix (something to this effect) to the hackage release soon.

      > devI = do
      > devs < - getAllDevices
      > let d = fst $ head $ snd (devs)
      > return d

      then to play…

      > playC
      > (defParams {devID=Just (unsafePerformIO devI)})
      > (c 4 qn)

      • Zoe says:

        Where do I type all that? In my file, in ghci interactive mode, or somewhere else? Both seem to give errors

        • Mark Santolucito says:

          Add it to your file. You will need to fix the indentation appropriately for it to compile (wordpress doesn’t seem to support the spacing needed). Also note the > means this is lhs, but either way will work). If you like you can also email me, then I can post complete instructions once we figure it out.

          mark.santolucito @ yale.edu

          • Preston Briggs says:

            I ran into all of Zoe’s problems (same error message, same lack of understanding about where to type the fix). Could you spend a few more words on the subject?

            I was just trying to “run” EuterpeaExamples.lhs and play childSong6 (suggested as a way to verify installation). I guess you want me to edit that file and type in the fix. I can edit the file, but am unsure where I should type your patch. Nor what you mean by “lhs” (left-hand side?).

            Thanks,
            Preston

        • petercai says:

          Hi, I’m using a 64bit mac and came across the same error message at first, but I figured out that it was the midi setup problem. You have to make sure your setting is the same as in the above figure. I also wrote a post about this issue in my blog

Leave a Reply