Skip to content

Commit 1a44da7

Browse files
authored
Merge pull request #57 from matthewbadeau/main
Add ActiveSensing message
2 parents 7d4c2c2 + 13dafb3 commit 1a44da7

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

adafruit_midi/active_sensing.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SPDX-FileCopyrightText: 2024 Matthew Badeau
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
"""
6+
`adafruit_midi.active_sensing`
7+
================================================================================
8+
9+
Active Sensing MIDI message.
10+
11+
12+
* Author(s): Matthew Badeau
13+
14+
Implementation Notes
15+
--------------------
16+
17+
"""
18+
19+
from .midi_message import MIDIMessage
20+
21+
__version__ = "0.0.0+auto.0"
22+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MIDI.git"
23+
24+
25+
class ActiveSensing(MIDIMessage):
26+
"""Active Sensing MIDI message.
27+
28+
Active Sensing message is a keepalive message sent every 300 milliseconds
29+
to tell the bus that the session is still good and alive.
30+
"""
31+
32+
_STATUS = 0xFE
33+
_STATUSMASK = 0xFF
34+
LENGTH = 1
35+
_slots = []
36+
37+
38+
ActiveSensing.register_message_type()

0 commit comments

Comments
 (0)