Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 95 additions & 58 deletions Modality/MKtlDescriptions/akai-mpkmini2.desc.scd
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// contributed by gil fuser

/*
* todo:
* test on osx
* add gui layout

MKtl(\x, "*mpk*2").gui;
MKtl(\x).trace;
m = MKtl(\mpk2, "akai-mpkmini2");
m.gui;
m.trace;
m.trace(false);
*/

(
Expand All @@ -15,84 +15,121 @@ 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).",
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 programs use first: [MPK MiniMKII editor](http://www.akaipro.com/product/mpk-mini-mkii#downloads)\n"
"avoiding more mapping overlaping as occours in the defaults.\n"
"Accidental ```Prog-Change``` activation on the device needs to be reverted by ```Bank A/B```.\n",
longName: "AKAI MPKmini mk2"
),
elementsDesc: (
elements: [

// ------- bend ------------
( key: \bend,
\midiChan: 0, \midiMsgType: \bend, \elementType: \bender, \spec: \midiBend
elementsDesc: (

elements:
[

// ------ pad BANK A note on-off-------------
(
key: \pnA,
shared: ( elementType: \pad, midiChan: 0, 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)) )
)
}
),
// ------ pad -------------

// ------ pad BANK B note on-off -------------
(
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)
key: \pnB,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are the pads not named pad anymore?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just reviewed this and made some changes

shared: ( elementType: \pad, midiChan: 0, 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)) )
)
}
),
// ------ pad into button -------------

// ------ pad BANK A cc -------------
(
key: \bt,
shared: (\midiMsgType: \cc, \elementType: \button, \spec: \midiCC ),
elements: [

key: \pcA,
shared: ( midiChan: 0, midiMsgType: \cc, elementType: \pad, spec: \midiCC ),
elements: ( 20..27 ).collect{ |num, i|
(
shared: (\midiChan: 0),
elements: (28..35).collect { |i|
(key: (i).asSymbol, \midiNum: i)
}
),
key: i.asSymbol,
midiNum: num,
style:( row: 4.5 + (1 - (i div:4)), column: 2 + (i % 4))
)
}
),

// ------ pad BANK B cc -------------
(
key: \pcB,
shared: ( elementType: \pad, midiChan: 0, spec: \midiCC, \ioType: \inout, midiMsgType: \cc ),
elements: ( 28..35 ).collect{ |num, i|
(
shared: (\midiChan: 9),
elements: (0..16).collect { |i|
(key: (i).asSymbol, \midiNum: i)
}
),



]
key: i.asSymbol,
midiNum: num,
style:( row: 6.75 + (1 - (i div:4)), column: 2 + (i % 4))
)
}
),


// ------ 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)
key: \k,
shared: ( elementType: \knob, midiChan: 0, spec: \midiCC, midiMsgType: \cc ),
elements: ( 1..8 ).collect{ |num, i|
(
key: i.asSymbol,
midiNum: num, style:( row: i div:4, column: 6 + (i % 4) ),
)
}
),
// ------ piano key -------------

//////// piano key //////////
(
key: \key,
shared: (\midiMsgType: \noteOnOff, \elementType: \pianoKey,
\midiChan: 0, \spec: \midiVel),
elements: (0..120).collect { |i|
(key: (i).asSymbol, \midiNum: i)
key: \pkey,
shared: ( midiChan: 0, elementType: \pianoKey, groupType: \noteOnOff, spec: \midiVel ),
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,
midiChan: 0, \midiNum: 2, midiMsgType: \cc, elementType: \slider, spec: \midiCC, style: (row: 0, column:0.5, width: 0.84, height: 1.75 ) ),
( key: \bX,
midiChan: 0, midiMsgType: \bend, elementType: \xfader, spec: \midiBend, style: (row: 1.66, column:0, width: 1.9 ) ),
]
)

);