rtmidi | common API for realtime MIDI input | Audio Utils library

 by   thestk C++ Version: 5.0.0 License: Non-SPDX

kandi X-RAY | rtmidi Summary

kandi X-RAY | rtmidi Summary

rtmidi is a C++ library typically used in Audio, Audio Utils applications. rtmidi has no bugs, it has no vulnerabilities and it has medium support. However rtmidi has a Non-SPDX License. You can download it from GitHub.

RtMidi is a set of C++ classes (RtMidiIn, RtMidiOut, and API specific classes) that provide a common API (Application Programming Interface) for realtime MIDI input/output across Linux (ALSA, JACK), Macintosh OS X (CoreMIDI, JACK), and Windows (Multimedia Library) operating systems. RtMidi significantly simplifies the process of interacting with computer MIDI hardware and software. It was designed with the following goals:. MIDI input and output functionality are separated into two classes, RtMidiIn and RtMidiOut. Each class instance supports only a single MIDI connection. RtMidi does not provide timing functionality (i.e., output messages are sent immediately). Input messages are timestamped with delta times in seconds (via a double floating point type). MIDI data is passed to the user as raw bytes using an std::vector.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              rtmidi has a medium active ecosystem.
              It has 806 star(s) with 232 fork(s). There are 56 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 45 open issues and 110 have been closed. On average issues are closed in 204 days. There are 18 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of rtmidi is 5.0.0

            kandi-Quality Quality

              rtmidi has no bugs reported.

            kandi-Security Security

              rtmidi has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              rtmidi has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              rtmidi releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rtmidi
            Get all kandi verified functions for this library.

            rtmidi Key Features

            No Key Features are available at this moment for rtmidi.

            rtmidi Examples and Code Snippets

            No Code Snippets are available at this moment for rtmidi.

            Community Discussions

            QUESTION

            How to compile RtMidi API properly on Windows
            Asked 2020-Dec-25 at 19:19

            I’m using C++ on visual studio 2019 and having issues trying to link my project to PortAudio. When I use the RtAudio header file in a project, I get the error message "MidiInDummy: This class provides no functionality." Most solutions I can find online say to add __WINDOWS_MM__ to the pre-processor definitions and link to winmm.lib (as instructed on https://www.music.mcgill.ca/~gary/rtmidi/) However, having done this, I am still getting the same problem.

            ...

            ANSWER

            Answered 2020-Dec-25 at 19:05

            I get the error message "MidiInDummy: This class provides no functionality."

            This warns that no valid MIDI API was defined. The warning is issued from the constructor of the MidiInDummy class in rtMidi.cpp, which is just a placeholder without functional implementation.

            add __WIN_MM__ to the pre-processor definitions

            That is the wrong #define for the Windows build, which explains the MidiInDummy warning. The correct definition, listed on the reference page under Compiling is:

            Source https://stackoverflow.com/questions/65449204

            QUESTION

            Cmake settings to add external c++ classes to a project
            Asked 2020-Nov-12 at 14:26

            probably a bit of a noob question so bear with me.

            What do I want to do? I have a c++ class called main.cpp and with that I want to add the external classes of RtMidi. I can just move the RtMidi classes into the same folder as my main.cpp and include them from there, but it feels a lot cleaner if I can keep them in a sepperate folder.

            The RtMidi folder comes with its own Cmake file, and my assumption is that I can build that folder first to create a library that I then can link to. Is this correct? I'm new to c++ and not 100% sure if this is the way you want to add external classes.

            When trying to build my project RtMidi is built, but I'm getting a warning that the main.cpp file can't find the include.

            I'm building this on a mac with Visual Studio Code and clang as the compiler if that's any help

            main.cpp

            ...

            ANSWER

            Answered 2020-Nov-12 at 14:26

            I can tell that you are new to cmake which is fine. Everyone has to start somewhere.

            Basically you aren't getting the proper include directories that your 'Music' needs. And honestly that's not your fault you linked against the 'RtMidi' if they wrote their cmake correctly your project should have compiled.

            Here is roughly the code you need (assuming the include directory you are referring to is called inc)

            Source https://stackoverflow.com/questions/64804567

            QUESTION

            RtMidi - MidiInDummy: This class provides no functionality
            Asked 2020-Jun-10 at 06:12

            I want to use Rtmidi to get input from launchpad. However, despite connecting the launchpad, 0 pods are available. "MidiInDummy: This class providers no functionality." There's also this phrase, so something seems to be wrong.

            Source:

            ...

            ANSWER

            Answered 2020-Jun-10 at 06:12

            QUESTION

            rtmidi's get_ports() returns invalid result with Flask views
            Asked 2020-Jun-02 at 01:53

            I am trying to use python-rtmidi with Flask and trying to display all available MIDI ports on the browser. And noticing two issues while the function gets called from views.py.

            • MidiIn().get_ports() : doesn't recognize a new ports that opened after the flask server started.

            • If a port reopened after it was closed (ex: VMPK Output) calling the same function MidiIn().get_ports(), it wouldn't recognize the new port.

            • Calling MidiIn().get_ports() from any module works fine. It just whenever it gets called from views.py, the above issues occured.

            • A similar code works totally fine in Quart framework.

            Any idea why it happens with Flask and would appreciate if you could shed some light on a workaround.

            ...

            ANSWER

            Answered 2020-Jun-02 at 01:53

            Answer my own question. Not sure what's difference but running the code with flask run causing this issue but python -m app works fine. So I just have to call the werkzeug myself (with Flask defaults except a couple).

            Below results are for after a MIDI port closed:

            flask run

            Output:

            Source https://stackoverflow.com/questions/62142760

            QUESTION

            Can't communicate midi through USB (python)
            Asked 2020-Apr-28 at 07:21
            My goal:

            I want to write a script on my Raspberry Pi Zero W, that sends MIDI to my computer whenever I make a specific connection on the GPIO board.

            The problem:

            The hardware stuff is already taken care of, it can recognize unique button presses. But it won't seem to send any data to my computer. I've tried multiple python modules (like rtmidi-python, python-rtmidi, mido), but none of them work as I would want them to.

            Trying to solve this issue, I've set up my Raspberry to power from the power port, so the USB port remains empty, and when it boots up, I connect the cable to my PC. I even wrote a script, that perpetually shouts the same note (note off included) over and over, since I couldn't find any "setup protocol". While browsing various forms, I noticed that all of them were pretty old. The newest is rtmidi-python on GitHub, but that doesn't seem to have any setup stuff.

            It very well could be, that i just looked the wrong way all along, or that the signal doesnt even come through the USB cable, or it doesn't need a setup either. If so, would you mind letting me know, or showing me how to do it correctly.

            Update

            I made my Raspberry into a "MIDI function" (this is how). My PC, and FL studio recognizes it as well. However, still no action, when I try to play a note. This port probing scripts

            ...

            ANSWER

            Answered 2020-Apr-27 at 17:46

            QUESTION

            conda create -n anaconda won't install full anaconda packages
            Asked 2019-Oct-21 at 02:05

            I'd like to create a python3.6 env with default anaconda packages. The manual and many online resources say the command is conda create -n py36 python=3.6 anaconda. On other computers that works, but on one particular computer it only installs very few packages. I can't figure out why. I've checked $HOME/anaconda2/env and there's nothing in there. (ubuntu 16.04, installed from anaconda, not miniconda)

            ...

            ANSWER

            Answered 2018-Nov-09 at 20:04

            It seems that the problem is that conda-forge appears first in the channel list. You can remove this channel with

            Source https://stackoverflow.com/questions/53218303

            QUESTION

            Storing Pointer to sqlite3 Database inside class throws segfault
            Asked 2019-Jul-05 at 12:22

            In my program, I am using a sqlite3 database.

            In order to handle the Ctrl-C signal and gracefully terminate the program by closing the database and closing all Midi ports (my program uses RtMidi), I need to set up a global object that stores them. I have made a class:

            ...

            ANSWER

            Answered 2019-Jul-05 at 12:22

            This is certainly erroneous:

            Source https://stackoverflow.com/questions/56902900

            QUESTION

            Consecutive MIDI messages sent to same channel are garbled
            Asked 2019-May-21 at 22:33

            I'm writing a simple C++ command line utility to send MIDI messages from my Mac (MacOS 10.12) to a Behringer Powerplay P16-M audio mixer via a Roland UM-One Mk 2 USB interface. I'm using the rtmidi realtime MIDI API.

            When I send two consecutive MIDI messages to the same channel, the two messages seem to get garbled by the mixer. When I send two consecutive messages to alternate channels, it works fine.

            For example, in order to set channel 1 level to midi 0 (-51dB) and channel 1 pan to midi 64 (centered), I understand that I should send these two messages: 0xB0 0x07 0x0 and 0xB0 0x0A 0x40. When I send those messages one after the other, the LEDs on the mixer unexpectedly indicate that channel 1 level is about 64 and the panning is unchanged -- just as if I'd sent the single message 0xB0 0x07 0x40. If instead I intersperse the two messages with a message for another channel, or with a ridiculously long sleep (anything over about 900 milliseconds does it), the LEDs indicate the expected settings: level at zero, pan centered.

            What am I doing wrong? Why can't I send two consecutive messages to the same channel? Am I sending the messages too fast? Is this is an rtmidi issue? Is it an issue with the mixer?

            Here's a minimal but complete working example that demonstrates the problem. (I compile it in XCode against the CoreMIDI, CoreAudio, and CoreFoundation frameworks.)

            ...

            ANSWER

            Answered 2019-May-21 at 22:33

            As @Kurt Revis suggested, the problem is in the mixer.

            What I did: I used MIDI Monitor to verify that my outgoing messages are all correct. So my code is OK. I connected my cables to a different MIDI device (a Roland Juno synth) and sent it a bunch of repeated messages: no problem. I conclude that the Mac, my code, the UM-ONE interface, and cables, are all OK. That leaves the mixer. I tried a second Behringer Powerplay P16-M, and got exactly the same results. It therefore seems likely to be a design/manufacture problem with the mixer.

            What I conclude: The Behringer Powerplay P16-M mixer doesn't correctly process incoming MIDI messages that are sent sequentially to the same channel, unless they are all of the same control change type.

            A Workaround: After lots of experimentation, here's what I've come up with:

            1. When sending consecutive (but different) control change messages to the same channel, insert a delay of at least 500 milliseconds between messages. For example, if you send a bunch of volume messages to a channel, followed by a bunch of pan messages to that channel, there's no problem. If you want to send a bunch of interleaved volume and pan messages to the same channel, then you need to insert a delay between each message.

            2. When resetting the mixer, channel 0 ("main") requires special handling. Messages sent to it need to be "insulated" from messages sent to other channels by inserting a delay of at least 500 milliseconds.

            [EDIT] Better solution: Instead of inserting a delay, send a MIDI pitch bend message to the device instead (e.g., send 0xE0 0x0 0x0). Even though the P16-M doesn't have any documented use for the pitch bend message, it's apparently enough to shake things up and get the device back in sync with the message stream. Works for me, anyway.

            Source https://stackoverflow.com/questions/49350158

            QUESTION

            RtMidiIn not finding Ports in Release version c++
            Asked 2018-Aug-06 at 13:26

            I can't find a related solution so i finally post here. I have a very small program that uses the RTMidi library to map the controllers keys as hotkeys. Everything works fine in debug mode and releasing the app doesn't give me any errors either, but the RTMidiIn class isn't finding any Ports in the release version.

            This is my code

            ...

            ANSWER

            Answered 2018-Aug-06 at 13:26

            Forgot to define WINDOWS_MM in the preprocessor definitions of release.

            Source https://stackoverflow.com/questions/51707085

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install rtmidi

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Audio Utils Libraries

            howler.js

            by goldfire

            fingerprintjs

            by fingerprintjs

            Tone.js

            by Tonejs

            AudioKit

            by AudioKit

            sonic-pi

            by sonic-pi-net

            Try Top Libraries by thestk

            rtaudio

            by thestkC++

            stk

            by thestkC++