Giter Site home page Giter Site logo

pyrtmidi's Introduction

pyrtmidi

Realtime MIDI I/O for Python on Windows, OS X, and Linux. Includes comprehensive MidiMessage class, support for virtual ports on OS X and Linux, and multi-threaded lister utility classes.

Pyrtmidi provides MIDI I/O for PKMidiCron.

Installation

Install using:

pip install rtmidi

Usage

pyrtmidi is a Python interface to RtMidi. It provides real-time midi input and output.

import rtmidi

midiin = rtmidi.RtMidiIn()

def print_message(midi):
    if midi.isNoteOn():
        print('ON: ', midi.getMidiNoteName(midi.getNoteNumber()), midi.getVelocity())
    elif midi.isNoteOff():
        print('OFF:', midi.getMidiNoteName(midi.getNoteNumber()))
    elif midi.isController():
        print('CONTROLLER', midi.getControllerNumber(), midi.getControllerValue())

ports = range(midiin.getPortCount())
if ports:
    for i in ports:
        print(midiin.getPortName(i))
    print("Opening port 0!") 
    midiin.openPort(0)
    while True:
        m = midiin.getMessage(250) # some timeout in ms
        if m:
            print_message(m)
else:
    print('NO MIDI INPUT PORTS!')

The API is copied near verbatim from the C++ code. Refer to the RtMidi tutorial, and take into account the following caveats:

RtMidiIn

getMessage(timeout_ms=None)

  • The message argument has been replaced with an optional millisecond timeout value.
  • The function will return a MidiMessage object, or None if no message is available.

setCallback

  • This function works just as described in the above docs, and takes a python callable object.
  • This method is most useful with a queue.Queue object to communicate between threads.

MidiMessage

This class has been taken from the juce library, and includes an excellent comprehensive set of midi functions. please check here for available methods.

Recipes

The following implements a QObject wrapper for rtmidi.RtMidiIn that emits a 'message()' signal. The essential code is follows:

