From: Mark Slee Date: Sat, 19 Oct 2013 21:26:17 +0000 (-0700) Subject: Add full DPat compatibility to presets X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a1396b9e932bdf842b1817b0b313a34831889a5b;p=SugarCubes.git Add full DPat compatibility to presets --- 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; }