mididings 20230111__tar.gz → 20250818__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. mididings-20250818/.github/workflows/python-package.yml +44 -0
  2. mididings-20250818/.gitignore +11 -0
  3. {mididings-20230111 → mididings-20250818}/MANIFEST.in +1 -1
  4. {mididings-20230111 → mididings-20250818}/PKG-INFO +105 -32
  5. mididings-20230111/mididings.egg-info/PKG-INFO → mididings-20250818/README.md +84 -45
  6. mididings-20250818/REUSE.toml +69 -0
  7. mididings-20250818/dev/get-buildpath.py +17 -0
  8. mididings-20250818/dev/update-version-strings.sh +7 -0
  9. mididings-20250818/doc/conf.py +64 -0
  10. {mididings-20230111 → mididings-20250818}/doc/engine.rst +3 -1
  11. {mididings-20230111 → mididings-20250818}/doc/examples/router.py +2 -2
  12. {mididings-20230111 → mididings-20250818}/doc/extra-units.rst +1 -1
  13. {mididings-20230111 → mididings-20250818}/doc/extra.rst +1 -1
  14. mididings-20250818/doc/man/meson.build +26 -0
  15. mididings-20250818/doc/meson.build +47 -0
  16. mididings-20250818/doc/mesonconf.py.in +1 -0
  17. {mididings-20230111 → mididings-20250818}/doc/util.rst +2 -1
  18. mididings-20250818/meson.build +27 -0
  19. mididings-20250818/meson_options.txt +3 -0
  20. {mididings-20230111 → mididings-20250818}/mididings/__init__.py +2 -2
  21. {mididings-20230111 → mididings-20250818}/mididings/arguments.py +20 -28
  22. {mididings-20230111 → mididings-20250818}/mididings/engine.py +3 -5
  23. {mididings-20230111 → mididings-20250818}/mididings/event.py +6 -3
  24. mididings-20250818/mididings/extra/meson.build +21 -0
  25. {mididings-20230111 → mididings-20250818}/mididings/extra/osc.py +7 -3
  26. {mididings-20230111 → mididings-20250818}/mididings/live/livedings.py +12 -6
  27. mididings-20250818/mididings/live/meson.build +7 -0
  28. {mididings-20230111 → mididings-20250818}/mididings/live/osc_control.py +15 -1
  29. mididings-20250818/mididings/meson.build +19 -0
  30. {mididings-20230111 → mididings-20250818}/mididings/overload.py +4 -4
  31. {mididings-20230111 → mididings-20250818}/mididings/patch.py +1 -3
  32. {mididings-20230111 → mididings-20250818}/mididings/unitrepr.py +1 -1
  33. mididings-20250818/mididings/units/meson.build +13 -0
  34. {mididings-20230111 → mididings-20250818}/mididings/util.py +21 -22
  35. mididings-20250818/pkglist.toml +14 -0
  36. {mididings-20230111 → mididings-20250818}/pyproject.toml +10 -9
  37. mididings-20250818/scripts/livedings +130 -0
  38. mididings-20250818/scripts/meson.build +3 -0
  39. mididings-20250818/scripts/mididings +340 -0
  40. {mididings-20230111 → mididings-20250818}/src/backend/base.hh +3 -3
  41. {mididings-20230111 → mididings-20250818}/src/config.hh +4 -0
  42. mididings-20250818/src/meson.build +33 -0
  43. mididings-20250818/src/mesonconfig.hh.in +3 -0
  44. {mididings-20230111 → mididings-20250818}/src/patch.hh +3 -0
  45. {mididings-20230111 → mididings-20250818}/src/python_module.cc +1 -0
  46. {mididings-20230111 → mididings-20250818}/src/units/base.hh +3 -0
  47. {mididings-20230111 → mididings-20250818}/src/util/counted_objects.hh +1 -1
  48. mididings-20250818/tests/test_version.py +37 -0
  49. mididings-20230111/.reuse/dep5 +0 -24
  50. mididings-20230111/Makefile +0 -61
  51. mididings-20230111/README.md +0 -121
  52. mididings-20230111/doc/Makefile +0 -13
  53. mididings-20230111/doc/conf.py +0 -95
  54. mididings-20230111/doc/man/Makefile +0 -14
  55. mididings-20230111/doc/man/livedings.1 +0 -106
  56. mididings-20230111/doc/man/mididings.1 +0 -122
  57. mididings-20230111/doc/man/send_midi.1 +0 -72
  58. mididings-20230111/mididings.egg-info/SOURCES.txt +0 -159
  59. mididings-20230111/mididings.egg-info/dependency_links.txt +0 -1
  60. mididings-20230111/mididings.egg-info/requires.txt +0 -23
  61. mididings-20230111/mididings.egg-info/top_level.txt +0 -2
  62. mididings-20230111/scripts/livedings +0 -85
  63. mididings-20230111/scripts/mididings +0 -283
  64. mididings-20230111/setup.cfg +0 -4
  65. mididings-20230111/setup.py +0 -184
  66. mididings-20230111/src/SConstruct +0 -83
  67. {mididings-20230111 → mididings-20250818}/LICENSE.md +0 -0
  68. {mididings-20230111 → mididings-20250818}/LICENSES/GFDL-1.3-or-later.txt +0 -0
  69. {mididings-20230111 → mididings-20250818}/LICENSES/GPL-2.0-or-later.txt +0 -0
  70. {mididings-20230111 → mididings-20250818}/NEWS +0 -0
  71. {mididings-20230111 → mididings-20250818}/doc/connect.rst +0 -0
  72. {mididings-20230111 → mididings-20250818}/doc/ctrlrange.png +0 -0
  73. {mididings-20230111 → mididings-20250818}/doc/event.rst +0 -0
  74. {mididings-20230111 → mididings-20250818}/doc/eventflow.png +0 -0
  75. {mididings-20230111 → mididings-20250818}/doc/examples/aeolus.py +0 -0
  76. {mididings-20230111 → mididings-20250818}/doc/examples/hooks.py +0 -0
  77. {mididings-20230111 → mididings-20250818}/doc/examples/klick.py +0 -0
  78. {mididings-20230111 → mididings-20250818}/doc/examples/output.py +0 -0
  79. {mididings-20230111 → mididings-20250818}/doc/examples/process.py +0 -0
  80. {mididings-20230111 → mididings-20250818}/doc/examples/process_file.py +0 -0
  81. {mididings-20230111 → mididings-20250818}/doc/examples/skeleton.py +0 -0
  82. {mididings-20230111 → mididings-20250818}/doc/index.rst +0 -0
  83. {mididings-20230111 → mididings-20250818}/doc/main.rst +0 -0
  84. {mididings-20230111 → mididings-20250818}/doc/man/livedings.scd +0 -0
  85. {mididings-20230111 → mididings-20250818}/doc/man/mididings.scd +0 -0
  86. {mididings-20230111 → mididings-20250818}/doc/man/reproducible-man.sh +0 -0
  87. {mididings-20230111 → mididings-20250818}/doc/man/send_midi.scd +0 -0
  88. {mididings-20230111 → mididings-20250818}/doc/misc.rst +0 -0
  89. {mididings-20230111 → mididings-20250818}/doc/patch.png +0 -0
  90. {mididings-20230111 → mididings-20250818}/doc/start.rst +0 -0
  91. {mididings-20230111 → mididings-20250818}/doc/templates/localtoc.html +0 -0
  92. {mididings-20230111 → mididings-20250818}/doc/theme/nasophon/static/nasophon.css +0 -0
  93. {mididings-20230111 → mididings-20250818}/doc/theme/nasophon/theme.conf +0 -0
  94. {mididings-20230111 → mididings-20250818}/doc/tools.rst +0 -0
  95. {mididings-20230111 → mididings-20250818}/doc/units.rst +0 -0
  96. {mididings-20230111 → mididings-20250818}/doc/velocity.png +0 -0
  97. {mididings-20230111 → mididings-20250818}/doc/velocityslope.png +0 -0
  98. {mididings-20230111 → mididings-20250818}/mididings/constants.py +0 -0
  99. {mididings-20230111 → mididings-20250818}/mididings/extra/__init__.py +0 -0
  100. {mididings-20230111 → mididings-20250818}/mididings/extra/ctrl_sysex.py +0 -0
  101. {mididings-20230111 → mididings-20250818}/mididings/extra/dbus.py +0 -0
  102. {mididings-20230111 → mididings-20250818}/mididings/extra/engine.py +0 -0
  103. {mididings-20230111 → mididings-20250818}/mididings/extra/floating_split.py +0 -0
  104. {mididings-20230111 → mididings-20250818}/mididings/extra/gm.py +0 -0
  105. {mididings-20230111 → mididings-20250818}/mididings/extra/harmonizer.py +0 -0
  106. {mididings-20230111 → mididings-20250818}/mididings/extra/inotify.py +0 -0
  107. {mididings-20230111 → mididings-20250818}/mididings/extra/key_color.py +0 -0
  108. {mididings-20230111 → mididings-20250818}/mididings/extra/latch.py +0 -0
  109. {mididings-20230111 → mididings-20250818}/mididings/extra/memorize_scene.py +0 -0
  110. {mididings-20230111 → mididings-20250818}/mididings/extra/panic.py +0 -0
  111. {mididings-20230111 → mididings-20250818}/mididings/extra/pedal_noteoff.py +0 -0
  112. {mididings-20230111 → mididings-20250818}/mididings/extra/per_channel.py +0 -0
  113. {mididings-20230111 → mididings-20250818}/mididings/extra/polyphony.py +0 -0
  114. {mididings-20230111 → mididings-20250818}/mididings/extra/suppress_pc.py +0 -0
  115. {mididings-20230111 → mididings-20250818}/mididings/extra/voices.py +0 -0
  116. {mididings-20230111 → mididings-20250818}/mididings/live/__init__.py +0 -0
  117. {mididings-20230111 → mididings-20250818}/mididings/live/widgets.py +0 -0
  118. {mididings-20230111 → mididings-20250818}/mididings/misc.py +0 -0
  119. {mididings-20230111 → mididings-20250818}/mididings/scene.py +0 -0
  120. {mididings-20230111 → mididings-20250818}/mididings/setup.py +0 -0
  121. {mididings-20230111 → mididings-20250818}/mididings/units/__init__.py +0 -0
  122. {mididings-20230111 → mididings-20250818}/mididings/units/base.py +0 -0
  123. {mididings-20230111 → mididings-20250818}/mididings/units/call.py +0 -0
  124. {mididings-20230111 → mididings-20250818}/mididings/units/engine.py +0 -0
  125. {mididings-20230111 → mididings-20250818}/mididings/units/filters.py +0 -0
  126. {mididings-20230111 → mididings-20250818}/mididings/units/generators.py +0 -0
  127. {mididings-20230111 → mididings-20250818}/mididings/units/init.py +0 -0
  128. {mididings-20230111 → mididings-20250818}/mididings/units/modifiers.py +0 -0
  129. {mididings-20230111 → mididings-20250818}/mididings/units/printing.py +0 -0
  130. {mididings-20230111 → mididings-20250818}/mididings/units/splits.py +0 -0
  131. {mididings-20230111 → mididings-20250818}/scripts/send_midi +0 -0
  132. {mididings-20230111 → mididings-20250818}/src/backend/alsa.cc +0 -0
  133. {mididings-20230111 → mididings-20250818}/src/backend/alsa.hh +0 -0
  134. {mididings-20230111 → mididings-20250818}/src/backend/base.cc +0 -0
  135. {mididings-20230111 → mididings-20250818}/src/backend/jack.cc +0 -0
  136. {mididings-20230111 → mididings-20250818}/src/backend/jack.hh +0 -0
  137. {mididings-20230111 → mididings-20250818}/src/backend/jack_buffered.cc +0 -0
  138. {mididings-20230111 → mididings-20250818}/src/backend/jack_buffered.hh +0 -0
  139. {mididings-20230111 → mididings-20250818}/src/backend/jack_realtime.cc +0 -0
  140. {mididings-20230111 → mididings-20250818}/src/backend/jack_realtime.hh +0 -0
  141. {mididings-20230111 → mididings-20250818}/src/curious_alloc.hh +0 -0
  142. {mididings-20230111 → mididings-20250818}/src/engine.cc +0 -0
  143. {mididings-20230111 → mididings-20250818}/src/engine.hh +0 -0
  144. {mididings-20230111 → mididings-20250818}/src/midi_event.hh +0 -0
  145. {mididings-20230111 → mididings-20250818}/src/patch.cc +0 -0
  146. {mididings-20230111 → mididings-20250818}/src/python_caller.cc +0 -0
  147. {mididings-20230111 → mididings-20250818}/src/python_caller.hh +0 -0
  148. {mididings-20230111 → mididings-20250818}/src/send_midi.cc +0 -0
  149. {mididings-20230111 → mididings-20250818}/src/send_midi.hh +0 -0
  150. {mididings-20230111 → mididings-20250818}/src/units/call.hh +0 -0
  151. {mididings-20230111 → mididings-20250818}/src/units/engine.hh +0 -0
  152. {mididings-20230111 → mididings-20250818}/src/units/filters.hh +0 -0
  153. {mididings-20230111 → mididings-20250818}/src/units/generators.hh +0 -0
  154. {mididings-20230111 → mididings-20250818}/src/units/modifiers.hh +0 -0
  155. {mididings-20230111 → mididings-20250818}/src/units/util.hh +0 -0
  156. {mididings-20230111 → mididings-20250818}/src/util/debug.hh +0 -0
  157. {mididings-20230111 → mididings-20250818}/src/util/from_python_converter.hh +0 -0
  158. {mididings-20230111 → mididings-20250818}/src/util/is_shared_ptr.hh +0 -0
  159. {mididings-20230111 → mididings-20250818}/src/util/iterator_range.hh +0 -0
  160. {mididings-20230111 → mididings-20250818}/src/util/python.hh +0 -0
  161. {mididings-20230111 → mididings-20250818}/src/util/python_bytes_converters.hh +0 -0
  162. {mididings-20230111 → mididings-20250818}/src/util/python_dict_converters.hh +0 -0
  163. {mididings-20230111 → mididings-20250818}/src/util/python_sequence_converters.hh +0 -0
  164. {mididings-20230111 → mididings-20250818}/src/util/ringbuffer.hh +0 -0
  165. {mididings-20230111 → mididings-20250818}/src/util/string.hh +0 -0
  166. {mididings-20230111 → mididings-20250818}/src/util/to_python_converter.hh +0 -0
  167. {mididings-20230111 → mididings-20250818}/tests/__init__.py +0 -0
  168. {mididings-20230111 → mididings-20250818}/tests/helpers.py +0 -0
  169. {mididings-20230111 → mididings-20250818}/tests/test_arguments.py +0 -0
  170. {mididings-20230111 → mididings-20250818}/tests/test_engine.py +0 -0
  171. {mididings-20230111 → mididings-20250818}/tests/test_event.py +0 -0
  172. {mididings-20230111 → mididings-20250818}/tests/test_overload.py +0 -0
  173. {mididings-20230111 → mididings-20250818}/tests/test_patch.py +0 -0
  174. {mididings-20230111 → mididings-20250818}/tests/test_setup.py +0 -0
  175. {mididings-20230111 → mididings-20250818}/tests/test_util.py +0 -0
  176. {mididings-20230111 → mididings-20250818}/tests/units/__init__.py +0 -0
  177. {mididings-20230111 → mididings-20250818}/tests/units/test_base.py +0 -0
  178. {mididings-20230111 → mididings-20250818}/tests/units/test_call.py +0 -0
  179. {mididings-20230111 → mididings-20250818}/tests/units/test_engine.py +0 -0
  180. {mididings-20230111 → mididings-20250818}/tests/units/test_filters.py +0 -0
  181. {mididings-20230111 → mididings-20250818}/tests/units/test_generators.py +0 -0
  182. {mididings-20230111 → mididings-20250818}/tests/units/test_modifiers.py +0 -0
  183. {mididings-20230111 → mididings-20250818}/tests/units/test_splits.py +0 -0
