Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. trying to include RtMidi
Forum Updated to NodeBB v4.3 + New Features

trying to include RtMidi

Scheduled Pinned Locked Moved Solved Installation and Deployment
9 Posts 3 Posters 677 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    herrgross
    wrote on last edited by
    #1

    Hello everybody,

    I'm working with QT Creator on MacOsX.
    I am trying to use some MIDI - Input in a project, so I found the RtMidi class.
    First I am trying to do a little test project to see how (and if) it works.
    Having copied the RtMidi.cpp and the RtMidi.h into my projectfolder I included them into my project.
    Running a little bit of testcode I get the message:
    " RtMidiOut: no compiled API support found"
    I think that the CoreMIDI, CoreAudio and CoreFoundation are not correctly linked (sorry, but I do, as quite a beginner, not even know what this exactly means...)
    On the RtMidi Tutorialpage (https://www.music.mcgill.ca/~gary/rtmidi/) it says:
    "In order to compile RtMidi for a specific OS and API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement:"
    with the given example:
    "g++ -Wall -D__MACOSX_CORE__ -o midiprobe midiprobe.cpp RtMidi.cpp -framework CoreMIDI -framework CoreAudio -framework CoreFoundation"
    Where and how should I include that to my project?
    Any help appreciated,
    thanks,
    Michael

    M 1 Reply Last reply
    0
    • H Offline
      H Offline
      herrgross
      wrote on last edited by herrgross
      #7

      Solution found:
      in .pro file add:

      LIBS += -framework CoreFoundation
      LIBS += -framework CoreMIDI
      LIBS += -framework CoreAudio
      

      in RtMidi.h add:

      #define __MACOSX_CORE__
      

      that's it...
      Thanks for helping
      Michael

      1 Reply Last reply
      0
      • H herrgross

        Hello everybody,

        I'm working with QT Creator on MacOsX.
        I am trying to use some MIDI - Input in a project, so I found the RtMidi class.
        First I am trying to do a little test project to see how (and if) it works.
        Having copied the RtMidi.cpp and the RtMidi.h into my projectfolder I included them into my project.
        Running a little bit of testcode I get the message:
        " RtMidiOut: no compiled API support found"
        I think that the CoreMIDI, CoreAudio and CoreFoundation are not correctly linked (sorry, but I do, as quite a beginner, not even know what this exactly means...)
        On the RtMidi Tutorialpage (https://www.music.mcgill.ca/~gary/rtmidi/) it says:
        "In order to compile RtMidi for a specific OS and API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement:"
        with the given example:
        "g++ -Wall -D__MACOSX_CORE__ -o midiprobe midiprobe.cpp RtMidi.cpp -framework CoreMIDI -framework CoreAudio -framework CoreFoundation"
        Where and how should I include that to my project?
        Any help appreciated,
        thanks,
        Michael

        M Offline
        M Offline
        mpergand
        wrote on last edited by
        #2

        @herrgross

        For qmake I do:
        LIBS += -framework CoreMidi

        H 1 Reply Last reply
        0
        • M mpergand

          @herrgross

          For qmake I do:
          LIBS += -framework CoreMidi

          H Offline
          H Offline
          herrgross
          wrote on last edited by
          #3

          @mpergand that's what I tried in my project file:
          LIBS += -framework CoreFoundation
          LIBS += -framework CoreMIDI
          LIBS += -framework CoreAudio

          but it does not work...

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mpergand
            wrote on last edited by
            #4

            I don't use rtmidi but to me
            " RtMidiOut: no compiled API support found"
            looks like a bug with rtmidi

            H 1 Reply Last reply
            0
            • M mpergand

              I don't use rtmidi but to me
              " RtMidiOut: no compiled API support found"
              looks like a bug with rtmidi

              H Offline
              H Offline
              herrgross
              wrote on last edited by
              #5

              @mpergand what do you use for midi? can you recommand something?

              M 1 Reply Last reply
              0
              • H herrgross

                @mpergand what do you use for midi? can you recommand something?

                M Offline
                M Offline
                mpergand
                wrote on last edited by mpergand
                #6

                @herrgross said in trying to include RtMidi:

                @mpergand what do you use for midi?

                I use my own set of classes.

                Maybe the issue is specific to your mac config (arm proc ?)
                You have to seach the internet to see if others have the same issue as you.

                can you recommand something?

                maybe PortMidi ?
                but know nothing about it.

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  herrgross
                  wrote on last edited by herrgross
                  #7

                  Solution found:
                  in .pro file add:

                  LIBS += -framework CoreFoundation
                  LIBS += -framework CoreMIDI
                  LIBS += -framework CoreAudio
                  

                  in RtMidi.h add:

                  #define __MACOSX_CORE__
                  

                  that's it...
                  Thanks for helping
                  Michael

                  1 Reply Last reply
                  0
                  • H herrgross has marked this topic as solved on
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    Hi,

                    Rather than modifying the header, you can add the define in your project file:

                    DEFINES += __MACOSX_CORE__
                    

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    H 1 Reply Last reply
                    1
                    • SGaistS SGaist

                      Hi,

                      Rather than modifying the header, you can add the define in your project file:

                      DEFINES += __MACOSX_CORE__
                      
                      H Offline
                      H Offline
                      herrgross
                      wrote on last edited by
                      #9

                      @SGaist ahja... thanks, done!

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved