Jump to content

[solved] debug output shows different keys pressed, but notes are the same?


ilmenator
 Share

Recommended Posts

Hi,

I have a project for which I want to use an old Roland 37 keys keyboard. Apparently, it follows the Fatar DF type scheme, but with inversed diodes, so I set

set kb 1 din_inverted on

and configured the jumper into the pull down position on the DIO_MATRIX board. I am on an STM32F407G-DISC1.

Interestingly, when using midibox_kb_v1_016 from the download page (precompiled), it works ok (there is still a problem where a number of keys generate wrong note numbers, but at least I get note on and off events for each key and velocity data is correct). However, when using midibox_ng_v1_035 from the download page (again, precompiled), I get absolutely nothing.

Currently, I cannot compile from the source code, but is the MB NG precompiled version up to date?

Best, ilmenator

Edited by ilmenator
Link to comment
Share on other sites

Just to make the two cases more comparable, here are the specific configurations:

NG:

# KEYBOARD hardware
KEYBOARD n=1   rows=8  dout_sr1=1  dout_sr2=2  din_sr1=1  din_sr2=2  din_inverted=on  break_inverted=0  din_key_offset=32 \
               make_debounced=0 \
               scan_velocity=1  scan_optimized=0  note_offset=32 \
               delay_fastest=5  delay_fastest_black_keys=0  delay_slowest=100

EVENT_KB id=1  type=NoteOn chn=1 key=any use_key_number=1 range=0:127  ports=00000000000011001000 lcd_pos=1:1:1 label="Note %n"

KEYBOARD n=2   rows=0  dout_sr1=0  dout_sr2=0  din_sr1=0  din_sr2=0  din_inverted=0  break_inverted=0  din_key_offset=32 \
               make_debounced=0 \
               scan_velocity=1  scan_optimized=0  note_offset=36 \
               delay_fastest=5  delay_fastest_black_keys=0  delay_slowest=100

 

KB:

[106059.595] kb 1
[106059.597] kb 1 debug on
[106059.597] kb 1 midi_ports 0x1011
[106059.597] kb 1 midi_chn 1
[106059.597] kb 1 note_offset 36
[106059.597] kb 1 rows 8
[106059.597] kb 1 velocity on
[106059.597] kb 1 release_velocity off
[106059.597] kb 1 optimized off
[106059.597] kb 1 dout_sr1 1
[106059.597] kb 1 dout_sr2 2
[106059.597] kb 1 din_sr1 1
[106059.597] kb 1 din_sr2 2
[106059.597] kb 1 din_key_offset 32
[106059.597] kb 1 din_inverted on
[106059.597] kb 1 break_inverted off
[106059.598] kb 1 make_debounced off
[106059.598] kb 1 break_is_make off
[106059.598] kb 1 delay_fastest 50
[106059.599] kb 1 delay_fastest_black_keys 0
[106059.599] kb 1 delay_fastest_release 150
[106059.600] kb 1 delay_fastest_release_black_keys 0
[106059.600] kb 1 delay_slowest 1000
[106059.600] kb 1 delay_slowest_release 1000
[106059.600] kb 1 ain_pitchwheel off
[106059.600] kb 1 ctrl_pitchwheel 128 (PitchBend)
[106059.600] kb 1 ain_pitchwheel_inverted off
[106059.600] kb 1 ain_modwheel off
[106059.600] kb 1 ctrl_modwheel 1 (CC)
[106059.600] kb 1 ain_modwheel_inverted off
[106059.600] kb 1 ain_expression off
[106059.600] kb 1 ctrl_expression 11 (CC)
[106059.600] kb 1 ain_expression_inverted off
[106059.600] kb 1 ain_sustain off
[106059.600] kb 1 ctrl_sustain 64 (CC)
[106059.600] kb 1 ain_sustain_inverted off
[106059.600] kb 1 ain_sustain_switch off
[106059.600] kb 1 ain_bandwidth_ms 0
[106059.600] AIN Calibration Mode disabled.

 

