trying to include RtMidi
-
wrote on 12 Jun 2024, 08:20 last edited by
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 -
wrote on 12 Jun 2024, 18:20 last edited by herrgross 6 Dec 2024, 18:21
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 -
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,
Michaelwrote on 12 Jun 2024, 09:10 last edited byFor qmake I do:
LIBS += -framework CoreMidi -
For qmake I do:
LIBS += -framework CoreMidi -
wrote on 12 Jun 2024, 09:43 last edited by
I don't use rtmidi but to me
" RtMidiOut: no compiled API support found"
looks like a bug with rtmidi -
I don't use rtmidi but to me
" RtMidiOut: no compiled API support found"
looks like a bug with rtmidi -
wrote on 12 Jun 2024, 11:30 last edited by mpergand 6 Dec 2024, 11:31
@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. -
wrote on 12 Jun 2024, 18:20 last edited by herrgross 6 Dec 2024, 18:21
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 -
-
Hi,
Rather than modifying the header, you can add the define in your project file:
DEFINES += __MACOSX_CORE__
-
Hi,
Rather than modifying the header, you can add the define in your project file:
DEFINES += __MACOSX_CORE__
1/9