circuitpython-tmidi 1.0.2__tar.gz → 1.0.4__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 (44) hide show
  1. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/PKG-INFO +3 -5
  2. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/README.rst +0 -3
  3. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/circuitpython_tmidi.egg-info/PKG-INFO +3 -5
  4. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/circuitpython_tmidi.egg-info/SOURCES.txt +1 -0
  5. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/docs/conf.py +2 -2
  6. circuitpython_tmidi-1.0.4/docs/examples.rst +18 -0
  7. circuitpython_tmidi-1.0.4/examples/tmidi_simple_receiver.py +17 -0
  8. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/pyproject.toml +1 -1
  9. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/tmidi.py +2 -2
  10. circuitpython_tmidi-1.0.2/docs/examples.rst +0 -8
  11. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +0 -0
  12. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/.github/workflows/build.yml +0 -0
  13. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/.github/workflows/failure-help-text.yml +0 -0
  14. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/.github/workflows/release_gh.yml +0 -0
  15. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/.github/workflows/release_pypi.yml +0 -0
  16. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/.gitignore +0 -0
  17. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/.pre-commit-config.yaml +0 -0
  18. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/.pylintrc +0 -0
  19. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/.readthedocs.yaml +0 -0
  20. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/CODE_OF_CONDUCT.md +0 -0
  21. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/LICENSE +0 -0
  22. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/LICENSES/CC-BY-4.0.txt +0 -0
  23. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/LICENSES/MIT.txt +0 -0
  24. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/LICENSES/Unlicense.txt +0 -0
  25. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/README.rst.license +0 -0
  26. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/circuitpython_tmidi.egg-info/dependency_links.txt +0 -0
  27. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/circuitpython_tmidi.egg-info/requires.txt +0 -0
  28. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/circuitpython_tmidi.egg-info/top_level.txt +0 -0
  29. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/docs/_static/favicon.ico +0 -0
  30. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/docs/_static/favicon.ico.license +0 -0
  31. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/docs/api.rst +0 -0
  32. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/docs/api.rst.license +0 -0
  33. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/docs/examples.rst.license +0 -0
  34. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/docs/index.rst +0 -0
  35. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/docs/index.rst.license +0 -0
  36. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/docs/requirements.txt +0 -0
  37. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/examples/tmidi_midiforwarder.py +0 -0
  38. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/examples/tmidi_multiple_receiver.py +0 -0
  39. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/examples/tmidi_simpletest.py +0 -0
  40. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/optional_requirements.txt +0 -0
  41. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/requirements.txt +0 -0
  42. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/setup.cfg +0 -0
  43. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/tests/test_one.py +0 -0
  44. {circuitpython_tmidi-1.0.2 → circuitpython_tmidi-1.0.4}/tests/test_tmidi_one.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: circuitpython-tmidi
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: MIDI library for CircuitPython
5
5
  Author-email: Tod Kurt <tod@todbot.com>
6
6
  License: MIT
@@ -16,6 +16,7 @@ Description-Content-Type: text/x-rst
16
16
  License-File: LICENSE
17
17
  Requires-Dist: Adafruit-Blinka
18
18
  Provides-Extra: optional
19
+ Dynamic: license-file
19
20
 
20
21
  Introduction
21
22
  ============
@@ -51,9 +52,6 @@ or individual libraries can be installed using
51
52
 
52
53
  Installing from PyPI
53
54
  =====================
54
- .. note:: This library is not available on PyPI yet. Install documentation is included
55
- as a standard element. Stay tuned for PyPI availability!
56
-
57
55
 
58
56
  On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
59
57
  PyPI <https://pypi.org/project/circuitpython-tmidi/>`_.
@@ -32,9 +32,6 @@ or individual libraries can be installed using
32
32
 
33
33
  Installing from PyPI
34
34
  =====================
35
- .. note:: This library is not available on PyPI yet. Install documentation is included
36
- as a standard element. Stay tuned for PyPI availability!
37
-
38
35
 
39
36
  On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
40
37
  PyPI <https://pypi.org/project/circuitpython-tmidi/>`_.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: circuitpython-tmidi
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: MIDI library for CircuitPython
5
5
  Author-email: Tod Kurt <tod@todbot.com>
6
6
  License: MIT
@@ -16,6 +16,7 @@ Description-Content-Type: text/x-rst
16
16
  License-File: LICENSE
17
17
  Requires-Dist: Adafruit-Blinka
18
18
  Provides-Extra: optional
