Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 0c536bb

Browse files
committed
Fixed type check bug.
1 parent 0ea0133 commit 0c536bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pico_synth_sandbox/midi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def send_note_on(self, notenum, velocity=1.0, channel=None):
192192
"""
193193
self.send_message(NoteOn(
194194
notenum,
195-
int(clamp(velocity) * 127.0) if type(velocity) is type(float) else velocity,
195+
int(clamp(velocity) * 127.0) if type(velocity) is float else velocity,
196196
channel=channel if not channel is None else self._channel
197197
))
198198
def send_note_off(self, notenum, channel=None):
@@ -219,7 +219,7 @@ def send_control_change(self, control, value, channel=None):
219219
"""
220220
self.send_message(ControlChange(
221221
control,
222-
int(clamp(value) * 127.0) if type(value) is type(float) else value,
222+
int(clamp(value) * 127.0) if type(value) is float else value,
223223
channel=channel if not channel is None else self._channel
224224
))
225225
def send_program_change(self, patch, channel=None):

0 commit comments

Comments
 (0)