Link to comment
Share on other sites

Hm... does it make a difference if you replace din_inverted=on with din_inverted=1?

I used a 76key Roland synthkeybed in the past which has also DF layout with inverted diodes. That worked pretty much okay... except for the velocity... it seems that the velocity gets scanned a lot slower when using inverted keybeds... the resolution was quite low. But that's a while ago...

Link to comment
Share on other sites

Heck, yes! That was a good hint, thanks! :cheers:

Now I only need to find out why some of the notes are shifted... What I get is this:

midibox_kb_20161217_134917_resized.thumb

So, the first two Make/Break groups work ok, but for some strange reason the first two keys of the third one are shifted upwards. What I don't get is why the remainder of that group (except for the seventh key) is giving me the correct notes??

Link to comment
Share on other sites

Ok, that has to do with the din_key_offset parameter - if I set din_key_offset=0 then the notes are ok up until G3. Which apparently means, that the right half of the keyboard is connected through the second connector, starting with the third Make/Break group of keys. However, the fifths group starts with C1 again, going up to E1 on the uppermost key (which should be C4)...

Edited by ilmenator
fixed a typo
Link to comment
Share on other sites

Here is the debug output from pressing the C1 key:

[127304.986] ---
[127304.986] DOUT SR1.7:  00000000  00000000
[127304.986] DOUT SR1.6:  10000000  00000000
[127304.987] DOUT SR1.5:  00000000  00000000
[127304.987] DOUT SR1.4:  00000000  00000000
[127304.987] DOUT SR1.3:  00000000  00000000
[127304.987] DOUT SR1.2:  00000000  00000000
[127304.987] DOUT SR1.1:  00000000  00000000
[127304.987] DOUT SR1.0:  00000000  00000000
[127304.987] DOUT SR2.7:  11111111  11111111
[127304.987] DOUT SR2.6:  11111111  11111111
[127304.987] DOUT SR2.5:  11111111  11111111
[127304.987] DOUT SR2.4:  11111111  11111111
[127304.988] DOUT SR2.3:  11111111  11111111
[127304.988] DOUT SR2.2:  11111111  11111111
[127304.988] DOUT SR2.1:  11111111  11111111
[127304.988] DOUT SR2.0:  11111111  11111111
[127304.989] KB1: DOUT#1.D6 / DIN#1.D0: pressed    -->  key= 0, break contact, note=C-1 (36)
[127304.989] Entry: timestamp_break=4683 timestamp_make=0
[127304.990] ---
[127304.990] DOUT SR1.7:  10000000  00000000
[127304.990] DOUT SR1.6:  10000000  00000000
[127304.991] DOUT SR1.5:  00000000  00000000
[127304.991] DOUT SR1.4:  00000000  00000000
[127304.991] DOUT SR1.3:  00000000  00000000
[127304.991] DOUT SR1.2:  00000000  00000000
[127304.991] DOUT SR1.1:  00000000  00000000
[127304.991] DOUT SR1.0:  00000000  00000000
[127304.991] DOUT SR2.7:  11111111  11111111
[127304.991] DOUT SR2.6:  11111111  11111111
[127304.992] DOUT SR2.5:  11111111  11111111
[127304.992] DOUT SR2.4:  11111111  11111111
[127304.992] DOUT SR2.3:  11111111  11111111
[127304.992] DOUT SR2.2:  11111111  11111111
[127304.992] DOUT SR2.1:  11111111  11111111
[127304.992] DOUT SR2.0:  11111111  11111111
[127304.992] KB1: DOUT#1.D7 / DIN#1.D0: pressed    -->  key= 0, make contact, note=C-1 (36)
[127304.992] Entry: timestamp_break=4683 timestamp_make=4730
[127304.993] PRESSED note=C-1, delay=47, velocity=71 (played from a white key)
[127305.820] ---
[127305.820] DOUT SR1.7:  00000000  00000000
[127305.820] DOUT SR1.6:  10000000  00000000
[127305.820] DOUT SR1.5:  00000000  00000000
[127305.820] DOUT SR1.4:  00000000  00000000
[127305.821] DOUT SR1.3:  00000000  00000000
[127305.821] DOUT SR1.2:  00000000  00000000
[127305.821] DOUT SR1.1:  00000000  00000000
[127305.821] DOUT SR1.0:  00000000  00000000
[127305.821] DOUT SR2.7:  11111111  11111111
[127305.821] DOUT SR2.6:  11111111  11111111
[127305.821] DOUT SR2.5:  11111111  11111111
[127305.821] DOUT SR2.4:  11111111  11111111
[127305.822] DOUT SR2.3:  11111111  11111111
[127305.822] DOUT SR2.2:  11111111  11111111
[127305.822] DOUT SR2.1:  11111111  11111111
[127305.822] DOUT SR2.0:  11111111  11111111
[127305.822] KB1: DOUT#1.D7 / DIN#1.D0: depressed  -->  key= 0, make contact, note=C-1 (36)
[127305.822] Entry: timestamp_break=0 timestamp_make=0
[127305.823] RELEASED note=C-1
[127305.830] ---
[127305.830] DOUT SR1.7:  00000000  00000000
[127305.830] DOUT SR1.6:  00000000  00000000
[127305.830] DOUT SR1.5:  00000000  00000000
[127305.830] DOUT SR1.4:  00000000  00000000
[127305.830] DOUT SR1.3:  00000000  00000000
[127305.831] DOUT SR1.2:  00000000  00000000
[127305.831] DOUT SR1.1:  00000000  00000000
[127305.831] DOUT SR1.0:  00000000  00000000
[127305.831] DOUT SR2.7:  11111111  11111111
[127305.831] DOUT SR2.6:  11111111  11111111
[127305.831] DOUT SR2.5:  11111111  11111111
[127305.831] DOUT SR2.4:  11111111  11111111
[127305.832] DOUT SR2.3:  11111111  11111111
[127305.832] DOUT SR2.2:  11111111  11111111
[127305.832] DOUT SR2.1:  11111111  11111111
[127305.833] DOUT SR2.0:  11111111  11111111
[127305.833] KB1: DOUT#1.D6 / DIN#1.D0: depressed  -->  key= 0, break contact, note=C-1 (36)
[127305.833] Entry: timestamp_break=0 timestamp_make=0