class MidiInput(QThread):
    def __init__(self, devid, parent=None):
        QThread.__init__(self, parent)
        self.device = rtmidi.RtMidiIn()
        self.device.openPort(devid)
        self.running = False

    def run(self):
        self.running = True
        while self.running:
            msg = self.device.getMessage(250)
            if msg:
                self.msg = msg
                self.emit(SIGNAL('message(PyObject *)'), self.msg)
                self.emit(SIGNAL('message()')

midi = MidiInput(1)
def slotMessage(msg):
   print msg
QObject.connect(midi, SIGNAL('message(PyObject *)'), slotMessage)

The following implements a midi echo for all ports.

import sys
import rtmidi
import threading

def print_message(midi, port):
    if midi.isNoteOn():
        print '%s: ON: ' % port, midi.getMidiNoteName(midi.getNoteNumber()), midi.getVelocity()
    elif midi.isNoteOff():
        print '%s: OFF:' % port, midi.getMidiNoteName(midi.getNoteNumber())
    elif midi.isController():
        print '%s: CONTROLLER' % port, midi.getControllerNumber(), midi.getControllerValue()

class Collector(threading.Thread):
    def __init__(self, device, port):
        threading.Thread.__init__(self)
        self.setDaemon(True)
        self.port = port
        self.portName = device.getPortName(port)
        self.device = device
        self.quit = False

    def run(self):
        self.device.openPort(self.port)
        self.device.ignoreTypes(True, False, True)
        while True:
            if self.quit:
                return
            msg = self.device.getMessage()
            if msg:
                print_message(msg, self.portName)


dev = rtmidi.RtMidiIn()
collectors = []
for i in range(dev.getPortCount()):
    device = rtmidi.RtMidiIn()
    print 'OPENING',dev.getPortName(i)
    collector = Collector(device, i)
    collector.start()
    collectors.append(collector)


print 'HIT ENTER TO EXIT'
sys.stdin.read(1)
for c in collectors:
    c.quit = True

Common Problems

This is a commonly reported build error on linux, although I it works for me using python2.7 on ubuntu.

:~/devel/pkaudio/pyrtmidi/tests$ python test_rtmidi.py 
Traceback (most recent call last):
File "test_rtmidi.py", line 29, in 
import rtmidi
ImportError: /usr/local/lib/python2.6/dist-packages/rtmidi.so: undefined symbol: _ZN11MidiMessageaSERKS_

pyrtmidi's People

Contributors

jean-emmanuel avatar patrickkidd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyrtmidi's Issues

Unable to install version 2.3.3 or 2.3.4 on Python 3.7.1 on Mac

I'm on a Mac currently running OS 10.13 (High Sierra.) There are no problems at all with installing rtmidi with python 2.7 (because of wheels...?) but no such luck for python 3.7.1. The errors hint to me that perhaps the CoreMIDI headers have changed.

Here is the full error trace. It's possibly a duplicate of the error posted by @guilbut

$ pip install rtmidi==2.3.4
Collecting rtmidi==2.3.4
  Downloading https://files.pythonhosted.org/packages/80/a6/23e6fdbede1914bc1a12e3e5cdc97c3de7fccc1507126a0736dd741f0a81/rtmidi-2.3.4.tar.gz (51kB)
    100% |████████████████████████████████| 61kB 1.4MB/s
Building wheels for collected packages: rtmidi
  Running setup.py bdist_wheel for rtmidi ... error
  Complete output from command /Users/mark/.virtualenvs/music/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/2m/xgqv_dkn2bvb_j4bf8qdky7c0000gn/T/pip-install-qvpnderi/rtmidi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/2m/xgqv_dkn2bvb_j4bf8qdky7c0000gn/T/pip-wheel-equceuj7 --python-tag cp37:
  /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/extension.py:131: UserWarning: Unknown Extension options: 'headers'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.7
  creating build/lib.macosx-10.9-x86_64-3.7/rtmidi
  copying rtmidi/randomout.py -> build/lib.macosx-10.9-x86_64-3.7/rtmidi
  copying rtmidi/collector.py -> build/lib.macosx-10.9-x86_64-3.7/rtmidi
  copying rtmidi/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/rtmidi
  running build_ext
  building 'rtmidi._rtmidi' extension
  creating build/temp.macosx-10.9-x86_64-3.7
  creating build/temp.macosx-10.9-x86_64-3.7/cpp_src
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -D__MACOSX_CORE__= -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c cpp_src/RtMidi.cpp -o build/temp.macosx-10.9-x86_64-3.7/cpp_src/RtMidi.o -Wno-missing-braces
  In file included from /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h:18:0,
                   from cpp_src/RtMidi.cpp:379:
  /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:300:2: error: expected unqualified-id before '^' token
   (^MIDINotifyBlock)(const MIDINotification *message);
    ^
  /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:300:2: error: expected ')' before '^' token
  /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:343:2: error: expected unqualified-id before '^' token
   (^MIDIReadBlock)(const MIDIPacketList *pktlist, void * __nullable srcConnRefCon);
    ^
  /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:343:2: error: expected ')' before '^' token
  In file included from /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h:18:0,
                   from cpp_src/RtMidi.cpp:379:
  /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1154:6: error: 'MIDINotifyBlock' has not been declared
        MIDINotifyBlock __nullable notifyBlock )   __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
        ^
  /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1240:9: error: 'MIDIReadBlock' has not been declared
           MIDIReadBlock readBlock ) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
           ^
  /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1643:9: error: 'MIDIReadBlock' has not been declared
           MIDIReadBlock   readBlock ) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
           ^
  In file included from /usr/include/Availability.h:206:0,
                   from /usr/include/wchar.h:72,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/cwchar:44,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/bits/postypes.h:40,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/iosfwd:40,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/ios:38,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/ostream:38,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/iostream:39,
                   from cpp_src/RtMidi.h:49,
                   from cpp_src/RtMidi.cpp:39:
  /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:294:43: error: expected '}' before '__attribute__'
     kFSEventStreamCreateFlagUseExtendedData __OSX_AVAILABLE_STARTING(__MAC_10_13, __IPHONE_11_0) = 0x00000040
                                             ^
  In file included from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:55:0,
                   from cpp_src/RtMidi.cpp:381:
  /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:294:96: error: expected unqualified-id before '=' token
     kFSEventStreamCreateFlagUseExtendedData __OSX_AVAILABLE_STARTING(__MAC_10_13, __IPHONE_11_0) = 0x00000040
                                                                                                  ^
  In file included from /usr/include/Availability.h:206:0,
                   from /usr/include/wchar.h:72,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/cwchar:44,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/bits/postypes.h:40,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/iosfwd:40,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/ios:38,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/ostream:38,
                   from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/iostream:39,
                   from cpp_src/RtMidi.h:49,
                   from cpp_src/RtMidi.cpp:39:
  /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:520:41: error: expected '}' before '__attribute__'
     kFSEventStreamEventFlagItemIsHardlink __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_9_0) = 0x00100000,
                                           ^
  In file included from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:55:0,
                   from cpp_src/RtMidi.cpp:381:
  /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:520:93: error: expected unqualified-id before '=' token
     kFSEventStreamEventFlagItemIsHardlink __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_9_0) = 0x00100000,
                                                                                               ^
  /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:533:1: error: expected declaration before '}' token
   };
   ^
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for rtmidi
  Running setup.py clean for rtmidi
