Skip to content

Commit 72d620a

Browse files
committed
fix: update MIDI mappings and use profile velocity for Go action
1 parent 1dabb3f commit 72d620a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

profiles/behringer_xtouch_mini_layer_a.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
{
272272
"trigger": {
273273
"type": "midi_note",
274-
"note": 8,
274+
"note": 21,
275275
"channel": 10,
276276
"mode": "press"
277277
},
@@ -286,16 +286,16 @@
286286
},
287287
{
288288
"type": "midi_note",
289-
"note": 8,
289+
"note": 21,
290290
"channel": 10,
291-
"velocity": 127
291+
"velocity": 1
292292
}
293293
]
294294
},
295295
{
296296
"trigger": {
297297
"type": "midi_note",
298-
"note": 9,
298+
"note": 22,
299299
"channel": 10,
300300
"mode": "press"
301301
},
@@ -310,16 +310,16 @@
310310
},
311311
{
312312
"type": "midi_note",
313-
"note": 9,
313+
"note": 22,
314314
"channel": 10,
315-
"velocity": 127
315+
"velocity": 1
316316
}
317317
]
318318
},
319319
{
320320
"trigger": {
321321
"type": "midi_note",
322-
"note": 14,
322+
"note": 8,
323323
"channel": 10,
324324
"mode": "press"
325325
},
@@ -331,7 +331,7 @@
331331
{
332332
"trigger": {
333333
"type": "midi_note",
334-
"note": 15,
334+
"note": 9,
335335
"channel": 10,
336336
"mode": "press"
337337
},

src/midi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@ impl Midi {
324324
// Re-using set_crossfade_state logic might be cleaner but it resets blink state.
325325
// Let's iterate:
326326
for (device_name, profile) in &self.device_profiles {
327-
if let Some((n, c, _)) =
327+
if let Some((n, c, on_vel)) =
328328
profile.get_midi_output_for_action(crate::controller::LogicalAction::Go)
329329
{
330-
let v = if self.blink_state { 127 } else { 0 };
330+
let v = if self.blink_state { on_vel } else { 0 };
331331
self.enqueue(device_name, vec![0x90 | c, n, v]);
332332
}
333333
}

0 commit comments

Comments
 (0)