Skip to content

Commit 24f0082

Browse files
author
adc
committed
more gui layout in descs fixed
1 parent 2cf1dd2 commit 24f0082

File tree

4 files changed

+67
-55
lines changed

4 files changed

+67
-55
lines changed

Modality/MKtlDescriptions/m-audio-triggerfinger.desc.scd

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// M-audio Trigger finger - MKtl
22

3+
/*
4+
MKtlDesc.loadDescs("*finger"); m.free; m = MKtl('op1', "*finger"); m.trace.gui;
5+
*/
6+
37
(
48
deviceName: "USB Trigger Finger",
59
protocol: \midi,
@@ -24,29 +28,40 @@ elementsDesc: (
2428
shared: (\midiChan: 0, ioType: \in),
2529
elements: [
2630
(
27-
key: \pad,
28-
shared: ( elementType: \pad, \midiMsgType: \note,
29-
spec: \midiVel),
30-
elements: ((0..15) + 35).collect { |num, i|
31-
(key: (i + 1).asSymbol, \midiNum: num)
32-
}
31+
key: \kn,
32+
shared: ( elementType: \knob, \midiMsgType: \cc,
33+
spec: \midiCC),
34+
elements: ( #[10, 91, 12, 93, 5, 73, 84, 72].collect { |num, i|
35+
(key: (i + 1).asSymbol, \midiNum: num,
36+
style: (row: 0.5 - (i div: 4 * 0.8),
37+
column: (i % 4 * 0.9) + 3 + (i div: 4 * 0.5)
38+
)
39+
)
40+
})
3341
),
3442
(
3543
key: \sl,
3644
shared: ( elementType: \slider, \midiMsgType: \cc,
3745
spec: \midiCC),
3846
elements: #[7, 1, 71, 74].collect { |num, i|
39-
(key: (i + 1).asSymbol, \midiNum: num )
47+
(key: (i + 1).asSymbol, \midiNum: num,
48+
style: (row: 3, column: i * 0.75, width: 0.8)
49+
)
4050
}
4151
),
4252
(
43-
key: \kn,
44-
shared: ( elementType: \knob, \midiMsgType: \cc,
45-
spec: \midiCC),
46-
elements: ( #[10, 91, 12, 93, 5, 73, 84, 72].collect { |num, i|
47-
(key: (i + 1).asSymbol, \midiNum: num )
48-
})
49-
)
53+
key: \pad,
54+
shared: ( elementType: \pad, \groupType: \noteOnOff,
55+
spec: \midiVel),
56+
elements: ((0..15) + 35).collect { |num, i|
57+
(key: (i + 1).asSymbol, \midiNum: num,
58+
shared: (style: (
59+
column: i % 4 + 3,
60+
row: 5 - (i div: 4)
61+
))
62+
)
63+
}
64+
),
5065
]
5166
)
5267
)

Modality/MKtlDescriptions/novation-launchcontrol-xl.desc.scd

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -155,37 +155,36 @@ elementsDesc: (
155155
}
156156

157157
)
158-
159-
160-
// // check this when enabling it
161-
// [ // key, midinum, row, col
162-
// [ \up, 104, 1, 8 ],
163-
// [ \down, 105, 1, 9 ],
164-
// [ \left, 106, 2, 8 ],
165-
// [ \right, 107, 2, 9 ],
166-
//
167-
// [ \device, 105, 3, 8.5 ],
168-
// [ \mute, 106, 4, 8.5 ],
169-
// [ \solo, 107, 5, 8.5 ],
170-
// [ \arm, 108, 6, 8.5 ]
171-
//
172-
// ].collect { |list|
173-
// var onOffGroup, style;
174-
// var key, num, row, col;
175-
//
176-
// #key, num, row, col = list;
177-
// style = (row: row, column: col);
178-
/
179-
// onOffGroup = (key: key, midiNum: num).postcs;
180-
// // onOffGroup.elements[0].put(\style, style);
181-
// // onOffGroup.elements[0].put(\style,
182-
// // style.copy.put(\row, style.row + 0.8)
183-
// // );
184-
// onOffGroup
185-
// }
186-
// )
187158
]
188159
)
189160
}
190161
)
191162
);
163+
164+
165+
// // check this when enabling it
166+
// [ // key, midinum, row, col
167+
// [ \up, 104, 1, 8 ],
168+
// [ \down, 105, 1, 9 ],
169+
// [ \left, 106, 2, 8 ],
170+
// [ \right, 107, 2, 9 ],
171+
//
172+
// [ \device, 105, 3, 8.5 ],
173+
// [ \mute, 106, 4, 8.5 ],
174+
// [ \solo, 107, 5, 8.5 ],
175+
// [ \arm, 108, 6, 8.5 ]
176+
//
177+
// ].collect { |list|
178+
// var onOffGroup, style;
179+
// var key, num, row, col;
180+
//
181+
// #key, num, row, col = list;
182+
// style = (row: row, column: col);
183+
//
184+
// onOffGroup = (key: key, midiNum: num).postcs;
185+
// // onOffGroup.elements[0].put(\style, style);
186+
// // onOffGroup.elements[0].put(\style,
187+
// // style.copy.put(\row, style.row + 0.8)
188+
// // );
189+
// onOffGroup
190+
// }

