File: binaries.rst

package info (click to toggle)
python-mido 1.3.3-0.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 920 kB
  • sloc: python: 4,006; makefile: 127; sh: 4
file content (65 lines) | stat: -rw-r--r-- 1,736 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.. SPDX-FileCopyrightText: 2013 Ole Martin Bjorndalen <ombdalen@gmail.com>
..
.. SPDX-License-Identifier: CC-BY-4.0

Included Programs
=================

A few sample programs are installed with Mido and available directly from the
:term:`CLI`.

.. warning::

    These are intended to demonstrate the capabilities of Mido and used as a
    template for your own programs. These are not fully fledged and may miss
    crucial features.


mido-ports
----------

Lists all available input and output ports, shows environment variables
and the current backend module.


mido-play
---------

Plays back one or more MIDI files::

    $ mido-play song1.mid [song2.mid]


mido-serve
----------

Serves one or more ports over the network, for example::

    $ mido-serve :9080 'Integra-7'

You can now connect to this port with ``mido-forward`` (or use
``mido.sockets.connect()`` and send messages to it. The messages will
be forwarded to every port you listed (in this case 'Integra-7').


mido-connect
------------

Forwards all messages that arrive on one or more ports to a server.

For example, to use the SH-201 keyboard connected to this computer to
play sounds on the Integra-7 on a computer named ``mac.local`` (which
runs the server as above), you can do::

    $ mido-connect mac.local:9080 'SH-201'

Note that you may experience latency and jitter, so this may not be
very useful for live playing or for playing back songs.

There is also no security built in, so you should only use this on a
trusted network. (Anyone can connect and send anything, including
harmful sysex messages.)

``mido-serve`` and ``mido-connect`` are only included as fun programs
to play with, but may in the future be expanded into something more
usable.