Debian Codegraph @

docs/backends/portmidi.rst

raw
1 .. SPDX-FileCopyrightText: 2017 Ole Martin Bjorndalen <[email protected]>
2 ..
3 .. SPDX-License-Identifier: CC-BY-4.0
4
5 PortMidi
6 --------
7
8 Name: ``mido.backends.portmidi``
9
10 Resources:
11
12 * `PortMidi C Library <https://github.com/PortMidi/portmidi>`_
13
14
15 Installing
16 ^^^^^^^^^^
17
18 The PortMidi backend requires the ``portmidi`` shared library.
19
20 `Ubuntu <https://www.ubuntu.com/>`_::
21
22 apt install libportmidi-dev
23
24 `Homebrew <https://mxcl.dev/homebrew/>`_::
25
26 brew install portmidi
27
28 `MacPorts <https://www.macports.org/>`_::
29
30 port install portmidi
31
32 The backend will look for::
33
34 portmidi.so (Linux)
35 portmidi.dynlib (macOS)
36 portmidi.dll (Windows)
37
38
39 Features
40 ^^^^^^^^
41
42 * Can send but doesn't receive ``active_sensing`` messages.
43
44 * No callback mechanism so callbacks are implemented in
45 Python with threads. Each port with a callback has a dedicated thread
46 doing blocking reads from the device.
47
48 * Due to limitations in PortMidi the port list will not be up-to-date if
49 there are any ports open. (The refresh is implemented by
50 re-initializing PortMidi which would break any open ports.)