«akai-mpkmini2.desc.scd» by vtz

on 27 May'24 18:06 in modality mpkmini

An improved version of the modality toolkit description file for the akai mpk mini mk2 To be used with modality toolkit installed on supercollier, and the akai mpk mini mk2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// contributed by gil fuser
// rework to add layout and full support of all features by vtz

/*
* todo:
* test on osx
*
* All pads form prog 1 & 2 has been setted to midinote from 1 to 31 starting at 1 for prog1, bankA, ending at 31 for prog2, bankB
* this as been done for midinote, cc and progr change
* use the akai mkp mini mkII editor to do that
* joystick up down change to CC1 on midinote 10
*
* other prog are left at factory setting, this could be change when needed

MKtl(\x, "*mpk*2").gui;
MKtl(\x).trace;
*/
(
deviceName: "MPKmini2",
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"),

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:
	"All pads form prog 1 & 2 has been setted to midinote from 1 to 31 starting at 1 for prog1, bankA, ending at 31 for prog2, bankB\n"
	"It as been done for midinote, cc and progr change\n"
	"Use the akai mkp mini mkII editor to do that\n"
	"Joystick up down change to CC1 on midinote 10\n"
	"Pros 2 & 3 uses default presets.\n"
	"Every key was mapped\n"
	"For more flexibility use the [MPK MiniMKII editor](http://www.akaipro.com/product/mpk-mini-mkii#downloads).",
	longName: "AKAI MPKmini mk2"
),
elementsDesc: (
	elements: [

		// ------- bend ------------
		( key: \bend,
			midiChan: 0, midiMsgType: \bend, elementType: \bender, spec: \midiBend
		),
		( key: \joy,
			midiChan: 0, \midiNum: 10, midiMsgType: \cc, elementType: \bender, spec: \midi, style: (row: 0, column: 1)
		),
		// ------ pad -------------
		(
			key: \pad,
			elements: [
				(
					shared: (groupType: \noteOnOff, midiChan: 9, spec: \midiCC, elementType: \pad),
					elements:((0..31)).collect { |i, j|
						(key: (i).asSymbol,
							shared: (midiNum: i,
								style: (row: 1, column: j*0.6, width: 0.8)
							)
						)
					}
				),
				(
					shared: (groupType: \noteOnOff, midiChan: 9, spec: \midiCC, elementType: \pad),
					elements:((48..53)++(55)++(57)++(59..75)).collect { |i, j|
						(key: (i).asSymbol,
							shared: (midiNum: i,
								style: (row: 2, column: j*0.6, width: 0.8)
							)
						)
					}
				)
			]
		),
		// ------ pad into button -------------
        (
			key: \bt,
			shared: (\midiMsgType: \cc, \elementType: \pianoKey, \spec: \midiVel ),
			elements: [
				(
					shared: (\midiChan: 9),
					elements: (0..31).collect { |i, j|
						(key: (i).asSymbol, \midiNum: i, style: (row: 3, column: j*0.6, width: 0.8))
					}
				),
				(
					shared: (\midiChan: 0),
					elements: (20..35).collect { |i, j|
						(key: (i).asSymbol, \midiNum: i, style: (row: 4, column: j*0.6, width: 0.8))
					}
				),

			]
		),
		// ------ pad into program change -------------
		(
			key: \pch,
			\midiChan: 9, \midiMsgType: \program, \elementType: \wheel, \spec: \midiProgram, style: (row: 5, column: 1)
		),
		// ------ knob -------------
		(
			key: \kn,
			shared: (\midiMsgType: \cc, \elementType: \knob,
				\midiChan: 0, \spec: \midiCC),
			elements: ((1..8)).collect { |i, item|
				item = item + 1;
				(key: (i).asSymbol, \midiNum: i, style: (row: 6, column: item*0.6, width: 0.8))
			}
		),
		// ------ piano key -------------
		(
			key: \key,
			shared: (elementType: \pianoKey, midiChan: 0, groupType: \noteOnOff),
			elements: (0..120).collect { |midiNum, i|
				var pos = Piano.pos(midiNum % 48, 0);
				(key: midiNum,
					shared: ( midiNum: midiNum,
						style: (row: (4 - (i div: 48 * 2)) + (pos.y * 0.9) +  7 , column: pos.x * 0.6, width: 0.8, color: pos.color)
					)
				)
			}

		),
	]
)

);
raw 4058 chars (focus & ctrl+a+c to copy)
reception
comments