Failed to build rtmidi
Installing collected packages: rtmidi
  Running setup.py install for rtmidi ... error
    Complete output from command /Users/mark/.virtualenvs/music/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/2m/xgqv_dkn2bvb_j4bf8qdky7c0000gn/T/pip-install-qvpnderi/rtmidi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/2m/xgqv_dkn2bvb_j4bf8qdky7c0000gn/T/pip-record-m0pu_ssa/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mark/.virtualenvs/music/bin/../include/site/python3.7/rtmidi:
    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/extension.py:131: UserWarning: Unknown Extension options: 'headers'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.7
    creating build/lib.macosx-10.9-x86_64-3.7/rtmidi
    copying rtmidi/randomout.py -> build/lib.macosx-10.9-x86_64-3.7/rtmidi
    copying rtmidi/collector.py -> build/lib.macosx-10.9-x86_64-3.7/rtmidi
    copying rtmidi/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/rtmidi
    running build_ext
    building 'rtmidi._rtmidi' extension
    creating build/temp.macosx-10.9-x86_64-3.7
    creating build/temp.macosx-10.9-x86_64-3.7/cpp_src
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -D__MACOSX_CORE__= -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c cpp_src/RtMidi.cpp -o build/temp.macosx-10.9-x86_64-3.7/cpp_src/RtMidi.o -Wno-missing-braces
    In file included from /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h:18:0,
                     from cpp_src/RtMidi.cpp:379:
    /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:300:2: error: expected unqualified-id before '^' token
     (^MIDINotifyBlock)(const MIDINotification *message);
      ^
    /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:300:2: error: expected ')' before '^' token
    /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:343:2: error: expected unqualified-id before '^' token
     (^MIDIReadBlock)(const MIDIPacketList *pktlist, void * __nullable srcConnRefCon);
      ^
    /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:343:2: error: expected ')' before '^' token
    In file included from /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h:18:0,
                     from cpp_src/RtMidi.cpp:379:
    /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1154:6: error: 'MIDINotifyBlock' has not been declared
          MIDINotifyBlock __nullable notifyBlock )   __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
          ^
    /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1240:9: error: 'MIDIReadBlock' has not been declared
             MIDIReadBlock readBlock ) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
             ^
    /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1643:9: error: 'MIDIReadBlock' has not been declared
             MIDIReadBlock   readBlock ) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
             ^
    In file included from /usr/include/Availability.h:206:0,
                     from /usr/include/wchar.h:72,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/cwchar:44,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/bits/postypes.h:40,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/iosfwd:40,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/ios:38,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/ostream:38,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/iostream:39,
                     from cpp_src/RtMidi.h:49,
                     from cpp_src/RtMidi.cpp:39:
    /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:294:43: error: expected '}' before '__attribute__'
       kFSEventStreamCreateFlagUseExtendedData __OSX_AVAILABLE_STARTING(__MAC_10_13, __IPHONE_11_0) = 0x00000040
                                               ^
    In file included from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:55:0,
                     from cpp_src/RtMidi.cpp:381:
    /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:294:96: error: expected unqualified-id before '=' token
       kFSEventStreamCreateFlagUseExtendedData __OSX_AVAILABLE_STARTING(__MAC_10_13, __IPHONE_11_0) = 0x00000040
                                                                                                    ^
    In file included from /usr/include/Availability.h:206:0,
                     from /usr/include/wchar.h:72,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/cwchar:44,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/bits/postypes.h:40,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/iosfwd:40,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/ios:38,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/ostream:38,
                     from /usr/local/Cellar/gcc/4.8.2_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/include/c++/iostream:39,
                     from cpp_src/RtMidi.h:49,
                     from cpp_src/RtMidi.cpp:39:
    /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:520:41: error: expected '}' before '__attribute__'
       kFSEventStreamEventFlagItemIsHardlink __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_9_0) = 0x00100000,
                                             ^
    In file included from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:55:0,
                     from cpp_src/RtMidi.cpp:381:
    /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:520:93: error: expected unqualified-id before '=' token
       kFSEventStreamEventFlagItemIsHardlink __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_9_0) = 0x00100000,
                                                                                                 ^
    /System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:533:1: error: expected declaration before '}' token
     };
     ^
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/Users/mark/.virtualenvs/music/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/2m/xgqv_dkn2bvb_j4bf8qdky7c0000gn/T/pip-install-qvpnderi/rtmidi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/2m/xgqv_dkn2bvb_j4bf8qdky7c0000gn/T/pip-record-m0pu_ssa/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mark/.virtualenvs/music/bin/../include/site/python3.7/rtmidi" failed with error code 1 in /private/var/folders/2m/xgqv_dkn2bvb_j4bf8qdky7c0000gn/T/pip-install-qvpnderi/rtmidi/

Compilation faild with MinGW on Windows

Discription

$ pip install rtmidi
    ...
    D:\msys2-64\mingw64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -D__WINDOWS_MM__= -DPK_WINDOWS=1 -If:\mypython\ms2mmleditor\.venv-mmlparser\include -ID:\Python38\include -ID:\Python38\include -c cpp_src\RtMidi.cpp -o build\temp.win-amd64-3.8\Release\cpp_src\rtmidi.o /EHsc
    gcc: error: /EHsc: No such file or directory
    error: command 'D:\\msys2-64\\mingw64\\bin\\gcc.exe' failed with exit status 1

Then I downloaded this package and modified setup.py:

$ pip download rtmidi
$ tar -xzvf rtmidi-2.3.4.tar.gz
elif OSNAME == 'Windows':
    define_macros = [('__WINDOWS_MM__', ''),
                     ('PK_WINDOWS', '1')]
    # library_dirs = ['C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib']
    libraries = ['winmm', 'python34']
    # extra_compile_args = ['/EHsc']