And this is for pressing the G#3 key:

[127332.400] ---
[127332.400] DOUT SR1.7:  00000000  00000000
[127332.400] DOUT SR1.6:  00000000  10000000
[127332.400] DOUT SR1.5:  00000000  00000000
[127332.400] DOUT SR1.4:  00000000  00000000
[127332.400] DOUT SR1.3:  00000000  00000000
[127332.400] DOUT SR1.2:  00000000  00000000
[127332.400] DOUT SR1.1:  00000000  00000000
[127332.400] DOUT SR1.0:  00000000  00000000
[127332.401] DOUT SR2.7:  11111111  11111111
[127332.401] DOUT SR2.6:  11111111  11111111
[127332.401] DOUT SR2.5:  11111111  11111111
[127332.401] DOUT SR2.4:  11111111  11111111
[127332.401] DOUT SR2.3:  11111111  11111111
[127332.401] DOUT SR2.2:  11111111  11111111
[127332.402] DOUT SR2.1:  11111111  11111111
[127332.402] DOUT SR2.0:  11111111  11111111
[127332.402] KB1: DOUT#1.D6 / DIN#2.D0: pressed    -->  key= 0, break contact, note=C-1 (36)
[127332.402] Entry: timestamp_break=33407 timestamp_make=0
[127332.405] ---
[127332.405] DOUT SR1.7:  00000000  10000000
[127332.405] DOUT SR1.6:  00000000  10000000
[127332.405] DOUT SR1.5:  00000000  00000000
[127332.405] DOUT SR1.4:  00000000  00000000
[127332.405] DOUT SR1.3:  00000000  00000000
[127332.405] DOUT SR1.2:  00000000  00000000
[127332.405] DOUT SR1.1:  00000000  00000000
[127332.405] DOUT SR1.0:  00000000  00000000
[127332.406] DOUT SR2.7:  11111111  11111111
[127332.406] DOUT SR2.6:  11111111  11111111
[127332.406] DOUT SR2.5:  11111111  11111111
[127332.406] DOUT SR2.4:  11111111  11111111
[127332.406] DOUT SR2.3:  11111111  11111111
[127332.406] DOUT SR2.2:  11111111  11111111
[127332.407] DOUT SR2.1:  11111111  11111111
[127332.407] DOUT SR2.0:  11111111  11111111
[127332.407] KB1: DOUT#1.D7 / DIN#2.D0: pressed    -->  key= 0, make contact, note=C-1 (36)
[127332.407] Entry: timestamp_break=33407 timestamp_make=33454
[127332.407] PRESSED note=C-1, delay=47, velocity=71 (played from a white key)
[127332.506] ---
[127332.506] DOUT SR1.7:  00000000  00000000
[127332.506] DOUT SR1.6:  00000000  10000000
[127332.506] DOUT SR1.5:  00000000  00000000
[127332.506] DOUT SR1.4:  00000000  00000000
[127332.506] DOUT SR1.3:  00000000  00000000
[127332.506] DOUT SR1.2:  00000000  00000000
[127332.506] DOUT SR1.1:  00000000  00000000
[127332.506] DOUT SR1.0:  00000000  00000000
[127332.506] DOUT SR2.7:  11111111  11111111
[127332.507] DOUT SR2.6:  11111111  11111111
[127332.507] DOUT SR2.5:  11111111  11111111
[127332.507] DOUT SR2.4:  11111111  11111111
[127332.507] DOUT SR2.3:  11111111  11111111
[127332.507] DOUT SR2.2:  11111111  11111111
[127332.507] DOUT SR2.1:  11111111  11111111
[127332.508] DOUT SR2.0:  11111111  11111111
[127332.508] KB1: DOUT#1.D7 / DIN#2.D0: depressed  -->  key= 0, make contact, note=C-1 (36)
[127332.508] Entry: timestamp_break=0 timestamp_make=0
[127332.508] RELEASED note=C-1
[127332.541] ---
[127332.541] DOUT SR1.7:  00000000  00000000
[127332.541] DOUT SR1.6:  00000000  00000000
[127332.541] DOUT SR1.5:  00000000  00000000
[127332.541] DOUT SR1.4:  00000000  00000000
[127332.541] DOUT SR1.3:  00000000  00000000
[127332.541] DOUT SR1.2:  00000000  00000000
[127332.541] DOUT SR1.1:  00000000  00000000
[127332.541] DOUT SR1.0:  00000000  00000000
[127332.542] DOUT SR2.7:  11111111  11111111
[127332.542] DOUT SR2.6:  11111111  11111111
[127332.542] DOUT SR2.5:  11111111  11111111
[127332.542] DOUT SR2.4:  11111111  11111111
[127332.542] DOUT SR2.3:  11111111  11111111
[127332.542] DOUT SR2.2:  11111111  11111111
[127332.542] DOUT SR2.1:  11111111  11111111
[127332.543] DOUT SR2.0:  11111111  11111111
[127332.543] KB1: DOUT#1.D6 / DIN#2.D0: depressed  -->  key= 0, break contact, note=C-1 (36)
[127332.543] Entry: timestamp_break=0 timestamp_make=0

The make contact is different, but the note I get is still the same...

Link to comment
Share on other sites

  • 1 month later...

I guess you don't have any further informations about the keybed itself? 

What I did on a yamaha keybed some time ago is using jumper cables to check out where which BK / MK / row is. But in that case the local yamaha support was kind enough to send me the schematic of the keybed... so in the end it was not that hard... 

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...