Modality/MKtlDescriptions/qunexus/keith-mcmillen-qunexus_port1_AB.desc.scd

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
/*
22
33
// test this desc:
4-
~thisdesc = thisProcess.nowExecutingPath.basename.split($.).first.postcs;
5-
d = MKtlDesc.loadDescs(~thisdesc).first;
6-
d.web;
74
8-
// close old m, open new one, make gui:
9-
m.free; m = MKtl(\qn_ab, "*qunexus_port1_AB"); m.gui;
10-
m.trace;
5+
MKtlDesc.loadDescs("*qunexus_port1_AB");
6+
m.free; m = MKtl(\qn_ab, "*qunexus_port1_AB"); m.gui; m.trace;
117
m.elementsDict.size;
128
m.postElements;
139
@@ -54,7 +50,7 @@ elementsDesc: (
5450
var xindex = i % 24, yindex = i div: 24;
5551
var octDists = [0, 7] +.x [0, 0.5, 1, 1.5, 2, 3, 3.5, 4, 4.5, 5, 5.5, 6];
5652
var xpos = octDists[xindex];
57-
var ypos = yindex - (xpos.frac * 0.9) + 0.5 * 2;
53+
var ypos = (3 - yindex) - (xpos.frac * 0.9) + 0.5 * 2;
5854

5955
(
6056
key: midinote, midiNum: midinote,
@@ -65,13 +61,13 @@ elementsDesc: (
6561
(
6662
key: 'bend',
6763
'midiMsgType': 'bend', 'elementType': 'bender', 'midiNum': 0,'spec': 'midiBend',
68-
style: (row: 7, column: 5, width: 1.5)
64+
style: (row: 0, column: 5, width: 2)
6965
),
7066
// Preset B mode only adds single channel pressure from all keys
7167
(
7268
key: 'monotouch',
7369
'midiMsgType': 'cc', 'elementType': 'keyTouch', 'midiNum': 1,'spec': 'midiCC',
74-
style: (row: 7, column: 7, width: 1.5)
70+
style: (row: 0, column: 7, width: 2)
7571
)
7672
]
7773
)

Modality/MKtlDescriptions/steinberg_cmc_pd/steinberg-cmc-pd_port1.desc.scd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pads and 4velmode also send sysex on port 2;
3737
// 15: (100..115),
3838
// 16: all sysex messages // no idea what they are for
3939
40+
MKtlDesc.loadDescs;
4041
m.free; m = MKtl(\pd, "*cmc-pd_port1");
4142
m.gui;
4243
m.postElements;
@@ -76,11 +77,12 @@ elementsDesc: (
7677
elements: [
7778
(
7879
key: \1,
80+
shared: (groupType: \noteOnOffBut),
7981
elements: [35, 36, 38, 40, 39,44,42,46, 41,45,47,48, 51,55,49,56]
8082
.collect { |num, i|
81-
MKtlDesc.notePair(i, num,
82-
(style: (row: 4 - (i div: 4), column: i % 4))
83-
).put(\page, 0)
83+
(key: i, midiNum: num, \page: 0,
84+
shared: (style: (row: 4 - (i div: 4), column: i % 4))
85+
)
8486
}
8587
),
8688
// \2: (4..19) .collect { |num, i| (key: i, midiNum: num) },

0 commit comments

Comments
 (0)