1
- # The MIT License (MIT)
1
+ # SPDX-FileCopyrightText: 2019 Kevin J. Walters for Adafruit Industries
2
2
#
3
- # Copyright (c) 2019 Kevin J. Walters
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # SPDX-License-Identifier: MIT
4
+
22
5
"""
23
6
`adafruit_midi.midi_message`
24
7
================================================================================
@@ -119,7 +102,7 @@ def __init__(self, *, channel=None):
119
102
@property
120
103
def channel (self ):
121
104
"""The channel number of the MIDI message where appropriate.
122
- This is *updated* by MIDI.send() method.
105
+ This is *updated* by MIDI.send() method.
123
106
"""
124
107
return self ._channel
125
108
@@ -132,7 +115,7 @@ def channel(self, channel):
132
115
@classmethod
133
116
def register_message_type (cls ):
134
117
"""Register a new message by its status value and mask.
135
- This is called automagically at ``import`` time for each message.
118
+ This is called automagically at ``import`` time for each message.
136
119
"""
137
120
### These must be inserted with more specific masks first
138
121
insert_idx = len (MIDIMessage ._statusandmask_to_class )
@@ -287,7 +270,7 @@ def from_message_bytes(cls, midibytes, channel_in):
287
270
# Returns an (immutable) bytes with just the status code in.
288
271
def __bytes__ (self ):
289
272
"""Return the ``bytes`` wire protocol representation of the object
290
- with channel number applied where appropriate."""
273
+ with channel number applied where appropriate."""
291
274
return bytes ([self ._STATUS ])
292
275
293
276
# databytes value present to keep interface uniform but unused
@@ -297,7 +280,7 @@ def __bytes__(self):
297
280
@classmethod
298
281
def from_bytes (cls , msg_bytes ):
299
282
"""Creates an object from the byte stream of the wire protocol
300
- representation of the MIDI message."""
283
+ representation of the MIDI message."""
301
284
return cls ()
302
285
303
286
0 commit comments