Strange behavior of MIDI encoder (sending two and three messages at the same time)

Hello everyone!
First of all, thanks for this fantastic software and for the great support forum. I’ve been using Bome Midi Translator for a little while now, and it has helped me to detect what is probably a hardware problem with my controller (Xone K1).
The problem is as follows. When I turn an encoder, occasionally and randomly up to two and three messages are sent at a time. Here below I write the log of the log window as an example. Each paragraph break corresponds to a physical manipulation of the encoder by me, or in other words, each paragraph break corresponds to a single right turn of the encoder (lines 0, 2, 6, 10, 12, 14, 17, 19, 21…). As you can see, sometimes, instead of a single message being sent, up to two and three messages are sent (for example, lines 3, 4, 5 or lines 15, 16), and sometimes this happens without even a millisecond between messages (three messages at a time, lines 7, 8, 9). This strange behavior (which I assume is due to a physical wear of the encoder) causes me a lot of problems to manipulate it accurately.

Log window:
0
1 244425 - MIDI IN [XONE:K1]: BD 14 01
2
3 245236 - MIDI IN [XONE:K1]: BD 14 01
4 245237 - MIDI IN [XONE:K1]: BD 14 7F
5 245237 - MIDI IN [XONE:K1]: BD 14 01
6
7 247008 - MIDI IN [XONE:K1]: BD 14 01
8 247008 - MIDI IN [XONE:K1]: BD 14 7F
9 247008 - MIDI IN [XONE:K1]: BD 14 01
10
11 248513 - MIDI IN [XONE:K1]: BD 14 01
12
13 249039 - MIDI IN [XONE:K1]: BD 14 01
14
15 249576 - MIDI IN [XONE:K1]: BD 14 01
16 249580 - MIDI IN [XONE:K1]: BD 14 01
17
18 251282 - MIDI IN [XONE:K1]: BD 14 01
19
20 251864 - MIDI IN [XONE:K1]: BD 14 01
21
22 252441 - MIDI IN [XONE:K1]: BD 14 01
23
24 253541 - MIDI IN [XONE:K1]: BD 14 01
25
26 254112 - MIDI IN [XONE:K1]: BD 14 01
27
28 254968 - MIDI IN [XONE:K1]: BD 14 01
29
30 255510 - MIDI IN [XONE:K1]: BD 14 01
31
32 256051 - MIDI IN [XONE:K1]: BD 14 01
33
34 256575 - MIDI IN [XONE:K1]: BD 14 7F
35 256581 - MIDI IN [XONE:K1]: BD 14 01
36
37 258109 - MIDI IN [XONE:K1]: BD 14 01
38
39 258655 - MIDI IN [XONE:K1]: BD 14 01
40 258661 - MIDI IN [XONE:K1]: BD 14 01
41
42 260350 - MIDI IN [XONE:K1]: BD 14 01
43 260350 - MIDI IN [XONE:K1]: BD 14 7F
44 260350 - MIDI IN [XONE:K1]: BD 14 01

I have seen in the forum that similar questions raise the use of a timer to avoid that almost instantaneous messages are transmitted, but that would not be possible in my case, since, as you can see, some erroneous messages are sent exactly at the same time. In addition, I have tried the timer solutions indicated by some users and they do not solve the problem (Minimum amount of time between two messages - Bome Forums Archive 2005 - 2016).

My question is: could I use some function of Bome Midi Translator to filter the wrong messages so that only the last message sent by the K1 encoder is processed? I think this would be the optimal solution for my problem.
Of course, any help is welcome.

PS: I also attach a link to Google Drive to a video of the wrong behaviour of the encoder (it is the same from which I extract the log from the log window, so each paragraph break corresponds to a single right turn of the encoder): https://drive.google.com/file/d/1io7k3hx9POZJhCZBFw1xbsNAVfy-uXNK/view?usp=sharing

Thank you very much in advance!

Best regards!

Hi and welcome to the Bome community!

Well fortunately, since MIDI is a serial event and all coming from the same MIDI port, the messages are actually not happening at the same, time. The timestamp simply has a resolution of 1 millisecond and the messages are probably arriving within microseconds of each other which would explain the timestamp.

I’ve rigged up a project file that I believe should work.

The first translator triggers a one-shot timer ‘Suppress’ which will trigger in one ms after receiving the incoming message but only if the global variable ga is the default value of 0.

The second translator passes the MIDI message through but only if ga=0.

The third timer triggers after 1ms delay setting ga back to zero thereby allow MIDI messages to pass through again.

So in essence, if the are multiple incoming MIDI messages within the 1ms window, only the first one should get through.

Here I send multiple MIDI messages all within 1 ms and only the first one comes through.

bd 14 01
bd 14 7F
bd 14 01
bd 14 01
bd 14 7F
bd 14 01

Here is the log

2035343 - MIDI IN [XONEK1]: BD 14 01
2035343 - MIDI OUT [Bome MIDI Translator 1 Virtual Out]: BD 14 01
2035344 - MIDI IN [XONEK1]: BD 14 7F
2035344 - 0.1:1 Message Suppressed
2035344 - MIDI IN [XONEK1]: BD 14 01
2035344 - 0.1:1 Message Suppressed
2035344 - MIDI IN [XONEK1]: BD 14 01
2035344 - 0.1:1 Message Suppressed
2035344 - MIDI IN [XONEK1]: BD 14 7F
2035344 - 0.1:1 Message Suppressed
2035344 - MIDI IN [XONEK1]: BD 14 01
2035344 - 0.1:1 Message Suppressed
2035345 - 0.2:1 Log Suppress Timer Triggered - resetting ga to 0

I’ve set up my aliases as follows:

image

You can learn more about aliases from this tutorial.

And the project file.
Suppress-Dup-test-2024-08-06.bmtp (1.5 KB)

Good luck!

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Wow Steve! Thank you so much for your quick response and for the project! With that translator the wrong behavior of the encoder has been fixed. Thank you very much!
Without a doubt, Bome Midi Translator is fantastic and opens an infinite range of possibilities with our midi controllers.

Best regards!