(btw, I don't know why it is "python34")

$ tar -czvf rtmidi-2.3.4.tar.gz rtmidi-2.3.4
$ pip install rtmidi-2.3.4.tar.gz
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing f:\mypython\ms2mmleditor\rtmidi-2.3.4.tar.gz
Installing collected packages: rtmidi
    Running setup.py install for rtmidi ... done
Successfully installed rtmidi-2.3.4

This time I installed successfully, but got an ImportError:

Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import rtmidi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "F:\mypython\ms2mmlEditor\.venv-mmlparser\lib\site-packages\rtmidi\__init__.py", line 1, in <module>
    from ._rtmidi import *
ImportError: DLL load failed while importing _rtmidi: 找不到指定的模块。

So I have no idea how to install pyrtmidi without MSVC.

Environment

OS: Microsoft Windows 10 Home (v10.0.18363) 64bit
Python: Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32 (Installed with exe)

$ cat "D:\Python38\Lib\distutils\distutils.cfg"
[build]
compiler=mingw32

$ gcc --version
gcc.exe (Rev1, Built by MSYS2 project) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

midiin.getMessage(250) return None

Hi:

I have a question, I'm very newbie in this informatic sound world.
This is the scenario:

I connect my Behringer UMX610 controller via USB to my computer.
I spect when I play the keyboard my script recieve the midi signal and will print into terminal using this code (from README with little changes):

midiin = rtmidi.RtMidiIn()


def print_message(midi):
    if midi.isNoteOn():
        print('(L9) ON: ', midi.getMidiNoteName(midi.getNoteNumber()), midi.getVelocity())
    elif midi.isNoteOff():
        print('(L10) OFF:', midi.getMidiNoteName(midi.getNoteNumber()))
    elif midi.isController():
        print('(L13) CONTROLLER', midi.getControllerNumber(), midi.getControllerValue())


ports = range(midiin.getPortCount())
if ports:
    for i in ports:
        print('(L19) ', midiin.getPortName(i))
    print("(L20) Opening port 0!")
    midiin.openPort(0, midiin.getPortName(i))
    while True:
        m = midiin.getMessage(250) # some timeout in ms
        print('(L24) Message', m)
        if m:
            print_message('(L23) ',m)
else:
    print('(L28) NO MIDI INPUT PORTS!')

But the output is:

(L19)  Midi Through 14:0
(L19)  UMX 610 24:0
(L20) Opening port 0!
(L24) Message None
(L24) Message None
.
.
.
.

I'm very thankful for any explanations about this, and any kind of documentation links in order to enlighten me about this topic.

Thankyou.

Unable to install on Python 3.6 (32 and 64 bit) and on Python 2.7 64 bit.

Hi,

Thanks you for your amazing pyrtmidi that i'm using on python 2.7 32 bit !
I would like to use it in Python 3.6 (32 and 64 bit) and on Python 2.7 64 bit, but I have some difficulties to install PyRtmidi on this python versions. "pip install rtmidi" doesn't work .
on ptyhon 2.7 64 bit , I have the error : LINK : fatal error LNK1181: cannot open input file 'python34.lib'
on python 3.6 (32 & 64 bit) i have the errors : LINK : fatal error LNK1181: cannot open input file 'winmm.lib'

I'm very sad, because if I switch to python-rtmidi or rtmidi-python I will lose your MidiMessage capability and will have to recode a lot of things.

Do you plan to release wheels ?

I tried to build it from source, but did'nt succeed.

For python 2.7 64 bit I tried :

  1. Install Microsoft Visual C++ Compiler for Python 2.7 (https://www.microsoft.com/en-us/download/details.aspx?id=44266)

  2. git clone https://github.com/patrickkidd/pyrtmidi

  3. modify "pyrtmidi/septup.py"
    libraries = ['winmm', 'python34'] => libraries = ['winmm', 'python27']
    library_dirs = ['C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib']
    =>
    library_dirs = ['C:/Users/Guilbut/AppData/Local/Programs/Common/Microsoft/Visual C++ for Python/9.0/WinSDK/Lib/x64']

  4. "python setup.py install" give me
    C:....\python-2.7.13.amd64\lib
    \distutils\extension.py:133: UserWarning: Unknown Extension options: 'headers'
    warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-2.7
    creating build\lib.win-amd64-2.7\rtmidi
    copying rtmidi_init_.py -> build\lib.win-amd64-2.7\rtmidi
    copying rtmidi\collector.py -> build\lib.win-amd64-2.7\rtmidi
    copying rtmidi\randomout.py -> build\lib.win-amd64-2.7\rtmidi
    running build_ext
    building 'rtmidi._rtmidi' extension
    Traceback (most recent call last):
    File "setup.py", line 126, in
    'Programming Language :: Python :: 3.4',
    File "C:....\python-2.7.13.a
    md64\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
    File "C:....\python-2.7.13.a
    md64\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
    File "C:....\python-2.7.13.a
    md64\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
    File "C:....\python-2.7.13.a
    md64\lib\distutils\command\install.py", line 563, in run
    self.run_command('build')
    File "C:....\python-2.7.13.a
    md64\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "C:....\python-2.7.13.a
    md64\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
    File "C:....\python-2.7.13.a
    md64\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
    File "C:....\python-2.7.13.a
    md64\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "C:....\python-2.7.13.a
    md64\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
    File "C:....\python-2.7.13.a
    md64\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
    File "C:....\python-2.7.13.a
    md64\lib\distutils\command\build_ext.py", line 449, in build_extensions
    self.build_extension(ext)
    File "C:....\python-2.7.13.a
    md64\lib\distutils\command\build_ext.py", line 499, in build_extension
    depends=ext.depends)
    File "C:....\python-2.7.13.a
    md64\lib\distutils\msvc9compiler.py", line 473, in compile
    self.initialize()
    File "C:....\python-2.7.13.a
    md64\lib\distutils\msvc9compiler.py", line 383, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
    File "C:....\python-2.7.13.a
    md64\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
    raise ValueError(str(list(result.keys())))
    ValueError: [u'path']

  5. It tried to modify the VS90COMNTOOLS environnement var without succeed..

For python 3.6 I tried :

  1. Install Visual Studio Community 2017, select the Python development workload and the Native development tools option.
  2. git clone https://github.com/patrickkidd/pyrtmidi
  3. modify "pyrtmidi/septup.py"
    libraries = ['winmm', 'python34'] => libraries = ['winmm', 'python36']
    library_dirs = ['C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib']
    Python 3.6 32 bit :
    =>library_dirs = ['C:/Program Files (x86)/Windows Kits/10/Lib/10.0.15063.0/um/x86']
    Python 3.6 64 bit :
    => library_dirs = ['C:/Program Files (x86)/Windows Kits/10/Lib/10.0.15063.0/um/x64']
  4. Add ..... ;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
    to the PATH environnements variables
  5. Add the environnements variables :
    INCLUDE
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared
    LIB
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib
  6. "python setup.py install" give me :
    C:....\scripts\pyrtmidi>python setup.py install
    C:....\python-3.6.2.amd64\lib\distutils\extension.py:131: UserWarning: Unknown Extension options: 'headers'
    warnings.warn(msg)
    running install
    running build
    running build_py
    running build_ext
    building 'rtmidi.rtmidi' extension
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM
    _= -DPK_WINDOWS=1 -IC:....\python-
    3.6.2.amd64\include -IC:....\python-3.6.2.amd64\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" "-IC:\Program Files (x86)\Wi
    ndows Kits\10\Include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared" /EHsc /Tpcpp_src\RtMi
    di.cpp /Fobuild\temp.win-amd64-3.6\Release\cpp_src\RtMidi.obj /EHsc
    RtMidi.cpp
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM__= -DPK_WINDOWS=1 -IC:....\python-
    3.6.2.amd64\include -IC:....\python-3.6.2.amd64\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" "-IC:\Program Files (x86)\Wi
    ndows Kits\10\Include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared" /EHsc /Tpcpp_src\Midi
    Message.cpp /Fobuild\temp.win-amd64-3.6\Release\cpp_src\MidiMessage.obj /EHsc
    MidiMessage.cpp
    cpp_src\MidiMessage.cpp(1055): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    cpp_src\MidiMessage.cpp(1057): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM
    = -DPK_WINDOWS=1 -IC:....\python-
    3.6.2.amd64\include -IC:....\python-3.6.2.amd64\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" "-IC:\Program Files (x86)\Wi
    ndows Kits\10\Include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared" /EHsc /Tpcpp_src\PyMi
    diMessage.cpp /Fobuild\temp.win-amd64-3.6\Release\cpp_src\PyMidiMessage.obj /EHsc
    PyMidiMessage.cpp
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM__= -DPK_WINDOWS=1 -IC:....\python-
    3.6.2.amd64\include -IC:....\python-3.6.2.amd64\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" "-IC:\Program Files (x86)\Wi
    ndows Kits\10\Include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared" /EHsc /Tpcpp_src\rtmi
    dimodule.cpp /Fobuild\temp.win-amd64-3.6\Release\cpp_src\rtmidimodule.obj /EHsc
    rtmidimodule.cpp
    cpp_src\rtmidimodule.cpp(50): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    cpp_src\rtmidimodule.cpp(52): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    cpp_src\rtmidimodule.cpp(54): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    cpp_src\rtmidimodule.cpp(56): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    cpp_src\rtmidimodule.cpp(58): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    cpp_src\rtmidimodule.cpp(60): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    cpp_src\rtmidimodule.cpp(62): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    cpp_src\rtmidimodule.cpp(64): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help
    for details.
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(1772): note: voir la déclaration de 'sprintf'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:/Program Files (x86)/Windows Kits/10/Lib/10.0.15
    063.0/um/x64" /LIBPATH:C:....\python-3.6.2.amd64\libs /LIBPATH:C:....\python-3.6.2.amd64\PCbuild\amd64
    "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib" winmm.lib python36.lib /EXPORT:PyInit__rtmidi build\temp.win-amd64-3.6\Release\cpp_src\RtMidi.obj build\temp.win-amd64-3.6\Release
    \cpp_src\MidiMessage.obj build\temp.win-amd64-3.6\Release\cpp_src\PyMidiMessage.obj build\temp.win-amd64-3.6\Release\cpp_src\rtmidimodule.obj /OUT:build\lib.win-amd64-3.6\rtmidi_rtmidi.cp36-win_amd64
    .pyd /IMPLIB:build\temp.win-amd64-3.6\Release\cpp_src_rtmidi.cp36-win_amd64.lib
    Création de la bibliothèque build\temp.win-amd64-3.6\Release\cpp_src_rtmidi.cp36-win_amd64.lib et de l'objet build\temp.win-amd64-3.6\Release\cpp_src_rtmidi.cp36-win_amd64.exp
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp____std_exception_destroy
    RtMidi.obj : error LNK2001: symbole externe non résolu "void __cdecl operator delete[](void *,unsigned int)" (??_V@YAXPAXI@Z)
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__EnterCriticalSection@4
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInUnprepareHeader@12
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInOpen@20
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiOutPrepareHeader@12
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp____acrt_iob_func
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiOutOpen@20
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__InitializeCriticalSectionAndSpinCount@8
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInReset@4
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__LeaveCriticalSection@4
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) void __cdecl std::_Xbad_alloc(void)" (_imp?_Xbad_alloc@std@@yaxxz)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) void __cdecl std::_Xout_of_range(char const *)" (_imp?_Xout_of_range@std@@YAXPBD@Z)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) __int64 const std::_BADOFF" (_imp?_BADOFF@std@@3_JB)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) void __cdecl std::_Xlength_error(char const *)" (_imp?_Xlength_error@std@@YAXPBD@Z)
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInPrepareHeader@12
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiOutUnprepareHeader@12
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInStart@4
    RtMidi.obj : error LNK2001: symbole externe non résolu "void __stdcall eh vector destructor iterator'(void *,unsigned int,unsigned int,void (__thiscall*)(void *))" (??_M@YGXPAXIIP6EX0@Z@Z) RtMidi.obj : error LNK2001: symbole externe non résolu __imp____std_exception_copy RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInClose@4 RtMidi.obj : error LNK2001: symbole externe non résolu "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z) RtMidi.obj : error LNK2001: symbole externe non résolu __imp____stdio_common_vfprintf RtMidi.obj : error LNK2001: symbole externe non résolu __imp__Sleep@4 MSVCRT.lib(crtdll.obj) : error LNK2001: symbole externe non résolu __imp__Sleep@4 RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInAddBuffer@12 RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInGetNumDevs@0 RtMidi.obj : error LNK2001: symbole externe non résolu __imp__DeleteCriticalSection@4 RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiOutShortMsg@8 RtMidi.obj : error LNK2001: symbole externe non résolu ___std_terminate RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiOutGetNumDevs@0 RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiOutLongMsg@12 RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiOutClose@4 RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInStop@4 RtMidi.obj : error LNK2001: symbole externe non résolu __imp___invalid_parameter_noinfo_noreturn RtMidi.obj : error LNK2001: symbole externe non résolu "void __stdcall eh vector constructor iterator'(void ,unsigned int,unsigned int,void (__thiscall)(void ),void (__thiscall)(void *))" (??_L@Y
    GXPAXIIP6EX0@Z1@Z)
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiOutReset@4
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiInGetDevCapsA@12
    RtMidi.obj : error LNK2001: symbole externe non résolu __imp__midiOutGetDevCapsA@12
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) public: __int64 __thiscall std::basic_streambuf<char,struct std::char_traits >::sputn(char const *,__int64)" (_imp
    ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE_JPBD_J@Z)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) public: virtual void __thiscall std::basic_streambuf<char,struct std::char_traits >::_Lock(void)" (_imp?_Lock@?$ba
    sic_streambuf@DU?$char_traits@D@std@@@std@@UAEXXZ)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) public: virtual void __thiscall std::basic_streambuf<char,struct std::char_traits >::_Unlock(void)" (_imp?_Unlock@
    ?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAEXXZ)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) protected: virtual __int64 __thiscall std::basic_streambuf<char,struct std::char_traits >::showmanyc(void)" (_imp?
    showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE_JXZ)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) protected: virtual __int64 __thiscall std::basic_streambuf<char,struct std::char_traits >::xsgetn(char *,__int64)" (
    _imp?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE_JPAD_J@Z)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) protected: virtual __int64 __thiscall std::basic_streambuf<char,struct std::char_traits >::xsputn(char const *,__int
    64)" (_imp?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE_JPBD_J@Z)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) protected: virtual class std::basic_streambuf<char,struct std::char_traits > * __thiscall std::basic_streambuf<char,
    struct std::char_traits >::setbuf(char *,__int64)" (_imp?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PAD_J@Z)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) public: __int64 __thiscall std::ios_base::width(__int64)" (_imp?width@ios_base@std@@QAE_J_J@Z)
    RtMidi.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) public: __int64 __thiscall std::ios_base::width(void)const " (_imp?width@ios_base@std@@QBE_JXZ)
    MidiMessage.obj : error LNK2001: symbole externe non résolu ___report_rangecheckfailure
    MidiMessage.obj : error LNK2001: symbole externe non résolu __imp____stdio_common_vsprintf
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyBool_FromLong
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyBytes_AsString
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyLong_FromLong
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp___Py_NoneStruct
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyFloat_FromDouble
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp___Py_FalseStruct
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyType_IsSubtype
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyTuple_GetItem
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyLong_AsLong
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyBytes_FromStringAndSize
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp___Py_NotImplementedStruct
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp___Py_TrueStruct
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyUnicode_FromString
    PyMidiMessage.obj : error LNK2001: symbole externe non résolu __imp__PyArg_ParseTuple
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyThreadState_Get
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyEval_SaveThread
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__Py_BuildValue
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyGILState_Release
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyDict_SetItemString
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__CreateMutexA@12
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyErr_SetString
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__WaitForSingleObject@8
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__ReleaseMutex@4
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyErr_Format
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyFloat_Type
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyLong_Type
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyModule_AddObject
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyModule_Create2
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyType_Ready
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyErr_NewException
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__SetEvent@4
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyThreadState_SetAsyncExc
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__CloseHandle@4
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyEval_InitThreads
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyGILState_Ensure
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyExc_TypeError
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyObject_IsTrue
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyCallable_Check
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__CreateEventA@16
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyEval_RestoreThread
    rtmidimodule.obj : error LNK2001: symbole externe non résolu __imp__PyEval_CallObjectWithKeywords
    MSVCRT.lib(crtdll.obj) : error LNK2001: symbole externe non résolu __imp__InterlockedExchange@8
    MSVCRT.lib(crtdll.obj) : error LNK2001: symbole externe non résolu __imp__InterlockedCompareExchange@12
    MSVCRT.lib(gs_report.obj) : error LNK2001: symbole externe non résolu __imp__TerminateProcess@8
    MSVCRT.lib(gs_report.obj) : error LNK2001: symbole externe non résolu __imp__GetCurrentProcess@0
    MSVCRT.lib(gs_report.obj) : error LNK2001: symbole externe non résolu __imp__UnhandledExceptionFilter@4
    MSVCRT.lib(gs_report.obj) : error LNK2001: symbole externe non résolu __imp__SetUnhandledExceptionFilter@4
    MSVCRT.lib(gs_report.obj) : error LNK2001: symbole externe non résolu __imp__IsDebuggerPresent@0
    MSVCRT.lib(dllmain.obj) : error LNK2001: symbole externe non résolu __imp__DisableThreadLibraryCalls@4
    MSVCRT.lib(gs_support.obj) : error LNK2001: symbole externe non résolu __imp__QueryPerformanceCounter@4
    MSVCRT.lib(gs_support.obj) : error LNK2001: symbole externe non résolu __imp__GetTickCount@0
    MSVCRT.lib(gs_support.obj) : error LNK2001: symbole externe non résolu __imp__GetCurrentThreadId@0
    MSVCRT.lib(gs_support.obj) : error LNK2001: symbole externe non résolu __imp__GetCurrentProcessId@0
    MSVCRT.lib(gs_support.obj) : error LNK2001: symbole externe non résolu __imp__GetSystemTimeAsFileTime@4
    build\lib.win-amd64-3.6\rtmidi_rtmidi.cp36-win_amd64.pyd : fatal error LNK1120: 103 externes non résolus
    error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe' failed with exit status 1120