19
+ Dynamic: license-file
19
20
 
20
21
  Introduction
21
22
  ============
@@ -51,9 +52,6 @@ or individual libraries can be installed using
51
52
 
52
53
  Installing from PyPI
53
54
  =====================
54
- .. note:: This library is not available on PyPI yet. Install documentation is included
55
- as a standard element. Stay tuned for PyPI availability!
56
-
57
55
 
58
56
  On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
59
57
  PyPI <https://pypi.org/project/circuitpython-tmidi/>`_.
@@ -35,6 +35,7 @@ docs/_static/favicon.ico
35
35
  docs/_static/favicon.ico.license
36
36
  examples/tmidi_midiforwarder.py
37
37
  examples/tmidi_multiple_receiver.py
38
+ examples/tmidi_simple_receiver.py
38
39
  examples/tmidi_simpletest.py
39
40
  tests/test_one.py
40
41
  tests/test_tmidi_one.py
@@ -112,10 +112,10 @@ napoleon_numpy_docstring = False
112
112
  # The theme to use for HTML and HTML Help pages. See the documentation for
113
113
  # a list of builtin themes.
114
114
  #
115
- import sphinx_rtd_theme
115
+ # import sphinx_rtd_theme
116
116
 
117
117
  html_theme = "sphinx_rtd_theme"
118
- html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
118
+ # html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
119
119
 
120
120
  # Add any paths that contain custom static files (such as style sheets) here,
121
121
  # relative to this directory. They are copied after the builtin static files,
@@ -0,0 +1,18 @@
1
+ Simple test
2
+ ------------
3
+
4
+ Show how to send MIDI messages.
5
+
6
+ .. literalinclude:: ../examples/tmidi_simpletest.py
7
+ :caption: examples/tmidi_simpletest.py
8
+ :linenos:
9
+
10
+
11
+ Simple receiver
12
+ ---------------
13
+
14
+ Show to to receive MIDI messages.
15
+
16
+ .. literalinclude:: ../examples/tmidi_simple_receiver.py
17
+ :caption: examples/tmidi_simple_receiver.py
18
+ :linenos:
@@ -0,0 +1,17 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024 Tod Kurt
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ # This example shows how to receive MIDI NoteOn and NoteOff messages
6
+
7
+ import usb_midi
8
+ import tmidi
9
+
10
+ midi_usb = tmidi.MIDI(midi_in=usb_midi.ports[0], midi_out=usb_midi.ports[1])
11
+
12
+ while True:
13
+ if msg := midi_usb.receive():
14
+ if msg.type == tmidi.NOTE_ON and msg.velocity > 0:
15
+ print("note on: ", msg.note, msg.velocity)
16
+ elif msg.type == tmidi.NOTE_OFF or msg.velocity == 0:
17
+ print("note off:", msg.note, msg.velocity)
@@ -13,7 +13,7 @@ requires = [
13
13
  [project]
14
14
  name = "circuitpython-tmidi"
15
15
  description = "MIDI library for CircuitPython"
16
- version = "1.0.2"
16
+ version = "1.0.4"
17
17
  readme = "README.rst"
18
18
  authors = [
19
19
  {name = "Tod Kurt", email = "tod@todbot.com"}
@@ -32,7 +32,7 @@ Implementation Notes
32
32
 
33
33
  # imports
34
34
 
35
- __version__ = "1.0.2"
35
+ __version__ = "1.0.4"
36
36
  __repo__ = "https://github.com/todbot/CircuitPython_TMIDI.git"
37
37
 
38
38
  # Portions of this library come from Winterbloom_SmolMIDI:
@@ -216,7 +216,7 @@ class Message:
216
216
  # pylint: disable=consider-using-f-string
217
217
  def __str__(self):
218
218
  mtype = self.type
219
- type_str = "Message(" + _MSG_TYPE_NAMES[mtype]
219
+ type_str = "Message(" + _MSG_TYPE_NAMES.get(mtype, "Unknown")
220
220
  ch_str = "ch:%d" % self.channel if _is_channel_message(mtype) else "-"
221
221
  if mtype == PITCH_BEND:
222
222
  return "%s %s %d)" % (type_str, ch_str, self.pitch_bend)
@@ -1,8 +0,0 @@
1
- Simple test
2
- ------------
3
-
4
- Ensure your device works with this simple test.
5
-
6
- .. literalinclude:: ../examples/tmidi_simpletest.py
7
- :caption: examples/tmidi_simpletest.py
8
- :linenos: