From 13dafb3f3888660345780988a525795c87c8c92f Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 18 Sep 2024 20:48:57 +0900 Subject: [PATCH] Add ActiveSensing message --- adafruit_midi/active_sensing.py | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 adafruit_midi/active_sensing.py diff --git a/adafruit_midi/active_sensing.py b/adafruit_midi/active_sensing.py new file mode 100644 index 0000000..c012ddc --- /dev/null +++ b/adafruit_midi/active_sensing.py @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: 2024 Matthew Badeau +# +# SPDX-License-Identifier: MIT + +""" +`adafruit_midi.active_sensing` +================================================================================ + +Active Sensing MIDI message. + + +* Author(s): Matthew Badeau + +Implementation Notes +-------------------- + +""" + +from .midi_message import MIDIMessage + +__version__ = "0.0.0+auto.0" +__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MIDI.git" + + +class ActiveSensing(MIDIMessage): + """Active Sensing MIDI message. + + Active Sensing message is a keepalive message sent every 300 milliseconds + to tell the bus that the session is still good and alive. + """ + + _STATUS = 0xFE + _STATUSMASK = 0xFF + LENGTH = 1 + _slots = [] + + +ActiveSensing.register_message_type()