From a1396b9e932bdf842b1817b0b313a34831889a5b Mon Sep 17 00:00:00 2001 From: Mark Slee Date: Sat, 19 Oct 2013 14:26:17 -0700 Subject: [PATCH] Add full DPat compatibility to presets --- DanUtil.pde | 7 ++++--- _MIDI.pde | 3 +++ _Presets.pde | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/DanUtil.pde b/DanUtil.pde index 4861f47..84bcdb5 100644 --- a/DanUtil.pde +++ b/DanUtil.pde @@ -152,14 +152,14 @@ public class DPat extends SCPattern boolean noteOff(Note note) { int row = note.getPitch(), col = note.getChannel(); - for (int i=0; i 0); + } + } + for (Pick pick : dpattern.picks) { + if (pick.tag.equals(pLabel)) { + float f = parameters.get(pLabel); + pick.set((int) floor(f), (int) round((f%1)*100.)); + } + } + } } deck.goPattern(pattern); + if (pattern instanceof DPat) { + ((DPat)pattern).updateLights(); + } manager.onPresetLoaded(this, pattern); break; } -- 2.34.1