From d7c4c4662a72efa76151b9a64694fe7ae836bab5 Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Sat, 2 Mar 2024 11:45:39 +1100 Subject: [PATCH] python 3.10 compatibility fix --- technomid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/technomid.py b/technomid.py index 5a8a067..6282641 100644 --- a/technomid.py +++ b/technomid.py @@ -126,7 +126,7 @@ class MIDIWriter: # Up to 4 bytes can encode 7 bits each by setting the continuation bit (bit 8) def encode_varint(self, value: int) -> bytes: if value < 0x80: - return value.to_bytes() + return value.to_bytes(1, byteorder="big") if value < 0x4000: return bytes([0x80 | (value >> 7), value & 0x7F]) if value < 0x200000: