Browse Source

Fix out of bounds apc mini conversion

master
Nils 2 months ago
parent
commit
c6f2a7c5d4
  1. 6
      engine/input_apcmini.py

6
engine/input_apcmini.py

@ -307,7 +307,11 @@ class ApcMiniInput(MidiInput):
else:
color = APCmini_COLOR["yellow"] #for notes longer than one step / factor > 1
self.stepsNotAvailableBecauseOverlayedByFactor.add(apcPitch)
pblobNotes += cbox.Pattern.serialize_event(1, 0x90, apcPitch, color ) #tick in pattern, midi, pitch, velocity
try:
pblobNotes += cbox.Pattern.serialize_event(1, 0x90, apcPitch, color ) #tick in pattern, midi, pitch, velocity
except:
logging.warning(f"Note out of range for APC Mini: {stepDict}. This is safe to ignore, especially if you don't use the device")
pass
# Create a new pattern object using events from the blob
patNotes = cbox.Document.get_song().pattern_from_blob(pblobNotes, 0) #0 ticks.
self.outputScene.play_pattern(patNotes, 150.0) #150 tempo

Loading…
Cancel
Save