mumblecake Posted December 17, 2015 Report Share Posted December 17, 2015 Hi, as part of my organ conversion I'm reading in the manuals with a DIO matrix module. Because of the weird pin layout of the keyboards and there also otherwise being no reason to use the keyboard drivers, I am using a simple DIN matrix (NGC file is attached). There are actually two DIN matrices. One for the pedalboard which is a 2*16 matrix and the two manuals which is a 8*16 matrix for both. All are inverted due to "wrong" diode directions. There is also loads of other stuff further down in the config file like buttons as well as switches and solenoids + some logic connecting the two. The problem that I'm having is that on the second DIO Matrix I occasionally get a glitch that on the first multiplexer all 16 keys fire a NoteOn event but never a NoteOff event (the lowest 16 keys on the first manual: IDs: 1033 - 1048). The glitch happens irregularly, at the moment maybe once every 4-5 hours (about every 15 million iterations of the midibox). Earlier in the year it was something like every few minutes though I was running a different firmware back then. I first suspected an electrical problem as I employed a different technique at the beginning of my project (crimping) which I later found to be unreliable and changed it (using ribbon cable + IDC connectors and soldering the wires with heat shrink over the solder joints. I re-did all the connections with IDC connectors. That didn't change the problem. I then remembered that the first time I powered up that DIO matrix module I had the DIs and the DOs swapped and thought I might have damaged the chips, so I exchanged the whole board: No change. I have now basically run out of ideas and wondered if any of you had any ideas: electrical/configuration/operating system/could it be software? What is surprising me is that even if the SRs return xFF for a tick and cause 16 NoteOn messages to get fired, wouldn't a reading of x00 the following tick cause NoteOff events to get fired? It seems weird that the NoteOff events simply never seem to get sent. I'd be very grateful for any suggestions as the only thing I can now think of is to go on a wild goose chase and trying to figure out if the special case of my configuration with inverted DIN matrix and the number of shift registers being limited can very rarely cause some kind of exception in the software. Best Regards Mathis ORGAN.NGC Quote Link to comment Share on other sites More sharing options...
TK. Posted December 21, 2015 Report Share Posted December 21, 2015 (edited) Hi Mathis, this is strange indeed, and I've no plausible explanation for this issue (yet) Assumed that it's an electrical issue, it could make sense to turn off each possible source for electrical disturbance. E.g. I remember a case where I was troubleshooting sporadic spikes on the analog inputs of a MIDIbox, spent several days on this, replaced microcontroller, modified firmware, and one day it was gone, next day it was there again! To make long story short: it turned out that the cheapo PSU of my notebook generated the sporadical spikes, and this was really unexpected. Firmware behaviour: I've no explanation yet why Note On events are sent - I would expect Note Off on very short spikes which are shorter than two SRIO scan cycles, regardless of the polarity. I've to try to reproduce this to get a better understanding Best Regards, Thorsten. Edited December 21, 2015 by TK. Quote Link to comment Share on other sites More sharing options...
mumblecake Posted January 3, 2016 Author Report Share Posted January 3, 2016 Hi Thorsten, thanks for your reply and frohes neues Jahr! It is really weird. I left the MIOS studio running overnight to see what exact events occur (is there a way to stream the output directly to a file?). Btw i was wrong, the SRs in question are actually the first ones (not number 3 & 4): this is what i get you see sudden midi off events sent before on events (timestamp 6041.075 following). I can imagine that an electrical problem causes the events but it is weird that they are swapped. Any ideas? Best regards Mathis Scanning for MIDI Inputs... [1] MIDIbox NG (*) MIDI Monitor ready. [ 240.973] f0 00 00 7e 32 00 0f 4d 49 4f 53 33 32 f7 [ 241.170] f0 00 00 7e 32 00 0f 4d 49 4f 53 33 32 f7 [ 241.173] f0 00 00 7e 32 00 0f 4d 42 48 50 5f 43 4f 52 45 5f 53 54 4d 33 32 46 34 f7 [ 241.176] f0 00 00 7e 32 00 0f 53 54 4d 33 32 46 34 78 78 f7 [ 241.179] f0 00 00 7e 32 00 0f 31 30 30 31 36 34 31 33 f7 [ 241.182] f0 00 00 7e 32 00 0f 33 35 30 30 33 37 30 30 30 31 34 37 33 33 33 32 33 31 33 37 33 37 33 38 f7 [ 241.185] f0 00 00 7e 32 00 0f 31 30 34 38 35 37 36 f7 [ 241.188] f0 00 00 7e 32 00 0f 31 39 36 36 30 38 f7 [ 241.192] f0 00 00 7e 32 00 0f 4d 49 44 49 62 6f 78 20 4e 47 20 56 31 2e 30 33 33 f7 [ 241.195] f0 00 00 7e 32 00 0f 28 43 29 20 32 30 31 35 20 54 2e 4b 6c 6f 73 65 f7 [6041.075] 91 33 00 Chn# 2 Note Off D#2 (optimized) [6041.075] 91 24 00 Chn# 2 Note Off C-1 (optimized) [6041.075] 91 32 00 Chn# 2 Note Off D-2 (optimized) [6041.075] 91 25 00 Chn# 2 Note Off C#1 (optimized) [6041.075] 91 31 00 Chn# 2 Note Off C#2 (optimized) [6041.075] 91 26 00 Chn# 2 Note Off D-1 (optimized) [6041.075] 91 30 00 Chn# 2 Note Off C-2 (optimized) [6041.075] 91 27 00 Chn# 2 Note Off D#1 (optimized) [6041.076] 91 2f 00 Chn# 2 Note Off B-1 (optimized) [6041.076] 91 28 00 Chn# 2 Note Off E-1 (optimized) [6041.076] 91 2e 00 Chn# 2 Note Off A#1 (optimized) [6041.076] 91 29 00 Chn# 2 Note Off F-1 (optimized) [6041.076] 91 2d 00 Chn# 2 Note Off A-1 (optimized) [6041.076] 91 2a 00 Chn# 2 Note Off F#1 (optimized) [6041.076] 91 2c 00 Chn# 2 Note Off G#1 (optimized) [6041.076] 91 2b 00 Chn# 2 Note Off G-1 (optimized) [6041.078] 91 33 7f Chn# 2 Note On D#2 Vel:127 [6041.078] 91 24 7f Chn# 2 Note On C-1 Vel:127 [6041.078] 91 32 7f Chn# 2 Note On D-2 Vel:127 [6041.078] 91 25 7f Chn# 2 Note On C#1 Vel:127 [6041.078] 91 31 7f Chn# 2 Note On C#2 Vel:127 [6041.078] 91 26 7f Chn# 2 Note On D-1 Vel:127 [6041.078] 91 30 7f Chn# 2 Note On C-2 Vel:127 [6041.078] 91 27 7f Chn# 2 Note On D#1 Vel:127 [6041.078] 91 2f 7f Chn# 2 Note On B-1 Vel:127 [6041.078] 91 28 7f Chn# 2 Note On E-1 Vel:127 [6041.078] 91 2e 7f Chn# 2 Note On A#1 Vel:127 [6041.079] 91 29 7f Chn# 2 Note On F-1 Vel:127 [6041.080] 91 2d 7f Chn# 2 Note On A-1 Vel:127 [6041.080] 91 2a 7f Chn# 2 Note On F#1 Vel:127 [6041.080] 91 2c 7f Chn# 2 Note On G#1 Vel:127 [6041.080] 91 2b 7f Chn# 2 Note On G-1 Vel:127 [39930.538] 93 00 00 Chn# 4 Note Off c-2 (optimized) [39930.538] 93 01 00 Chn# 4 Note Off c#2 (optimized) [39930.538] 93 02 00 Chn# 4 Note Off d-2 (optimized) [39930.539] 93 03 00 Chn# 4 Note Off d#2 (optimized) [39930.539] 93 04 00 Chn# 4 Note Off e-2 (optimized) [39930.539] 93 05 00 Chn# 4 Note Off f-2 (optimized) [39930.539] 93 06 00 Chn# 4 Note Off f#2 (optimized) [39930.539] 93 07 00 Chn# 4 Note Off g-2 (optimized) [39930.539] 90 2c 7f Chn# 1 Note On G#1 Vel:127 [39930.539] 90 2d 7f Chn# 1 Note On A-1 Vel:127 [39930.539] 90 2e 7f Chn# 1 Note On A#1 Vel:127 [39930.539] 90 2f 7f Chn# 1 Note On B-1 Vel:127 [39930.540] 90 30 7f Chn# 1 Note On C-2 Vel:127 [39930.541] 90 31 7f Chn# 1 Note On C#2 Vel:127 [39930.541] 90 32 7f Chn# 1 Note On D-2 Vel:127 [39930.541] 90 33 7f Chn# 1 Note On D#2 Vel:127 [39930.541] 90 2c 00 Chn# 1 Note Off G#1 (optimized) [39930.541] 90 2d 00 Chn# 1 Note Off A-1 (optimized) [39930.541] 90 2e 00 Chn# 1 Note Off A#1 (optimized) [39930.541] 90 2f 00 Chn# 1 Note Off B-1 (optimized) [39930.541] 90 30 00 Chn# 1 Note Off C-2 (optimized) [39930.541] 90 31 00 Chn# 1 Note Off C#2 (optimized) [39930.541] 90 32 00 Chn# 1 Note Off D-2 (optimized) [39930.541] 90 33 00 Chn# 1 Note Off D#2 (optimized) [39930.543] 93 08 00 Chn# 4 Note Off g#2 (optimized) [39930.543] 93 0b 00 Chn# 4 Note Off b-2 (optimized) [39930.543] 94 00 00 Chn# 5 Note Off c-2 (optimized) [39930.543] 94 01 00 Chn# 5 Note Off c#2 (optimized) [39930.543] 94 02 00 Chn# 5 Note Off d-2 (optimized) [39930.543] 94 03 00 Chn# 5 Note Off d#2 (optimized) [39930.543] 94 04 00 Chn# 5 Note Off e-2 (optimized) [39930.551] 94 08 00 Chn# 5 Note Off g#2 (optimized) [39930.551] 94 09 00 Chn# 5 Note Off a-2 (optimized) [39930.551] 94 0a 00 Chn# 5 Note Off a#2 (optimized) [39930.551] 94 0b 00 Chn# 5 Note Off b-2 (optimized) [39930.551] 94 0c 00 Chn# 5 Note Off c-1 (optimized) [39930.551] 94 0d 00 Chn# 5 Note Off c#1 (optimized) [39930.551] 94 0e 00 Chn# 5 Note Off d-1 (optimized) [39930.551] 94 0f 00 Chn# 5 Note Off d#1 (optimized) [39930.557] 94 15 00 Chn# 5 Note Off a-1 (optimized) [39930.557] 94 16 00 Chn# 5 Note Off a#1 (optimized) [39930.557] 94 17 00 Chn# 5 Note Off b-1 (optimized) [39930.563] 94 1d 00 Chn# 5 Note Off F-0 (optimized) [39930.563] 94 1e 00 Chn# 5 Note Off F#0 (optimized) Quote Link to comment Share on other sites More sharing options...
TK. Posted January 3, 2016 Report Share Posted January 3, 2016 While thinking about possible reasons, I noticed the following in your setup: # Matrix for pedalboard DIN_MATRIX n= 1 rows=4 inverted_sel=1 inverted_row=0 mirrored_row=0 \ sr_dout_sel1= 1 sr_dout_sel2= 2 sr_din1= 1 sr_din2= 2 button_emu_id_offset=1001 # Matrix for both manuals DIN_MATRIX n= 2 rows=8 inverted_sel=1 inverted_row=1 mirrored_row=0 \ sr_dout_sel1= 3 sr_dout_sel2= 4 sr_din1= 3 sr_din2= 4 button_emu_id_offset=1033 DIN Matrix #1 has a 4x16 configuration, accordingly the emu_id_offset ranges from 1001..1064 But I guess that only two rows are connected, the two remaining rows are not used. DIN Matrix #2 starts at emu_id_offset 1033, which overlays the upper (unused) range of DIN matrix #1 Now let's assume that there is a glitch while DIN Matrix #1 scans row #3 or #4: in this case, an event in the range id=1033..1064 would be emitted, although it doesn't belong to Matrix #2. I haven't checked further if the hypothesis is true, but I would propose to change button_emu_id_offset=1065 for Matrix #2, and to change the corresponding EVENT_BUTTON ids as well and check what happens. For the next overnight-run, please also enable debug mode which will output some additional information (such as the row/column which triggered the event): set debug on There is currently no function in MIOS Studio which allows to store the window content directly into a file, but maybe I will add it into one of the next releases. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
mumblecake Posted January 4, 2016 Author Report Share Posted January 4, 2016 Ahhhhhh, I wouldn't have spotted that in a million years! You are absolutely right that I ignore rows 3 & 4 (to my knowledge you can only define DIN matrix starting from 4 rows) I ran the MIOS Studio over night with debugging on but no glitches occured this time. Will try again later! I will also modify the configuration as proposed and will report back. Thank you very much for your help! Best Regards Mathis Quote Link to comment Share on other sites More sharing options...
TK. Posted January 4, 2016 Report Share Posted January 4, 2016 Quote Link to comment Share on other sites More sharing options...
mumblecake Posted January 5, 2016 Author Report Share Posted January 5, 2016 Hi Thorsten, just quickly: If I interpret this correctly this supports your theory. I will change the configuration asap. Scanning for MIDI Inputs... [1] MIDIbox NG (*) MIDI Monitor ready. [ 203.819] f0 00 00 7e 32 00 0f 4d 49 4f 53 33 32 f7 [ 204.015] f0 00 00 7e 32 00 0f 4d 49 4f 53 33 32 f7 [ 204.019] f0 00 00 7e 32 00 0f 4d 42 48 50 5f 43 4f 52 45 5f 53 54 4d 33 32 46 34 f7 [ 204.022] f0 00 00 7e 32 00 0f 53 54 4d 33 32 46 34 78 78 f7 [ 204.030] f0 00 00 7e 32 00 0f 31 30 30 31 36 34 31 33 f7 [ 204.032] f0 00 00 7e 32 00 0f 33 35 30 30 33 37 30 30 30 31 34 37 33 33 33 32 33 31 33 37 33 37 33 38 f7 [ 204.034] f0 00 00 7e 32 00 0f 31 30 34 38 35 37 36 f7 [ 204.037] f0 00 00 7e 32 00 0f 31 39 36 36 30 38 f7 [ 204.041] f0 00 00 7e 32 00 0f 4d 49 44 49 62 6f 78 20 4e 47 20 56 31 2e 30 33 33 f7 [ 204.043] f0 00 00 7e 32 00 0f 28 43 29 20 32 30 31 35 20 54 2e 4b 6c 6f 73 65 f7 [ 217.381] f0 00 00 7e 32 00 0f 00 f7 [ 407.607] 91 33 00 Chn# 2 Note Off D#2 (optimized) [ 407.609] 91 24 00 Chn# 2 Note Off C-1 (optimized) [ 407.613] 91 32 00 Chn# 2 Note Off D-2 (optimized) [ 407.616] 91 25 00 Chn# 2 Note Off C#1 (optimized) [ 407.618] 91 31 7f Chn# 2 Note On C#2 Vel:127 [ 407.621] 91 26 7f Chn# 2 Note On D-1 Vel:127 [ 407.623] 91 30 7f Chn# 2 Note On C-2 Vel:127 [ 407.626] 91 27 7f Chn# 2 Note On D#1 Vel:127 [ 407.627] 91 2f 7f Chn# 2 Note On B-1 Vel:127 [ 407.629] 91 28 7f Chn# 2 Note On E-1 Vel:127 [ 407.630] 91 2e 7f Chn# 2 Note On A#1 Vel:127 [ 407.630] 91 29 7f Chn# 2 Note On F-1 Vel:127 [ 407.631] 91 2d 7f Chn# 2 Note On A-1 Vel:127 [ 407.631] 91 2a 7f Chn# 2 Note On F#1 Vel:127 [ 407.633] 91 2c 7f Chn# 2 Note On G#1 Vel:127 [ 407.635] 91 2b 7f Chn# 2 Note On G-1 Vel:127 [ 407.635] 91 33 7f Chn# 2 Note On D#2 Vel:127 [ 407.635] 91 24 7f Chn# 2 Note On C-1 Vel:127 [ 407.636] 91 32 7f Chn# 2 Note On D-2 Vel:127 [ 407.636] 91 25 7f Chn# 2 Note On C#1 Vel:127 [ 217.149] set debug on [ 217.381] Debug mode turned on [ 407.605] MBNG_MATRIX_NotifyToggle(1, 33, 1) [ 407.605] MBNG_DIN_NotifyToggle(1033, 1) [ 407.607] [EVENT] id=BUTTON:1033 hw_id=BUTTON:1033 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.608] MBNG_MATRIX_NotifyToggle(1, 34, 1) [ 407.608] MBNG_DIN_NotifyToggle(1034, 1) [ 407.608] [EVENT] id=BUTTON:1034 hw_id=BUTTON:1034 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.609] MBNG_MATRIX_NotifyToggle(1, 35, 1) [ 407.610] MBNG_DIN_NotifyToggle(1035, 1) [ 407.613] [EVENT] id=BUTTON:1035 hw_id=BUTTON:1035 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.613] MBNG_MATRIX_NotifyToggle(1, 36, 1) [ 407.614] MBNG_DIN_NotifyToggle(1036, 1) [ 407.614] [EVENT] id=BUTTON:1036 hw_id=BUTTON:1036 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.616] MBNG_MATRIX_NotifyToggle(1, 37, 0) [ 407.617] MBNG_DIN_NotifyToggle(1037, 0) [ 407.618] [EVENT] id=BUTTON:1037 hw_id=BUTTON:1037 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.619] MBNG_MATRIX_NotifyToggle(1, 38, 0) [ 407.619] MBNG_DIN_NotifyToggle(1038, 0) [ 407.620] [EVENT] id=BUTTON:1038 hw_id=BUTTON:1038 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.621] MBNG_MATRIX_NotifyToggle(1, 39, 0) [ 407.621] MBNG_DIN_NotifyToggle(1039, 0) [ 407.622] [EVENT] id=BUTTON:1039 hw_id=BUTTON:1039 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.623] MBNG_MATRIX_NotifyToggle(1, 40, 0) [ 407.624] MBNG_DIN_NotifyToggle(1040, 0) [ 407.625] [EVENT] id=BUTTON:1040 hw_id=BUTTON:1040 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.626] MBNG_MATRIX_NotifyToggle(1, 41, 0) [ 407.626] MBNG_DIN_NotifyToggle(1041, 0) [ 407.627] [EVENT] id=BUTTON:1041 hw_id=BUTTON:1041 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.628] MBNG_MATRIX_NotifyToggle(1, 42, 0) [ 407.628] MBNG_DIN_NotifyToggle(1042, 0) [ 407.629] [EVENT] id=BUTTON:1042 hw_id=BUTTON:1042 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.629] MBNG_MATRIX_NotifyToggle(1, 43, 0) [ 407.629] MBNG_DIN_NotifyToggle(1043, 0) [ 407.630] [EVENT] id=BUTTON:1043 hw_id=BUTTON:1043 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.630] MBNG_MATRIX_NotifyToggle(1, 44, 0) [ 407.630] MBNG_DIN_NotifyToggle(1044, 0) [ 407.630] [EVENT] id=BUTTON:1044 hw_id=BUTTON:1044 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.630] MBNG_MATRIX_NotifyToggle(1, 45, 0) [ 407.630] MBNG_DIN_NotifyToggle(1045, 0) [ 407.631] [EVENT] id=BUTTON:1045 hw_id=BUTTON:1045 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.631] MBNG_MATRIX_NotifyToggle(1, 46, 0) [ 407.631] MBNG_DIN_NotifyToggle(1046, 0) [ 407.631] [EVENT] id=BUTTON:1046 hw_id=BUTTON:1046 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.631] MBNG_MATRIX_NotifyToggle(1, 47, 0) [ 407.631] MBNG_DIN_NotifyToggle(1047, 0) [ 407.631] [EVENT] id=BUTTON:1047 hw_id=BUTTON:1047 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.633] MBNG_MATRIX_NotifyToggle(1, 48, 0) [ 407.634] MBNG_DIN_NotifyToggle(1048, 0) [ 407.635] [EVENT] id=BUTTON:1048 hw_id=BUTTON:1048 bank=0 fwd_id=DISABLED:0 type=NoteOn value=127 label= [ 407.635] MBNG_MATRIX_NotifyToggle(1, 33, 0) [ 407.635] MBNG_DIN_NotifyToggle(1033, 0) [ 407.635] [EVENT] id=BUTTON:1033 hw_id=BUTTON:1033 bank=0 fwd_id=DISABLED:0 type=NoteOn value=0 label= [ 407.635] MBNG_MATRIX_NotifyToggle(1, 34, 0) [ 407.635] MBNG_DIN_NotifyToggle(1034, 0) [ 407.635] [EVENT] id=BUTTON:1034 hw_id=BUTTON:1034 bank=0 fwd_id=DISABLED:0 type=NoteOn value=0 label= [ 407.635] MBNG_MATRIX_NotifyToggle(1, 35, 0) [ 407.636] MBNG_DIN_NotifyToggle(1035, 0) [ 407.636] [EVENT] id=BUTTON:1035 hw_id=BUTTON:1035 bank=0 fwd_id=DISABLED:0 type=NoteOn value=0 label= [ 407.636] MBNG_MATRIX_NotifyToggle(1, 36, 0) [ 407.636] MBNG_DIN_NotifyToggle(1036, 0) [ 407.636] [EVENT] id=BUTTON:1036 hw_id=BUTTON:1036 bank=0 fwd_id=DISABLED:0 type=NoteOn value=0 label= [ 407.636] MBNG_MATRIX_NotifyToggle(1, 37, 0) [ 407.636] MBNG_DIN_NotifyToggle(1037, 0) Quote Link to comment Share on other sites More sharing options...
mumblecake Posted January 8, 2016 Author Report Share Posted January 8, 2016 Hi Thorsten, Just as an update: I have now changed the configuration and decided to run the same "waiting test" to check for glitches with debug on. Sure enough the glitches occured eventually but they are not any longer causing the keys on the next keyboard to get stuck. In case no event fires when those DIN Matrix inputs actuate. Thank you very much again. That had been bugging me for months and I don't think I would have ever found the reason without your help. It still means that there is an electrical problem which induces those glitches but at least they aren't having such a big effect anymore (one step at a time). Best Regards Mathis Quote Link to comment Share on other sites More sharing options...
TK. Posted January 9, 2016 Report Share Posted January 9, 2016 Hi Mathis, I'm glad that we clarified this :) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.