From fd2861cb5f9f6959c7d1c91b841602577a7f6198 Mon Sep 17 00:00:00 2001 From: David Runge Date: Mon, 19 Mar 2018 22:58:16 +0100 Subject: classes/{NanoKontrol2,PlatformMPlus}.sc: Fixing adding of elements to reflect connectStates and created MIDIdefs in MIDIDevice. --- classes/NanoKontrol2.sc | 105 ++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 52 deletions(-) (limited to 'classes/NanoKontrol2.sc') diff --git a/classes/NanoKontrol2.sc b/classes/NanoKontrol2.sc index 43fafe0..71c3f7f 100644 --- a/classes/NanoKontrol2.sc +++ b/classes/NanoKontrol2.sc @@ -12,6 +12,7 @@ NanoKontrol2 : MIDIDevice{ this.addFaders(); this.addPotis(); this.addButtons(); + super.connectStates(); } cleanup{ @@ -22,182 +23,182 @@ NanoKontrol2 : MIDIDevice{ addButtons{ buttons.put(0, List.newUsing([ - super.addSpec(\channel1Select, \control, 32, 0, 127), + super.addSpec(\channel1Select, \control, 0, 32, 0, 127), ]); ); buttons.put(1, List.newUsing([ - super.addSpec(\channel2Select, \control, 33, 0, 127), + super.addSpec(\channel2Select, \control, 0, 33, 0, 127), ]); ); buttons.put(2, List.newUsing([ - super.addSpec(\channel3Select, \control, 34, 0, 127), + super.addSpec(\channel3Select, \control, 0, 34, 0, 127), ]); ); buttons.put(3, List.newUsing([ - super.addSpec(\channel4Select, \control, 35, 0, 127), + super.addSpec(\channel4Select, \control, 0, 35, 0, 127), ]); ); buttons.put(4, List.newUsing([ - super.addSpec(\channel5Select, \control, 36, 0, 127), + super.addSpec(\channel5Select, \control, 0, 36, 0, 127), ]); ); buttons.put(5, List.newUsing([ - super.addSpec(\channel6Select, \control, 37, 0, 127), + super.addSpec(\channel6Select, \control, 0, 37, 0, 127), ]); ); buttons.put(6, List.newUsing([ - super.addSpec(\channel7Select, \control, 38, 0, 127), + super.addSpec(\channel7Select, \control, 0, 38, 0, 127), ]); ); buttons.put(7, List.newUsing([ - super.addSpec(\channel8Select, \control, 39, 0, 127), + super.addSpec(\channel8Select, \control, 0, 39, 0, 127), ]); ); buttons.put(8, List.newUsing([ - super.addSpec(\channel1Mute, \control, 48, 0, 127), + super.addSpec(\channel1Mute, \control, 0, 48, 0, 127), ]); ); buttons.put(9, List.newUsing([ - super.addSpec(\channel2Mute, \control, 49, 0, 127), + super.addSpec(\channel2Mute, \control, 0, 49, 0, 127), ]); ); buttons.put(10, List.newUsing([ - super.addSpec(\channel3Mute, \control, 50, 0, 127), + super.addSpec(\channel3Mute, \control, 0, 50, 0, 127), ]); ); buttons.put(11, List.newUsing([ - super.addSpec(\channel4Mute, \control, 51, 0, 127), + super.addSpec(\channel4Mute, \control, 0, 51, 0, 127), ]); ); buttons.put(12, List.newUsing([ - super.addSpec(\channel5Mute, \control, 52, 0, 127), + super.addSpec(\channel5Mute, \control, 0, 52, 0, 127), ]); ); buttons.put(13, List.newUsing([ - super.addSpec(\channel6Mute, \control, 53, 0, 127), + super.addSpec(\channel6Mute, \control, 0, 53, 0, 127), ]); ); buttons.put(14, List.newUsing([ - super.addSpec(\channel7Mute, \control, 54, 0, 127), + super.addSpec(\channel7Mute, \control, 0, 54, 0, 127), ]); ); buttons.put(15, List.newUsing([ - super.addSpec(\channel8Mute, \control, 55, 0, 127), + super.addSpec(\channel8Mute, \control, 0, 55, 0, 127), ]); ); buttons.put(16, List.newUsing([ - super.addSpec(\channel1Record, \control, 64, 0, 127), + super.addSpec(\channel1Record, \control, 0, 64, 0, 127), ]); ); buttons.put(17, List.newUsing([ - super.addSpec(\channel2Record, \control, 65, 0, 127), + super.addSpec(\channel2Record, \control, 0, 65, 0, 127), ]); ); buttons.put(18, List.newUsing([ - super.addSpec(\channel3Record, \control, 66, 0, 127), + super.addSpec(\channel3Record, \control, 0, 66, 0, 127), ]); ); buttons.put(19, List.newUsing([ - super.addSpec(\channel4Record, \control, 67, 0, 127), + super.addSpec(\channel4Record, \control, 0, 67, 0, 127), ]); ); buttons.put(20, List.newUsing([ - super.addSpec(\channel5Record, \control, 68, 0, 127), + super.addSpec(\channel5Record, \control, 0, 68, 0, 127), ]); ); buttons.put(21, List.newUsing([ - super.addSpec(\channel6Record, \control, 69, 0, 127), + super.addSpec(\channel6Record, \control, 0, 69, 0, 127), ]); ); buttons.put(22, List.newUsing([ - super.addSpec(\channel7Record, \control, 70, 0, 127), + super.addSpec(\channel7Record, \control, 0, 70, 0, 127), ]); ); buttons.put(23, List.newUsing([ - super.addSpec(\channel8Record, \control, 71, 0, 127), + super.addSpec(\channel8Record, \control, 0, 71, 0, 127), ]); ); buttons.put(24, List.newUsing([ - super.addSpec(\channel8Record, \control, 71, 0, 127), + super.addSpec(\channel8Record, \control, 0, 71, 0, 127), ]); ); buttons.put(25, List.newUsing([ - super.addSpec(\trackDown, \control, 58, 0, 127), + super.addSpec(\trackDown, \control, 0, 58, 0, 127), ]); ); buttons.put(26, List.newUsing([ - super.addSpec(\trackUp, \control, 59, 0, 127), + super.addSpec(\trackUp, \control, 0, 59, 0, 127), ]); ); buttons.put(27, List.newUsing([ - super.addSpec(\cycle, \control, 46, 0, 127), + super.addSpec(\cycle, \control, 0, 46, 0, 127), ]); ); buttons.put(28, List.newUsing([ - super.addSpec(\backwards, \control, 43, 0, 127), + super.addSpec(\backwards, \control, 0, 43, 0, 127), ]); ); buttons.put(29, List.newUsing([ - super.addSpec(\forwards, \control, 44, 0, 127), + super.addSpec(\forwards, \control, 0, 44, 0, 127), ]); ); buttons.put(30, List.newUsing([ - super.addSpec(\set, \control, 60, 0, 127), + super.addSpec(\set, \control, 0, 60, 0, 127), ]); ); buttons.put(31, List.newUsing([ - super.addSpec(\markerDown, \control, 61, 0, 127), + super.addSpec(\markerDown, \control, 0, 61, 0, 127), ]); ); buttons.put(32, List.newUsing([ - super.addSpec(\markerUp, \control, 62, 0, 127), + super.addSpec(\markerUp, \control, 0, 62, 0, 127), ]); ); buttons.put(33, List.newUsing([ - super.addSpec(\stop, \control, 42, 0, 127), + super.addSpec(\stop, \control, 0, 42, 0, 127), ]); ); buttons.put(34, List.newUsing([ - super.addSpec(\play, \control, 41, 0, 127), + super.addSpec(\play, \control, 0, 41, 0, 127), ]); ); buttons.put(35, List.newUsing([ - super.addSpec(\record, \control, 45, 0, 127), + super.addSpec(\record, \control, 0, 45, 0, 127), ]); ); } @@ -205,42 +206,42 @@ NanoKontrol2 : MIDIDevice{ addPotis{ potis.put(0, List.newUsing([ - super.addSpec(\poti1, \control, 16, 0, 127), + super.addSpec(\poti1, \control, 0, 16, 0, 127), ]); ); potis.put(1, List.newUsing([ - super.addSpec(\poti2, \control, 17, 0, 127), + super.addSpec(\poti2, \control, 0, 17, 0, 127), ]); ); potis.put(2, List.newUsing([ - super.addSpec(\poti3, \control, 18, 0, 127), + super.addSpec(\poti3, \control, 0, 18, 0, 127), ]); ); potis.put(3, List.newUsing([ - super.addSpec(\poti4, \control, 19, 0, 127), + super.addSpec(\poti4, \control, 0, 19, 0, 127), ]); ); potis.put(4, List.newUsing([ - super.addSpec(\poti5, \control, 20, 0, 127), + super.addSpec(\poti5, \control, 0, 20, 0, 127), ]); ); potis.put(5, List.newUsing([ - super.addSpec(\poti6, \control, 21, 0, 127), + super.addSpec(\poti6, \control, 0, 21, 0, 127), ]); ); potis.put(6, List.newUsing([ - super.addSpec(\poti7, \control, 22, 0, 127), + super.addSpec(\poti7, \control, 0, 22, 0, 127), ]); ); potis.put(7, List.newUsing([ - super.addSpec(\poti8, \control, 23, 0, 127), + super.addSpec(\poti8, \control, 0, 23, 0, 127), ]); ); } @@ -248,42 +249,42 @@ NanoKontrol2 : MIDIDevice{ addFaders{ faders.put(0, List.newUsing([ - super.addSpec(\fader1, \control, 0, 0, 127), + super.addSpec(\fader1, \control, 0, 0, 0, 127), ]); ); faders.put(1, List.newUsing([ - super.addSpec(\fader2, \control, 1, 0, 127), + super.addSpec(\fader2, \control, 0, 1, 0, 127), ]); ); faders.put(2, List.newUsing([ - super.addSpec(\fader3, \control, 2, 0, 127), + super.addSpec(\fader3, \control, 0, 2, 0, 127), ]); ); faders.put(3, List.newUsing([ - super.addSpec(\fader4, \control, 3, 0, 127), + super.addSpec(\fader4, \control, 0, 3, 0, 127), ]); ); faders.put(4, List.newUsing([ - super.addSpec(\fader5, \control, 4, 0, 127), + super.addSpec(\fader5, \control, 0, 4, 0, 127), ]); ); faders.put(5, List.newUsing([ - super.addSpec(\fader6, \control, 5, 0, 127), + super.addSpec(\fader6, \control, 0, 5, 0, 127), ]); ); faders.put(6, List.newUsing([ - super.addSpec(\fader7, \control, 6, 0, 127), + super.addSpec(\fader7, \control, 0, 6, 0, 127), ]); ); faders.put(7, List.newUsing([ - super.addSpec(\fader8, \control, 7, 0, 127), + super.addSpec(\fader8, \control, 0, 7, 0, 127), ]); ); } -- cgit v1.2.3