Git Product home page Git Product logo

qmidi's Introduction

QMidi

Description

QMidi is a Qt library which wraps rtMidi library and allows you to communicate with midi devices. This is a work in progress and not very stable. Some features are still missing.

Build status

Build Status

Dependencies

Credits

Go mostly to Dan Wilcox for his great openFrameworks ofxMidi addon.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

qmidi's People

Contributors

thomasgeissl avatar rsp4jack avatar yohannlyd avatar cdwijs avatar

Stargazers

Vasiliy Bukharev avatar ck15803 avatar 0xCalcifer avatar Hristo Konstantinov avatar  avatar  avatar Michaël Creusy avatar mmjvox avatar Faiz avatar  avatar AlexTimmi avatar  avatar  avatar Jesse Talavera avatar  avatar  avatar

Watchers

 avatar  avatar  avatar Michaël Creusy avatar  avatar  avatar

qmidi's Issues

SEG FAULT in Windows 10 in the MidiIn callback (Only in Release)

Hi, first off, thanks for this awesome library.
I had a hard time looking for the problem, because it was only occuring in Windows and in Release mode.

It was solved adding the return to the clear method of the MidiMessage class.

QMidiMessage *QMidiMessage::clear() { _status = MIDI_UNKNOWN; _channel = 1; _pitch = 0; _velocity = 0; _control = 0; _value = 0; _deltaTime = 0; _sysExData.clear(); _rawMessage.clear(); return this; }

So weird :D

Let me know if you're up for doing more stuff with this library! my email manuwind5 at gmail dot com

front() called on empty vector

When using the example application, with "Forward Messages"
stacktrace:

1   VCrtDbgReportA                               ucrtbased                           0x7ff9fa615a52 
2   CrtDbgReport                                 ucrtbased                           0x7ff9fa6152b0 
3   std::vector<unsigned char>::front            vector                         1603 0x7ff70672ce7c 
4   QMidiOut::sendMessage                        qmidiout.cpp                   54   0x7ff70672c8f2 
5   MainWindow::onMidiMessageReceive             mainwindow.cpp                 109  0x7ff706715453 
6   MainWindow::qt_static_metacall               moc_mainwindow.cpp             93   0x7ff706730bc7 
7   QMetaCallEvent::placeMetaCall                qobject.cpp                    634  0x7ff9edefee2a 
8   QObject::event                               qobject.cpp                    1365 0x7ff9edef4724 
9   QWidget::event                               qwidget.cpp                    9126 0x7ff9eec4bcd3 
10  QMainWindow::event                           qmainwindow.cpp                1340 0x7ff9eef7be34 
11  QApplicationPrivate::notify_helper           qapplication.cpp               3401 0x7ff9eeb67e0f 
12  QApplication::notify                         qapplication.cpp               3351 0x7ff9eeb64efc 
13  QCoreApplication::notifyInternal2            qcoreapplication.cpp           1063 0x7ff9ede1aaf5 
14  QCoreApplication::sendEvent                  qcoreapplication.cpp           1472 0x7ff9ede181e3 
15  QCoreApplicationPrivate::sendPostedEvents    qcoreapplication.cpp           1830 0x7ff9ede1cf7d 
16  QEventDispatcherWin32::sendPostedEvents      qeventdispatcher_win.cpp       904  0x7ff9ee258be3 
17  QWindowsGuiEventDispatcher::sendPostedEvents qwindowsguieventdispatcher.cpp 80   0x7ff9f04ef379 
18  qt_internal_proc                             qeventdispatcher_win.cpp       228  0x7ff9ee256b09 
19  CallWindowProcW                              USER32                              0x7ffa80ece7e8 
20  DispatchMessageW                             USER32                              0x7ffa80ece229 
...<More>

Test Midi:
testmidi.mid.gz

Compile error

Hello,
i tried to compile this package using qt5:
qmake -project which created QMidi.pro file.
edited QMidi.pro file by adding
QT += gui core widgets
and appending
./libs/rtmidi/ to INCLUDEPATH += . line.
When i run make
i got output which i put to pastebin link.

http://pastebin.com/PPYf2ETg

Compile failure on windows