Thanks you very much .

Bug? Buffer overflow crash on certain getMidiNoteName numbers

Hey,
using: Python 3.6.3 rtmidi 2.3.2

Some notes (at least A#-1, D#-2) lead to a buffer overflow crash when passing them through midi.getMidiNoteName() as shown in the example. The call to midi.getNoteNumber() is working fine. Any idea what's going on there?

MidiMessage_str empty (windows)

I've been receiving logs from windows users that lack of the string representation of MIDI messages generated by rtmidi. I don't use windows at all, but but maybe someone here does and could confirm/investigate this ?

First readme example out of date

I couldn't get the first example to work, but I modified it and it achieves the objective:

import rtmidi

midiin = rtmidi.MidiIn()
midiin.ignore_types(sysex=False, timing=True, active_sense=True)

ports = range(midiin.get_port_count())
if ports:
    for i in ports:
        print(midiin.get_port_name(i))
    print("Opening port 1!") 
    midiin.open_port(1)
    while True:
        m = midiin.get_message()
        if m:
            print(m)
            
else:
    print('NO MIDI INPUT PORTS!')

MidiMessage.noteOn() returns message with channel 1

Hi,

rtmidi.MidiMessage.noteOn() always return message for channel 1. rtmidi.MidiMessage.noteOff() is OK:

In [91]: rtmidi.MidiMessage.noteOn(10, 80, 127)
Out[91]: <NOTE ON, note: 80 (G#4), velocity: 127, channel: 1>

In [92]: m=rtmidi.MidiMessage.noteOn(10, 80, 127)

In [93]: m
Out[93]: <NOTE ON, note: 80 (G#4), velocity: 127, channel: 1>

In [94]: m.setChannel(10)

In [95]: m
Out[95]: <NOTE ON, note: 80 (G#4), velocity: 127, channel: 10>

In [96]: n=rtmidi.MidiMessage.noteOff(10,80)

In [97]: n
Out[97]: <NOTE OFF, note: 80 (G#4), channel: 10>

Possible to put up on Devpi

Hi!

I'd love to evaluate using pyrtmidi for a project of mine. I was wondering if it was possible for you to upload it to pypi, so that pip install pyrtmidi would work.

Thanks, package looks great!

can't reopen port after port was closed

Hi,

I noticed, after you close a port, you get an error when you try to reopen it. The following code reproduces this behavior.

import rtmidi
m = rtmidi.RtMidiIn()
m.openPort(0) # first call works
m.closePort()
m.openPort(0) # second call fails

I get the following error:

MidiInAlsa::openPort: ALSA error making port connection.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
rtmidi.Error: MidiInAlsa::openPort: ALSA error making port connection.

My OS is ArchLinux, pyrtmidi 2.3.4-2.

I hope I didn't miss anything, but I couldn't find any documentation on this behavior. So I decided to report it. This might also be a problem of RtMidi. But as I am not very familiar with C++, I didn't check it.

Unable to install with Python > 3.4

I'm a complete noob to Python, so I don't know how to ship around this, but it seems not to work out-of-the box with pip install rtmidi like specified in the readme, so I open up an issue here. Seems to me that you're buiding RtMidi from CPP source here and try to link against python34.lib, which is not present on my system. Idk, is there maybe a more general solution to this, so you use the lib corresponding to the Python version actually installed?

pip install rtmidi
Collecting rtmidi
Using cached rtmidi-2.3.4.tar.gz (51 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for rtmidi, since package 'wheel' is not installed.
Installing collected packages: rtmidi
Running setup.py install for rtmidi ... error
error: subprocess-exited-with-error

× Running setup.py install for rtmidi did not run successfully.
│ exit code: 1
╰─> [41 lines of output]
C:\Users\me\AppData\Local\Programs\Python\Python310\lib\distutils\extension.py:132: UserWarning: Unknown Extension options: 'headers'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\rtmidi
copying rtmidi\collector.py -> build\lib.win-amd64-3.10\rtmidi
copying rtmidi\randomout.py -> build\lib.win-amd64-3.10\rtmidi
copying rtmidi_init_.py -> build\lib.win-amd64-3.10\rtmidi
running build_ext
building 'rtmidi.rtmidi' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\cpp_src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM
_= -DPK_WINDOWS=1 -IC:\Users\me\AppData\Local\Programs\Python\Python310\include -IC:\Users\me\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tpcpp_src\MidiMessage.cpp /Fobuild\temp.win-amd64-3.10\Release\cpp_src\MidiMessage.obj /EHsc
MidiMessage.cpp
cpp_src\MidiMessage.cpp(1055): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use CRT_SECURE_NO_WARNINGS. See online help for details.
cpp_src\MidiMessage.cpp(1057): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM
= -DPK_WINDOWS=1 -IC:\Users\me\AppData\Local\Programs\Python\Python310\include -IC:\Users\me\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tpcpp_src\PyMidiMessage.cpp /Fobuild\temp.win-amd64-3.10\Release\cpp_src\PyMidiMessage.obj /EHsc
PyMidiMessage.cpp
cpp_src\PyMidiMessage.cpp(72): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
cpp_src\PyMidiMessage.cpp(87): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM__= -DPK_WINDOWS=1 -IC:\Users\me\AppData\Local\Programs\Python\Python310\include -IC:\Users\me\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tpcpp_src\RtMidi.cpp /Fobuild\temp.win-amd64-3.10\Release\cpp_src\RtMidi.obj /EHsc
RtMidi.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM__= -DPK_WINDOWS=1 -IC:\Users\me\AppData\Local\Programs\Python\Python310\include -IC:\Users\me\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tpcpp_src\rtmidimodule.cpp /Fobuild\temp.win-amd64-3.10\Release\cpp_src\rtmidimodule.obj /EHsc
rtmidimodule.cpp
cpp_src\rtmidimodule.cpp(50): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
cpp_src\rtmidimodule.cpp(52): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
cpp_src\rtmidimodule.cpp(54): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
cpp_src\rtmidimodule.cpp(56): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
cpp_src\rtmidimodule.cpp(58): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
cpp_src\rtmidimodule.cpp(60): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
cpp_src\rtmidimodule.cpp(62): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
cpp_src\rtmidimodule.cpp(64): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
cpp_src\rtmidimodule.cpp(97): warning C4996: 'PyEval_CallObjectWithKeywords': deprecated in 3.9
cpp_src\rtmidimodule.cpp(908): warning C4996: 'PyEval_InitThreads': deprecated in 3.9
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Program Files\Microsoft SDKs\Windows7.1\Lib /LIBPATH:C:\Users\me\AppData\Local\Programs\Python\Python310\libs /LIBPATH:C:\Users\me\AppData\Local\Programs\Python\Python310\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64 winmm.lib python34.lib /EXPORT:PyInit__rtmidi build\temp.win-amd64-3.10\Release\cpp_src\MidiMessage.obj build\temp.win-amd64-3.10\Release\cpp_src\PyMidiMessage.obj build\temp.win-amd64-3.10\Release\cpp_src\RtMidi.obj build\temp.win-amd64-3.10\Release\cpp_src\rtmidimodule.obj /OUT:build\lib.win-amd64-3.10\rtmidi_rtmidi.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.10\Release\cpp_src_rtmidi.cp310-win_amd64.lib
LINK : fatal error LNK1181: cannot open input file 'python34.lib'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe' failed with exit code 1181
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> rtmidi

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Fails to detect Midi Inputs

I am using pyrtmidi on the raspberry pi, and it doesn't seem to be able to detect the Midi inputs (I'm not using outputs for this project, so I can't speak on that).

The curious thing about it is that the C/C++ RtMidi library seems to work.

My hardware is a Raspberry Pi Model B with an EMU XMidi 1x1.

Can't open MIDI ports after closing them

My code looks like:

def process_midis():
    midiin1.openPort(port1)
    midiout1.openPort(port1)
    midiout1.openPort(port2)

...

    midiin1.closePort()
    midiout1.closePort()
    midiout1.closePort()

and when I call it the second time I got an error

MidiInApi::setCallback: a callback function is already set!

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.