@@ -0,0 +1,44 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: Python package
5
+
6
+ on:
7
+ push:
8
+ branches: [ "primary", "github-ci" ]
9
+ pull_request:
10
+ branches: [ "primary" ]
11
+
12
+ jobs:
13
+ build:
14
+
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ os: ["ubuntu-22.04", "ubuntu-24.04"]
20
+ python-version: ["3.9", "3.10", "3.11"]
21
+ exclude:
22
+ # ubuntu-22.04 and python 3.11 don't work for mididings
23
+ - os: "ubuntu-22.04"
24
+ python-version: "3.11"
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v3
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ - name: Install System dependencies
32
+ run: |
33
+ python -m pip install yq
34
+ tomlq '."${{ matrix.os }}"."pkgs"[]' pkglist.toml | xargs sudo apt-get install
35
+ - name: Install Python dependencies
36
+ run: |
37
+ python -m pip install --upgrade pip
38
+ python -m pip install flake8 pytest meson-python
39
+ - name: Build and Install
40
+ run: |
41
+ python -m pip install .
42
+ - name: Test with pytest
43
+ run: |
44
+ pytest
@@ -0,0 +1,11 @@
1
+ build
2
+ dist
3
+ *.egg-info
4
+ __pycache__
5
+ .pytest_cache
6
+ .ruff_cache
7
+ doc/man/*.1
8
+ # emacs temporary files
9
+ *~
10
+ \#*
11
+ .\#*
@@ -14,7 +14,7 @@ include .reuse/dep5
14
14
  recursive-include mididings *.py
15
15
 
16
16
  # extension source
17
- recursive-include src SConstruct *.hh *.cc
17
+ recursive-include src *.hh *.cc
18
18
 
19
19
  # tests
20
20
  recursive-include tests *.py
@@ -1,40 +1,36 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: mididings
3
- Version: 20230111
3
+ Version: 20250818
4
4
  Summary: A MIDI router/processor
5
- Author-email: Dominic Sacré <dominic.sacre@gmx.de>
6
- Maintainer-email: George Rawlinson <george@rawlinson.net.nz>
7
- License: # Licenses
8
-
9
- mididings is available under the terms of the
10
- [GNU General Public License, version 2 or later][spdx-gpl2].
11
-
12
- The example scripts in `doc/examples` are available under the terms of the
13
- [GNU Free Documentation License 1.3 or later][spdx-gfdl].
14
-
15
- For your convenience, a copy of all licenses can be found in the `LICENSES`
16
- directory.
17
-
18
- [spdx-gpl2]: https://spdx.org/licenses/GPL-2.0-or-later.html
19
- [spdx-gfdl]: https://spdx.org/licenses/GFDL-1.3-or-later.html
20
-
21
- Project-URL: homepage, https://github.com/mididings/mididings
22
- Project-URL: documentation, https://mididings.github.io/mididings/
5
+ Author-Email: =?utf-8?q?Dominic_Sacr=C3=A9?= <dominic.sacre@gmx.de>
6
+ Maintainer-Email: George Rawlinson <george@rawlinson.net.nz>
7
+ License-File: LICENSE.md
8
+ License-File: LICENSES/GFDL-1.3-or-later.txt
9
+ License-File: LICENSES/GPL-2.0-or-later.txt
23
10
  Classifier: Topic :: Multimedia :: Sound/Audio :: MIDI
24
11
  Classifier: Programming Language :: Python :: 3
25
- Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
26
- Classifier: License :: OSI Approved :: GNU Free Documentation License (FDL)
27
12
  Classifier: Development Status :: 5 - Production/Stable
28
- Requires-Python: >=3.7
29
- Description-Content-Type: text/markdown
13
+ Project-URL: homepage, https://github.com/mididings/mididings
14
+ Project-URL: documentation, https://mididings.github.io/mididings/
15
+ Requires-Python: >=3.9
16
+ Requires-Dist: decorator
17
+ Requires-Dist: boost
30
18
  Provides-Extra: osc
19
+ Requires-Dist: pyliblo3; extra == "osc"
31
20
  Provides-Extra: smf
21
+ Requires-Dist: pysmf; extra == "smf"
32
22
  Provides-Extra: autorestart
23
+ Requires-Dist: pyinotify>=0.8; extra == "autorestart"
33
24
  Provides-Extra: dbus
25
+ Requires-Dist: dbus-python; extra == "dbus"
34
26
  Provides-Extra: xdg
27
+ Requires-Dist: pyxdg; extra == "xdg"
35
28
  Provides-Extra: doc
29
+ Requires-Dist: sphinx; extra == "doc"
30
+ Requires-Dist: sphinxcontrib-fulltoc; extra == "doc"
36
31
  Provides-Extra: test
37
- License-File: LICENSE.md
32
+ Requires-Dist: pytest; extra == "test"
33
+ Description-Content-Type: text/markdown
38
34
 
39
35
  # mididings
40
36
 
@@ -82,8 +78,8 @@ mididings is available as [`mididings`][pkg-pypi] on PyPi:
82
78
  pip install mididings
83
79
  ```
84
80
 
85
- Optional dependencies can be installed, see next section
86
- (Dependencies/Optional)for a list of optional dependencies.
81
+ Additionally you can tell pip to install dependencies for optional features (called `extras`)
82
+ Which ones there are you can lookup in `pyproject.toml`, too.
87
83
 
88
84
  ```sh
89
85
  pip install mididings[osc,smf,dbus,autorestart,xdg]
@@ -98,6 +94,63 @@ official repositories:
98
94
  pacman -Syu mididings
99
95
  ```
100
96
 
97
+ ### Source
98
+
99
+ If you want to test a new version of mididings or develop it, it's easiest to use a virtual environment (venv) into which mididings and all its dependencies are installed without touching a possibly system-wide installation of mididings.
100
+ Execute this in the root of this repository:
101
+ ```sh
102
+ # create and activate the venv
103
+ python -m venv venv
104
+ source venv/bin/activate
105
+ # install mididings
106
+ pip install .
107
+ ```
108
+
109
+ Optional dependencies work just as when installing mididings from PyPI.
110
+ If you want e.g., MIDI file support and the tools to generate html documentation, you'd activate `smf` and `doc`:
111
+ ```sh
112
+ pip install .[smf,doc]
113
+ ```
114
+
115
+ You can check if mididings installed correctly by looking up it's path.
116
+ ```sh
117
+ which mididings
118
+ ```
119
+
120
+ This should point to a file inside `venv`.
121
+ As long as you are in this environment you can edit the sources and rebuild by executing pip again.
122
+
123
+ If you want to come back at a later time or have a second shell in the environment, just source the `activate` script:
124
+ ```sh
125
+ source venv/bin/activate
126
+ ```
127
+
128
+ #### System-wide installation
129
+ Make sure you have all dependencies installed, either through your package manager, pip or any other method (have a look at the list of dependencies in `pyproject.toml`)
130
+ If you want documentation, you also need [scdoc][scdoc] & [sphinx][sphinx] installed during the build process.
131
+
132
+ ```sh
133
+ meson build --prefix=/usr/local
134
+ meson compile -C build
135
+ meson install -C build
136
+ ```
137
+
138
+ ### Packaging
139
+ There are a few build options that might be of interest to you if you are a package maintainer.
140
+ You can disable generating the documentation:
141
+ ```sh
142
+ meson build -Ddocs=disabled -Dman=disabled
143
+ ```
144
+
145
+ You can also generate the docs separately:
146
+ ```sh
147
+ meson build -Ddocs-only=true
148
+ meson compile -C build
149
+ meson install
150
+ ```
151
+ Note: You need to have mididings (and the matching version of it) installed, possibly in a venv, during build when using `docs-only=true`.
152
+
153
+ ## Development
101
154
  ## Dependencies
102
155
 
103
156
  ### Required
@@ -111,17 +164,29 @@ pacman -Syu mididings
111
164
 
112
165
  ### Optional
113
166
 
114
- * [pyliblo][pyliblo]: to send or receieve OSC messages
167
+ * [pyliblo3][pyliblo3]: to send or receieve OSC messages
115
168
  * [pysmf][pysmf]: to read/write standard MIDI files using the `process_file()` function
116
169
  * [dbus-python][dbus-python]: to send DBUS messages
117
170
  * [pyinotify][pyinotify]: to automatically restart when a script changes
118
171
  * [tkinter][tkinter]: for the livedings GUI
119
172
  * [pyxdg][pyxdg]: so mididings knows where to look for configuration files
120
173
 
174
+ ### During Build
175
+ * [scdoc][scdoc]: to generate man pages
176
+ * [sphinx][sphinx]: and potentially more modules for it to generate html documentation (see `pyproject.toml`)
177
+
121
178
  ## Documentation
122
179
 
123
- Documentation is currently being worked on, the original
124
- [homepage][original-home] & [documentation][original-docs] are valuable resources.
180
+ * [API documentation][api-docs]
181
+ * [GitHub Wiki][gh-wiki]
182
+
183
+ Some links that might also be of interest:
184
+
185
+ * [Original homepage][original-home]
186
+ * [Original documentation][original-docs]
187
+ * [QJackCtl and the Patchbay][qjack]
188
+ * [The Python Tutorial][py-tutorial]
189
+ * [Guide to the MIDI specification][midi-spec]
125
190
 
126
191
  ## Support
127
192
 
@@ -139,7 +204,7 @@ The example scripts in `doc/examples` are available under the terms of the
139
204
  [GNU Free Documentation License 1.3 or later][spdx-gfdl].
140
205
 
141
206
  [pkg-pypi]: https://pypi.org/project/mididings/
142
- [pkg-arch]: https://archlinux.org/packages/community/x86_64/mididings/
207
+ [pkg-arch]: https://archlinux.org/packages/extra/x86_64/mididings/
143
208
  [original-home]: https://das.nasophon.de/mididings/
144
209
  [original-docs]: https://dsacre.github.io/mididings/doc/
145
210
  [python]: https://www.python.org
@@ -148,12 +213,20 @@ The example scripts in `doc/examples` are available under the terms of the
148
213
  [boost]: https://www.boost.org
149
214
  [glib]: https://docs.gtk.org/glib/
150
215
  [decorator]: https://github.com/micheles/decorator
151
- [pyliblo]: https://github.com/dsacre/pyliblo
216
+ [scdoc]: https://git.sr.ht/~sircmpwn/scdoc
217
+ [just]: https://github.com/casey/just
218
+ [pyliblo]: https://github.com/gesellkammer/pyliblo3
152
219
  [pysmf]: https://github.com/dsacre/pysmf
153
220
  [dbus-python]: https://www.freedesktop.org/wiki/Software/dbus/
154
221
  [pyinotify]: https://github.com/seb-m/pyinotify
155
222
  [tkinter]: https://docs.python.org/3/library/tkinter.html
156
223
  [pyxdg]: https://freedesktop.org/wiki/Software/pyxdg/
224
+ [api-docs]: https://mididings.github.io/mididings/
225
+ [gh-wiki]: https://github.com/mididings/mididings/wiki
226
+ [qjack]: https://www.rncbc.org/drupal/node/76
227
+ [py-tutorial]: https://docs.python.org/3/tutorial/
228
+ [midi-spec]: http://www.somascape.org/midi/tech/spec.html
157
229
  [mailing-list]: https://groups.google.com/g/mididings
158
230
  [spdx-gpl2]: https://spdx.org/licenses/GPL-2.0-or-later.html
159
231
  [spdx-gfdl]: https://spdx.org/licenses/GFDL-1.3-or-later.html
232
+ [sphinx]: https://www.sphinx-doc.org/en/master/
@@ -1,41 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: mididings
3
- Version: 20230111
4
- Summary: A MIDI router/processor
5
- Author-email: Dominic Sacré <dominic.sacre@gmx.de>
6
- Maintainer-email: George Rawlinson <george@rawlinson.net.nz>
7
- License: # Licenses
8
-
9
- mididings is available under the terms of the
10
- [GNU General Public License, version 2 or later][spdx-gpl2].
11
-
12
- The example scripts in `doc/examples` are available under the terms of the
13
- [GNU Free Documentation License 1.3 or later][spdx-gfdl].
14
-
15
- For your convenience, a copy of all licenses can be found in the `LICENSES`
16
- directory.
17
-
18
- [spdx-gpl2]: https://spdx.org/licenses/GPL-2.0-or-later.html
19
- [spdx-gfdl]: https://spdx.org/licenses/GFDL-1.3-or-later.html
20
-
21
- Project-URL: homepage, https://github.com/mididings/mididings
22
- Project-URL: documentation, https://mididings.github.io/mididings/
23
- Classifier: Topic :: Multimedia :: Sound/Audio :: MIDI
24
- Classifier: Programming Language :: Python :: 3
25
- Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
26
- Classifier: License :: OSI Approved :: GNU Free Documentation License (FDL)
27
- Classifier: Development Status :: 5 - Production/Stable
28
- Requires-Python: >=3.7
29
- Description-Content-Type: text/markdown
30
- Provides-Extra: osc
31
- Provides-Extra: smf
32
- Provides-Extra: autorestart
33
- Provides-Extra: dbus
34
- Provides-Extra: xdg
35
- Provides-Extra: doc
36
- Provides-Extra: test
37
- License-File: LICENSE.md
38
-
39
1
  # mididings
40
2
 
41
3
  A MIDI router/processor based on Python, supporting ALSA and JACK MIDI.
@@ -82,8 +44,8 @@ mididings is available as [`mididings`][pkg-pypi] on PyPi:
82
44
  pip install mididings
83
45
  ```
84
46
 
85
- Optional dependencies can be installed, see next section
86
- (Dependencies/Optional)for a list of optional dependencies.
47
+ Additionally you can tell pip to install dependencies for optional features (called `extras`)
48
+ Which ones there are you can lookup in `pyproject.toml`, too.
87
49
 
88
50
  ```sh
89
51
  pip install mididings[osc,smf,dbus,autorestart,xdg]
@@ -98,6 +60,63 @@ official repositories:
98
60
  pacman -Syu mididings
99
61
  ```
100
62
 
63
+ ### Source
64
+
65
+ If you want to test a new version of mididings or develop it, it's easiest to use a virtual environment (venv) into which mididings and all its dependencies are installed without touching a possibly system-wide installation of mididings.
66
+ Execute this in the root of this repository:
67
+ ```sh
68
+ # create and activate the venv
69
+ python -m venv venv
70
+ source venv/bin/activate
71
+ # install mididings
72
+ pip install .
73
+ ```
74
+
75
+ Optional dependencies work just as when installing mididings from PyPI.
76
+ If you want e.g., MIDI file support and the tools to generate html documentation, you'd activate `smf` and `doc`:
77
+ ```sh
78
+ pip install .[smf,doc]
79
+ ```
80
+
81
+ You can check if mididings installed correctly by looking up it's path.
82
+ ```sh
83
+ which mididings
84
+ ```
85
+
86
+ This should point to a file inside `venv`.
87
+ As long as you are in this environment you can edit the sources and rebuild by executing pip again.
88
+
89
+ If you want to come back at a later time or have a second shell in the environment, just source the `activate` script:
90
+ ```sh
91
+ source venv/bin/activate
92
+ ```
93
+
94
+ #### System-wide installation
95
+ Make sure you have all dependencies installed, either through your package manager, pip or any other method (have a look at the list of dependencies in `pyproject.toml`)
96
+ If you want documentation, you also need [scdoc][scdoc] & [sphinx][sphinx] installed during the build process.
97
+
98
+ ```sh
99
+ meson build --prefix=/usr/local
100
+ meson compile -C build
101
+ meson install -C build
102
+ ```
103
+
104
+ ### Packaging
105
+ There are a few build options that might be of interest to you if you are a package maintainer.
106
+ You can disable generating the documentation:
107
+ ```sh
108
+ meson build -Ddocs=disabled -Dman=disabled
109
+ ```
110
+
111
+ You can also generate the docs separately:
112
+ ```sh
113
+ meson build -Ddocs-only=true
114
+ meson compile -C build
115
+ meson install
116
+ ```
117
+ Note: You need to have mididings (and the matching version of it) installed, possibly in a venv, during build when using `docs-only=true`.
118
+
119
+ ## Development
101
120
  ## Dependencies
102
121
 
103
122
  ### Required
@@ -111,17 +130,29 @@ pacman -Syu mididings
111
130
 
112
131
  ### Optional
113
132
 
114
- * [pyliblo][pyliblo]: to send or receieve OSC messages
133
+ * [pyliblo3][pyliblo3]: to send or receieve OSC messages
115
134
  * [pysmf][pysmf]: to read/write standard MIDI files using the `process_file()` function
116
135
  * [dbus-python][dbus-python]: to send DBUS messages
117
136
  * [pyinotify][pyinotify]: to automatically restart when a script changes
118
137
  * [tkinter][tkinter]: for the livedings GUI
119
138
  * [pyxdg][pyxdg]: so mididings knows where to look for configuration files
120
139
 
140
+ ### During Build
141
+ * [scdoc][scdoc]: to generate man pages
142
+ * [sphinx][sphinx]: and potentially more modules for it to generate html documentation (see `pyproject.toml`)
143
+
121
144
  ## Documentation
122
145
 
123
- Documentation is currently being worked on, the original
124
- [homepage][original-home] & [documentation][original-docs] are valuable resources.
146
+ * [API documentation][api-docs]
147
+ * [GitHub Wiki][gh-wiki]
148
+
149
+ Some links that might also be of interest:
150
+
151
+ * [Original homepage][original-home]
152
+ * [Original documentation][original-docs]
153
+ * [QJackCtl and the Patchbay][qjack]
154
+ * [The Python Tutorial][py-tutorial]
155
+ * [Guide to the MIDI specification][midi-spec]
125
156
 
126
157
  ## Support
127
158
 
@@ -139,7 +170,7 @@ The example scripts in `doc/examples` are available under the terms of the
139
170
  [GNU Free Documentation License 1.3 or later][spdx-gfdl].
140
171
 
141
172
  [pkg-pypi]: https://pypi.org/project/mididings/
142
- [pkg-arch]: https://archlinux.org/packages/community/x86_64/mididings/
173
+ [pkg-arch]: https://archlinux.org/packages/extra/x86_64/mididings/
143
174
  [original-home]: https://das.nasophon.de/mididings/
144
175
  [original-docs]: https://dsacre.github.io/mididings/doc/
145
176
  [python]: https://www.python.org
@@ -148,12 +179,20 @@ The example scripts in `doc/examples` are available under the terms of the
148
179
  [boost]: https://www.boost.org
149
180
  [glib]: https://docs.gtk.org/glib/
150
181
  [decorator]: https://github.com/micheles/decorator
151
- [pyliblo]: https://github.com/dsacre/pyliblo
182
+ [scdoc]: https://git.sr.ht/~sircmpwn/scdoc
183
+ [just]: https://github.com/casey/just
184
+ [pyliblo]: https://github.com/gesellkammer/pyliblo3
152
185
  [pysmf]: https://github.com/dsacre/pysmf
153
186
  [dbus-python]: https://www.freedesktop.org/wiki/Software/dbus/
154
187
  [pyinotify]: https://github.com/seb-m/pyinotify
155
188
  [tkinter]: https://docs.python.org/3/library/tkinter.html
156
189
  [pyxdg]: https://freedesktop.org/wiki/Software/pyxdg/
190
+ [api-docs]: https://mididings.github.io/mididings/
191
+ [gh-wiki]: https://github.com/mididings/mididings/wiki
192
+ [qjack]: https://www.rncbc.org/drupal/node/76
193
+ [py-tutorial]: https://docs.python.org/3/tutorial/
194
+ [midi-spec]: http://www.somascape.org/midi/tech/spec.html
157
195
  [mailing-list]: https://groups.google.com/g/mididings
158
196
  [spdx-gpl2]: https://spdx.org/licenses/GPL-2.0-or-later.html
159
197
  [spdx-gfdl]: https://spdx.org/licenses/GFDL-1.3-or-later.html
198
+ [sphinx]: https://www.sphinx-doc.org/en/master/
@@ -0,0 +1,69 @@
1
+ version = 1
2
+ SPDX-PackageName = "mididings"
3
+ SPDX-PackageSupplier = "George Rawlinson <george@rawlinson.net.nz>"
4
+ SPDX-PackageDownloadLocation = "https://github.com/mididings/mididings"
5
+
6
+ # documentation
7
+ [[annotations]]
8
+ path = [
9
+ "doc/conf.py",
10
+ "doc/**.rst",
11
+ "doc/**.html",
12
+ "doc/**.css",
13
+ "doc/**.conf",
14
+ "doc/**.png"
15
+ ]
16
+ precedence = "aggregate"
17
+ SPDX-FileCopyrightText = "2008-2015 Dominic Sacré <dominic.sacre@gmx.de>, mididings contributors"
18
+ SPDX-License-Identifier = "GPL-2.0-or-later"
19
+
20
+ # documentation - example scripts
21
+ [[annotations]]
22
+ path = "doc/examples/**.py"
23
+ precedence = "aggregate"
24
+ SPDX-FileCopyrightText = "2008-2015 Dominic Sacré <dominic.sacre@gmx.de>, mididings contributors"
25
+ SPDX-License-Identifier = "GFDL-1.3-or-later"
26
+
27
+ # build scripts
28
+ [[annotations]]
29
+ path = [
30
+ "meson.build",
31
+ "meson_options.txt",
32
+ "justfile",
33
+ "dev/get-buildpath.py",
34
+ "dev/update-version-strings.sh",
35
+ "doc/meson.build",
36
+ "doc/mesonconf.py.in",
37
+ ".github/workflows/python-package.yml",
38
+ "pkglist.toml"
39
+ ]
40
+ precedence = "aggregate"
41
+ SPDX-FileCopyrightText = "mididings contributors"
42
+ SPDX-License-Identifier = "GFDL-1.3-or-later"
43
+
44
+ # more documentation
45
+ [[annotations]]
46
+ path = [
47
+ "NEWS",
48
+ "README.md",
49
+ "MANIFEST.in",
50
+ "setup.py",
51
+ "pyproject.toml",
52
+ ".gitignore",
53
+ "doc/man/**"
54
+ ]
55
+ precedence = "aggregate"
56
+ SPDX-FileCopyrightText = "mididings contributors"
57
+ SPDX-License-Identifier = "GPL-2.0-or-later"
58
+
59
+ # source code
60
+ [[annotations]]
61
+ path = [
62
+ "mididings/**",
63
+ "src/**",
64
+ "tests/**",
65
+ "scripts/**",
66
+ ]
67
+ precedence = "aggregate"
68
+ SPDX-FileCopyrightText = "mididings contributors"
69
+ SPDX-License-Identifier = "GPL-2.0-or-later"
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env python3
2
+
3
+ import platform
4
+ import os
5
+
6
+ # python -m build creates temporary directories when building the package,
7
+ # we can use these temporary directories instead of installing the package
8
+ # afterwards. the format of this path is as follows:
9
+ # $(pwd)/build/lib.linux-x86_64-cpython-310
10
+
11
+ cwd = os.getcwd()
12
+ system = platform.system().lower()
13
+ arch = platform.machine()
14
+ impl = platform.python_implementation().lower()
15
+ pyver = "".join(map(str, platform.python_version_tuple()[:2]))
16
+
17
+ print(f"{cwd}/build/lib.{system}-{arch}-{impl}-{pyver}")
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+
3
+ NEW_VERSION="$(date +%Y%m%d)"
4
+
5
+ # pyproject.toml
6
+ sed -e "s/\(^project.*,\) *version *: *'[^']*'/\1 version: '${NEW_VERSION}'/" -i meson.build
7
+
@@ -0,0 +1,64 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ import re
4
+
5
+ from sphinx.domains.python import PyFunction
6
+ from sphinx import addnodes
7
+
8
+ import mesonconf
9
+
10
+ # project-specific configuration
11
+ project = "mididings"
12
+ copyright = "mididings contributors"
13
+ version = mesonconf.version
14
+
15
+ # general configuration
16
+ extensions = [
17
+ "sphinx.ext.autodoc",
18
+ "sphinxcontrib.fulltoc",
19
+ ]
20
+ root_doc = "index"
21
+ exclude_patterns = ["build"]
22
+ templates_path = ["templates"]
23
+ add_module_names = False
24
+
25
+ # html configuration
26
+ html_theme = "nasophon"
27
+ html_theme_path = ["theme"]
28
+ html_copy_source = False
29
+
30
+ # extension configuration - autodoc
31
+ autodoc_member_order = "bysource"
32
+ autodoc_default_options = {
33
+ "members": True,
34
+ "undoc-members": True,
35
+ }
36
+
37
+
38
+ class DingsFunction(PyFunction):
39
+ """
40
+ Stripped-down version of the 'function::' directive that accepts an
41
+ additional argument in angle brackets, used to specify the node's
42
+ 'fullname' attribute. This allows proper cross-references to mididings
43
+ operators.
44
+ """
45
+
46
+ def handle_signature(self, sig, signode):
47
+ m = re.match("(.*) <([\w.]*)>", sig)
48
+ if m:
49
+ op = m.group(1)
50
+ name = m.group(2)
51
+ modname = self.options.get("module", self.env.temp_data.get("py:module"))
52
+
53
+ signode["module"] = modname
54
+ signode["class"] = ""
55
+ signode["fullname"] = name
56
+ signode += addnodes.desc_name(op, op)
57
+
58
+ return name, None
59
+ else:
60
+ return super(PyFunction, self).handle_signature(sig, signode)
61
+
62
+
63
+ def setup(app):
64
+ app.add_directive("dingsfun", DingsFunction)
@@ -5,4 +5,6 @@ This module contains functions to query or control the state of the mididings
5
5
  event processing engine from Python code.
6
6
 
7
7
  .. automodule:: mididings.engine
8
- :exclude-members: run, process_file, Engine
8
+ :members:
9
+ :no-undoc-members:
10
+ :exclude-members: run, Engine
@@ -6,8 +6,8 @@
6
6
  # /mididings/switch_scene <port> <channel>
7
7
  # to UDP port 56418.
8
8
  #
9
- # For example, using the send_osc command from pyliblo:
10
- # $ send_osc 56418 /mididings/switch_scene 13 1
9
+ # For example, using the send_osc command from pyliblo3:
10
+ # $ send_osc.py 56418 /mididings/switch_scene 13 1
11
11
  #
12
12
 
13
13
  from mididings import *
@@ -86,7 +86,7 @@ Messaging
86
86
  .. autofunction:: mididings.extra.osc.SendOSC
87
87
 
88
88
  Defined in :mod:`mididings.extra.osc`.
89
- Requires `pyliblo <http://das.nasophon.de/pyliblo/>`_.
89
+ Requires `pyliblo3 <https://github.com/gesellkammer/pyliblo3>`_.
90
90
 
91
91
  .. autofunction:: mididings.extra.dbus.SendDBUS
92
92
 
@@ -32,7 +32,7 @@ function.
32
32
  :no-members:
33
33
 
34
34
  Defined in :mod:`mididings.extra.osc`.
35
- Requires `pyliblo <http://das.nasophon.de/pyliblo/>`_.
35
+ Requires `pyliblo3 <https://github.com/gesellkammer/pyliblo3>`_.
36
36
 
37
37
 
38
38
 
@@ -0,0 +1,26 @@
1
+ scdoc = find_program('scdoc', required: false)
2
+ if get_option('man').enabled() and scdoc.found()
3
+
4
+ man_pages = {
5
+ 'mididings': '1',
6
+ 'livedings': '1',
7
+ 'send_midi': '1',
8
+ }
9
+
10
+ foreach page, section : man_pages
11
+ name = f'@page@.@section@'
12
+ input = f'@page@.scd'
13
+ custom_target(input,
14
+ input: files(input),
15
+ output: name,
16
+ command: scdoc,
17
+ feed: true,
18
+ capture: true,
19
+ install: true,
20
+ install_dir: get_option('mandir') / f'man@section@',
21
+ )
22
+ endforeach
23
+
24
+ elif get_option('man').enabled()
25
+ warning('The program scdoc could not be found, man pages will not be available.')
26
+ endif