I have opened example.pro, configure, and start debug. Then I get the following compile errors:
g++ -Wl,-subsystem,windows -mthreads -o debug\example.exe object_script.example.Debug -lmingw32 -LC:\Qt\5.10.1\mingw53_32\lib C:\Qt\5.10.1\mingw53_32\lib\libqtmaind.a -LC:\utils\my_sql\my_sql\lib -LC:\utils\postgresql\pgsql\lib -lshell32 C:\Qt\5.10.1\mingw53_32\lib\libQt5Widgetsd.a C:\Qt\5.10.1\mingw53_32\lib\libQt5Guid.a C:\Qt\5.10.1\mingw53_32\lib\libQt5Cored.a ./debug\RtMidi.o: In functionmidiInputCallback':
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:1984: undefined reference to _imp__midiInAddBuffer@12' ./debug\RtMidi.o: In function ZN11MidiInWinMM10initializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE':
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2035: undefined reference to _imp__midiInGetNumDevs@0' ./debug\RtMidi.o: In function ZN11MidiInWinMM8openPortEjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE':
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2061: undefined reference to _imp__midiInGetNumDevs@0' C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2081: undefined reference to _imp__midiInOpen@20'
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2096: undefined reference to _imp__midiInPrepareHeader@12' C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2098: undefined reference to _imp__midiInClose@4'
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2105: undefined reference to _imp__midiInAddBuffer@12' C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2107: undefined reference to _imp__midiInClose@4'
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2114: undefined reference to _imp__midiInStart@4' C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2116: undefined reference to _imp__midiInClose@4'
./debug\RtMidi.o: In function ZN11MidiInWinMM9closePortEv': C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2137: undefined reference to _imp__midiInReset@4'
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2138: undefined reference to _imp__midiInStop@4' C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2141: undefined reference to _imp__midiInUnprepareHeader@12'
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2145: undefined reference to _imp__midiInClose@4' C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2152: undefined reference to _imp__midiInClose@4'
./debug\RtMidi.o: In function ZN11MidiInWinMM12getPortCountEv': C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2160: undefined reference to _imp__midiInGetNumDevs@0'
./debug\RtMidi.o: In function ZN11MidiInWinMM11getPortNameB5cxx11Ej': C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2166: undefined reference to _imp__midiInGetNumDevs@0'
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2176: undefined reference to _imp__midiInGetDevCapsW@12' ./debug\RtMidi.o: In function ZN12MidiOutWinMM10initializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE':
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2221: undefined reference to _imp__midiOutGetNumDevs@0' ./debug\RtMidi.o: In function ZN12MidiOutWinMM12getPortCountEv':
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2234: undefined reference to _imp__midiOutGetNumDevs@0' ./debug\RtMidi.o: In function ZN12MidiOutWinMM11getPortNameB5cxx11Ej':
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2240: undefined reference to _imp__midiOutGetNumDevs@0' C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2250: undefined reference to _imp__midiOutGetDevCapsW@12'
./debug\RtMidi.o: In function ZN12MidiOutWinMM8openPortEjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE': C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2279: undefined reference to _imp__midiOutGetNumDevs@0'
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2299: undefined reference to _imp__midiOutOpen@20' ./debug\RtMidi.o: In function ZN12MidiOutWinMM9closePortEv':
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2313: undefined reference to _imp__midiOutReset@4' C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2314: undefined reference to _imp__midiOutClose@4'
./debug\RtMidi.o: In function ZN12MidiOutWinMM11sendMessageEPSt6vectorIhSaIhEE': C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2357: undefined reference to _imp__midiOutPrepareHeader@12'
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2366: undefined reference to _imp__midiOutLongMsg@12' C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2375: undefined reference to _imp__midiOutUnprepareHeader@12'
C:\Users\crldewijs\Desktop\git\QMidi-ori\examples\build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug/../../libs/rtmidi/RtMidi.cpp:2396: undefined reference to `_imp__midiOutShortMsg@8'
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [debug\example.exe] Error 1
mingw32-make: *** [debug] Error 2

Makefile.Debug:107: recipe for target 'debug\example.exe' failed
mingw32-make[1]: Leaving directory 'C:/Users/crldewijs/Desktop/git/QMidi-ori/examples/build-example-Desktop_Qt_5_10_1_MinGW_32bit-Debug'
Makefile:36: recipe for target 'debug' failed
11:29:20: The process "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project example (kit: Desktop Qt 5.10.1 MinGW 32bit)
When executing step "Make"
11:29:20: Elapsed time: 00:28.
`
I run windows 7, Qt 5.10.1, and mingw53_32.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.