diff --git a/Modality/MKtlDescriptions/akai-mpkmini2.desc.scd b/Modality/MKtlDescriptions/akai-mpkmini2.desc.scd index 18bf97dd..ff3943db 100755 --- a/Modality/MKtlDescriptions/akai-mpkmini2.desc.scd +++ b/Modality/MKtlDescriptions/akai-mpkmini2.desc.scd @@ -1,12 +1,9 @@ -// contributed by gil fuser - /* -* todo: -* test on osx -* add gui layout - -MKtl(\x, "*mpk*2").gui; -MKtl(\x).trace; +* todo: test on osx +m = MKtl(\mpk2, "akai-mpkmini2"); +m.gui; +m.trace; +m.trace(false); */ ( @@ -15,84 +12,135 @@ protocol: 'midi', deviceType: 'midiKeyboard', elementTypes: [\knob, \key, \pad, \bend], status: ( - linux: "tested and working", - osx: "tested desc only, looks ok, no gui info yet. 2016-03-17, adc", - win: "tested and working"), + linux: "tested and working", + osx: "unknown", + win: "tested and working"), idInfo: "MPKmini2", // hardwarePages: [1, 2, 3, 4], deviceInfo: ( - vendorURI: 'http://www.akaipro.com/product/mpk-mini-mkii', - manualURI: 'http://6be54c364949b623a3c0-4409a68c214f3a9eeca8d0265e9266c0.r0.cf2.rackcdn.com/988/documents/MPK%20mini%20-%20User%20Guide%20-%20v1.0.pdf', - features: [\pianoKey, \pad, \knob, \bender], - notes: - "Uses default presets.\n" - "Every key was mapped, with the exception of ```Prog Change```.\n" - "Accidental ```Prog-Change``` activation on the device needs to be reverted by ```Bank A/B```.\n" - "For more flexibility use the [MPK MiniMKII editor](http://www.akaipro.com/product/mpk-mini-mkii#downloads).", - longName: "AKAI MPKmini mk2" + vendorURI: 'http://www.akaipro.com/product/mpk-mini-mkii', + manualURI: 'http://6be54c364949b623a3c0-4409a68c214f3a9eeca8d0265e9266c0.r0.cf2.rackcdn.com/988/documents/MPK%20mini%20-%20User%20Guide%20-%20v1.0.pdf', + features: [\pianoKey, \pad, \knob, \bender], + notes: + "Uses only ```Program 1```.\n" + "To use the other hardware programs is it suggested to first edit the midi mapping in the device in order to avoid overlapping as occours in the defaults.\n" + "Use the MKP Mini Editor for that. Download link here: : [MPK MiniMKII editor](http://www.akaipro.com/product/mpk-mini-mkii#downloads)\n", + longName: "AKAI MPKmini mk2" ), -elementsDesc: ( - elements: [ - - // ------- bend ------------ - ( key: \bend, - \midiChan: 0, \midiMsgType: \bend, \elementType: \bender, \spec: \midiBend - ), - // ------ pad ------------- - ( - key: \pad, - shared: (\midiMsgType: \noteOnOff, \midiChan: 9, \spec: \midiCC, \elementType: \pad), - elements: ((36..38)++(40)++(42..53)++(55)++(57)++(59..75)++(82)).collect { |i| - (key: (i).asSymbol, \midiNum: i) - } - ), - // ------ pad into button ------------- - ( - key: \bt, - shared: (\midiMsgType: \cc, \elementType: \button, \spec: \midiCC ), - elements: [ - - ( - shared: (\midiChan: 0), - elements: (28..35).collect { |i| - (key: (i).asSymbol, \midiNum: i) - } - ), - ( - shared: (\midiChan: 9), - elements: (0..16).collect { |i| - (key: (i).asSymbol, \midiNum: i) - } - ), - - - ] - ), - // ------ knob ------------- - ( - key: \kn, - shared: (\midiMsgType: \cc, \elementType: \knob, - \midiChan: 0, \spec: \midiCC), - elements: ((1..8)++(16..27)).collect { |i, item| - item = item + 1; - (key: (i).asSymbol, \midiNum: i) - } - ), - // ------ piano key ------------- - ( - key: \key, - shared: (\midiMsgType: \noteOnOff, \elementType: \pianoKey, - \midiChan: 0, \spec: \midiVel), - elements: (0..120).collect { |i| - (key: (i).asSymbol, \midiNum: i) - } - ), - ] +elementsDesc: ( + + shared: (midiChan: 0), + elements: + [ + ( + // ------ pad ------------- + key: \pad, + shared: ( elementType: \pad ), + elements: + [ + ( + // ------ bank A ------------- + key: \bA, + elements: + [ + ( + key: \note, + shared: ( spec: \midiVel, midiMsgType: \noteOn, groupType: \noteOnOffBut ), + elements: ( 44..51 ).collect{ |num, i| + ( + key: i.asSymbol, + shared: ( midiNum: num, style:( row: 1 - (i div:4), column: 2 + (i % 4)) ) + ) + } + ), + ( + key: \ccm, + shared: ( spec: \midiCC, midiMsgType: \cc ), + elements: ( 20..27 ).collect{ |num, i| + ( + key: i.asSymbol, + midiNum: num, + style:( row: 4.5 + (1 - (i div:4)), column: 2 + (i % 4)) + ) + } + ), + ] + ), + ( + // ------ bank B ------------- + key: \bB, + elements: + [ + ( + key: \note, + shared: ( spec: \midiVel, midiMsgType: \noteOn, groupType: \noteOnOffBut ), + elements: ( 32..39 ).collect{ |num, i| + ( + key: i.asSymbol, + shared: ( midiNum: num, style:( row: 2.25 + (1 - (i div:4)), column: 2 + (i % 4)) ) + ) + } + ), + ( + key: \ccm, + shared: ( spec: \midiCC, midiMsgType: \cc ), + elements: ( 28..35 ).collect{ |num, i| + ( + key: i.asSymbol, + midiNum: num, + style:( row: 6.75 + (1 - (i div:4)), column: 2 + (i % 4)) + ) + } + ), + ] + ), + ] + ), + + // ------ knob ------------- + ( + key: \kn, + shared: ( spec: \midiCC, midiMsgType: \cc, elementType: \knob ), + elements: ( 1..8 ).collect{ |num, i| + ( + key: i.asSymbol, + midiNum: num, style:( row: i div:4, column: 6 + (i % 4) ), + ) + } + ), + + //////// piano key ////////// + ( + key: \pkey, + shared: ( spec: \midiVel, groupType: \noteOnOff, elementType: \pianoKey ), + elements: + (0..120).collect { |i| + var pos = Piano.pos( i % 25, 0); + ( + key: i.asSymbol, + shared: ( + midiNum: i, groupType: \noteOnOff, + style: ( + row: ( i div: 25 * 1.5 ) + (pos.y * 0.6), + column: 10 + (pos.x * 0.65 % 25), + color: pos.color, + width: 0.9, + height: 0.75, + ) + ) + ) + } + ), + + // ------- bend ------------ + ( key: \bY, + spec: \midiCC, midiMsgType: \cc, midiNum: 2, elementType: \slider, style: (row: 0, column:0.5, width: 0.84, height: 1.75 ) ), + ( key: \bX, + spec: \midiBend, midiMsgType: \bend, elementType: \xfader, style: (row: 1.66, column:0, width: 1.9 ) ), + ] ) - ); -