Cristiano

Midibox_NG Event NoteOn lost

5 posts in this topic

Hi all,

I quickly searched if someone else detected this behaviour, but I did not find anything similar, in case please forgive.

The environment is MBHP_CORE_STM32F4, one MBHP_DIO_MATRIX connected with two 61 keys Fatar keyboards, with velocity.

Default.ngc is 

RESET_HW

LCD "%CKeyboard Test"

# reduce number of SRs for faster scan
# with 2 SRs the scan takes ca. 500 uS instead of 2.5 mS
SRIO num_sr=4

# keyboard configuration
KEYBOARD n=1   rows=8  dout_sr1=1  dout_sr2=2  din_sr1=1  din_sr2=2 \
               din_inverted=0  break_inverted=0  din_key_offset=32 \
               scan_velocity=1  scan_optimized=0  note_offset=36 \
               delay_fastest=50  delay_fastest_black_keys=0  delay_slowest=1000

KEYBOARD n=2   rows=8  dout_sr1=3  dout_sr2=4  din_sr1=3  din_sr2=4 \
               din_inverted=0  break_inverted=0  din_key_offset=32 \
               scan_velocity=1  scan_optimized=0  note_offset=36 \
               delay_fastest=50  delay_fastest_black_keys=0  delay_slowest=1000

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

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


ROUTER n=1 src_port=USB1 src_chn=17 dst_port=OUT1 dst_chn=17
ROUTER n=2 src_port=IN1 src_chn=17 dst_port=USB1 dst_chn=17

If I play a trill (with or without scanning optimisation), more or less one time on four I lose some noteOn.
When connected with a synthesizer, it is simple to hear that sometimes one note (tipically lower of two, but I am not sure) does not play. If I am lucky, I can stop playing keeping the lower key pressed, but no sound comes from synth.

I tried to see what happens with MIOS Studio if I play (for example) e2 d#2 e2 d#2 e2 d#2 e2 d#2 (e2 d#2 4 times)

[22240.513] 90 34 7c   Chn# 1  Note On  E-2  Vel:124
[22240.606] 90 33 7d   Chn# 1  Note On  D#2  Vel:125
[22240.636] 90 34 00   Chn# 1  Note Off E-2 (optimized)
[22240.714] 90 33 00   Chn# 1  Note Off D#2 (optimized)
[22240.727] 90 34 7b   Chn# 1  Note On  E-2  Vel:123
[22240.813] 90 33 7d   Chn# 1  Note On  D#2  Vel:125
[22240.819] 90 34 00   Chn# 1  Note Off E-2 (optimized)
[22240.911] 90 33 00   Chn# 1  Note Off D#2 (optimized)
[22240.911] 90 34 7c   Chn# 1  Note On  E-2  Vel:124
[22240.999] 90 33 7d   Chn# 1  Note On  D#2  Vel:125
[22241.004] 90 34 00   Chn# 1  Note Off E-2 (optimized)
[22241.060] 90 34 66   Chn# 1  Note On  E-2  Vel:102
[22241.097] 90 33 00   Chn# 1  Note Off D#2 (optimized)
[22241.137] 90 34 00   Chn# 1  Note Off E-2 (optimized)

I tried also with Midibox_KB, only with scanning optimisation off (it seems that scan_optimized=1 directive is not processed), verified on terminal with command "kb 1", but it seems that the problem still occurs.
I tried also with couple of white keys, and it happens as well.

Anyone can suggest a solution, if there is something to modify in NGC file, or if I am disregarding something?

Thanks to all and regards,

Cristiano

Share this post


Link to post
Share on other sites

Hi all,

I did some experiments, and discovered reason of this behaviour.

First of all, I enabled debug

set kb 1 debug on

then I tried to play keyboard, while Mios Studio monitoring (excellent tool)

Spoiler

[5191.071] 90 2f 79   Chn# 1  Note On  B-1  Vel:121
[5191.142] 90 2e 79   Chn# 1  Note On  A#1  Vel:121
[5191.165] 90 2f 00   Chn# 1  Note Off B-1 (optimized)
[5191.266] 90 2f 7b   Chn# 1  Note On  B-1  Vel:123
[5191.300] 90 2e 00   Chn# 1  Note Off A#1 (optimized)
[5191.351] 90 2e 7a   Chn# 1  Note On  A#1  Vel:122
[5191.357] 90 2f 00   Chn# 1  Note Off B-1 (optimized)
[5191.438] 90 2f 7d   Chn# 1  Note On  B-1  Vel:125
[5191.472] 90 2e 00   Chn# 1  Note Off A#1 (optimized)
[5191.531] 90 2f 00   Chn# 1  Note Off B-1 (optimized)
[5191.597] 90 2f 7d   Chn# 1  Note On  B-1  Vel:125
[5191.686] 90 2f 00   Chn# 1  Note Off B-1 (optimized)

revealing last a#1 note (I was keeping it pressed for a while after last B1 note off) not being detected.

Debug window shows that...

Spoiler

[5191.059] ---
[5191.059] DOUT SR1.7:  00000000  00000000
[5191.059] DOUT SR1.6:  00000000  00000000
[5191.059] DOUT SR1.5:  00000000  00000000
[5191.059] DOUT SR1.4:  00010000  00000000
[5191.059] DOUT SR1.3:  00000000  00000000
[5191.059] DOUT SR1.2:  00000000  00000000
[5191.060] DOUT SR1.1:  00000000  00000000
[5191.060] DOUT SR1.0:  00000000  00000000
[5191.060] DOUT SR2.7:  00000000  00000000
[5191.060] DOUT SR2.6:  00000000  00000000
[5191.060] DOUT SR2.5:  00000000  00000000
[5191.060] DOUT SR2.4:  00000000  00000000
[5191.060] DOUT SR2.3:  00000000  00000000
[5191.060] DOUT SR2.2:  00000000  00000000
[5191.060] DOUT SR2.1:  00000000  00000000
[5191.061] DOUT SR2.0:  00000000  00000000
[5191.061] KB1: DOUT#1.D4 / DIN#1.D3: pressed    -->  key=11, break contact, note=B-1 (47)
[5191.061] Entry: timestamp_break=51674 timestamp_make=0
[5191.068] ---
[5191.069] DOUT SR1.7:  00000000  00000000
[5191.069] DOUT SR1.6:  00000000  00000000
[5191.069] DOUT SR1.5:  00010000  00000000
[5191.069] DOUT SR1.4:  00010000  00000000
[5191.069] DOUT SR1.3:  00000000  00000000
[5191.069] DOUT SR1.2:  00000000  00000000
[5191.069] DOUT SR1.1:  00000000  00000000
[5191.069] DOUT SR1.0:  00000000  00000000
[5191.070] DOUT SR2.7:  00000000  00000000
[5191.070] DOUT SR2.6:  00000000  00000000
[5191.070] DOUT SR2.5:  00000000  00000000
[5191.070] DOUT SR2.4:  00000000  00000000
[5191.070] DOUT SR2.3:  00000000  00000000
[5191.070] DOUT SR2.2:  00000000  00000000
[5191.070] DOUT SR2.1:  00000000  00000000
[5191.071] DOUT SR2.0:  00000000  00000000
[5191.071] KB1: DOUT#1.D5 / DIN#1.D3: pressed    -->  key=11, make contact, note=B-1 (47)
[5191.071] Entry: timestamp_break=51674 timestamp_make=51769
[5191.071] PRESSED note=B-1, delay=95, velocity=121 (played from a white key)
[5191.130] ---
[5191.131] DOUT SR1.7:  00000000  00000000
[5191.131] DOUT SR1.6:  00000000  00000000
[5191.131] DOUT SR1.5:  00010000  00000000
[5191.131] DOUT SR1.4:  00110000  00000000
[5191.131] DOUT SR1.3:  00000000  00000000
[5191.131] DOUT SR1.2:  00000000  00000000
[5191.132] DOUT SR1.1:  00000000  00000000
[5191.132] DOUT SR1.0:  00000000  00000000
[5191.132] DOUT SR2.7:  00000000  00000000
[5191.132] DOUT SR2.6:  00000000  00000000
[5191.132] DOUT SR2.5:  00000000  00000000
[5191.132] DOUT SR2.4:  00000000  00000000
[5191.132] DOUT SR2.3:  00000000  00000000
[5191.132] DOUT SR2.2:  00000000  00000000
[5191.132] DOUT SR2.1:  00000000  00000000
[5191.133] DOUT SR2.0:  00000000  00000000
[5191.133] KB1: DOUT#1.D4 / DIN#1.D2: pressed    -->  key=10, break contact, note=A#1 (46)
[5191.133] Entry: timestamp_break=52408 timestamp_make=0
[5191.139] ---
[5191.140] DOUT SR1.7:  00000000  00000000
[5191.140] DOUT SR1.6:  00000000  00000000
[5191.140] DOUT SR1.5:  00110000  00000000
[5191.140] DOUT SR1.4:  00110000  00000000
[5191.140] DOUT SR1.3:  00000000  00000000
[5191.140] DOUT SR1.2:  00000000  00000000
[5191.140] DOUT SR1.1:  00000000  00000000
[5191.140] DOUT SR1.0:  00000000  00000000
[5191.140] DOUT SR2.7:  00000000  00000000
[5191.140] DOUT SR2.6:  00000000  00000000
[5191.141] DOUT SR2.5:  00000000  00000000
[5191.141] DOUT SR2.4:  00000000  00000000
[5191.141] DOUT SR2.3:  00000000  00000000
[5191.141] DOUT SR2.2:  00000000  00000000
[5191.142] DOUT SR2.1:  00000000  00000000
[5191.142] DOUT SR2.0:  00000000  00000000
[5191.142] KB1: DOUT#1.D5 / DIN#1.D2: pressed    -->  key=10, make contact, note=A#1 (46)
[5191.142] Entry: timestamp_break=52408 timestamp_make=52504
[5191.142] PRESSED note=A#1, delay=96, velocity=121 (played from a black key)
[5191.163] ---
[5191.163] DOUT SR1.7:  00000000  00000000
[5191.163] DOUT SR1.6:  00000000  00000000
[5191.163] DOUT SR1.5:  00100000  00000000
[5191.163] DOUT SR1.4:  00110000  00000000
[5191.163] DOUT SR1.3:  00000000  00000000
[5191.164] DOUT SR1.2:  00000000  00000000
[5191.164] DOUT SR1.1:  00000000  00000000
[5191.164] DOUT SR1.0:  00000000  00000000
[5191.164] DOUT SR2.7:  00000000  00000000
[5191.164] DOUT SR2.6:  00000000  00000000
[5191.164] DOUT SR2.5:  00000000  00000000
[5191.164] DOUT SR2.4:  00000000  00000000
[5191.164] DOUT SR2.3:  00000000  00000000
[5191.165] DOUT SR2.2:  00000000  00000000
[5191.165] DOUT SR2.1:  00000000  00000000
[5191.165] DOUT SR2.0:  00000000  00000000
[5191.165] KB1: DOUT#1.D5 / DIN#1.D3: depressed  -->  key=11, make contact, note=B-1 (47)
[5191.165] Entry: timestamp_break=0 timestamp_make=0
[5191.165] RELEASED note=B-1
[5191.174] ---
[5191.175] DOUT SR1.7:  00000000  00000000
[5191.175] DOUT SR1.6:  00000000  00000000
[5191.175] DOUT SR1.5:  00100000  00000000
[5191.175] DOUT SR1.4:  00100000  00000000
[5191.175] DOUT SR1.3:  00000000  00000000
[5191.175] DOUT SR1.2:  00000000  00000000
[5191.175] DOUT SR1.1:  00000000  00000000
[5191.175] DOUT SR1.0:  00000000  00000000
[5191.176] DOUT SR2.7:  00000000  00000000
[5191.176] DOUT SR2.6:  00000000  00000000
[5191.176] DOUT SR2.5:  00000000  00000000
[5191.176] DOUT SR2.4:  00000000  00000000
[5191.176] DOUT SR2.3:  00000000  00000000
[5191.176] DOUT SR2.2:  00000000  00000000
[5191.177] DOUT SR2.1:  00000000  00000000
[5191.177] DOUT SR2.0:  00000000  00000000
[5191.177] KB1: DOUT#1.D4 / DIN#1.D3: depressed  -->  key=11, break contact, note=B-1 (47)
[5191.177] Entry: timestamp_break=0 timestamp_make=0
[5191.255] ---
[5191.256] DOUT SR1.7:  00000000  00000000
[5191.256] DOUT SR1.6:  00000000  00000000
[5191.256] DOUT SR1.5:  00100000  00000000
[5191.256] DOUT SR1.4:  00110000  00000000
[5191.256] DOUT SR1.3:  00000000  00000000
[5191.256] DOUT SR1.2:  00000000  00000000
[5191.256] DOUT SR1.1:  00000000  00000000
[5191.256] DOUT SR1.0:  00000000  00000000
[5191.257] DOUT SR2.7:  00000000  00000000
[5191.257] DOUT SR2.6:  00000000  00000000
[5191.257] DOUT SR2.5:  00000000  00000000
[5191.257] DOUT SR2.4:  00000000  00000000
[5191.257] DOUT SR2.3:  00000000  00000000
[5191.257] DOUT SR2.2:  00000000  00000000
[5191.257] DOUT SR2.1:  00000000  00000000
[5191.257] DOUT SR2.0:  00000000  00000000
[5191.258] KB1: DOUT#1.D4 / DIN#1.D3: pressed    -->  key=11, break contact, note=B-1 (47)
[5191.258] Entry: timestamp_break=53693 timestamp_make=0
[5191.263] ---
[5191.264] DOUT SR1.7:  00000000  00000000
[5191.264] DOUT SR1.6:  00000000  00000000
[5191.264] DOUT SR1.5:  00110000  00000000
[5191.264] DOUT SR1.4:  00110000  00000000
[5191.264] DOUT SR1.3:  00000000  00000000
[5191.264] DOUT SR1.2:  00000000  00000000
[5191.264] DOUT SR1.1:  00000000  00000000
[5191.264] DOUT SR1.0:  00000000  00000000
[5191.264] DOUT SR2.7:  00000000  00000000
[5191.265] DOUT SR2.6:  00000000  00000000
[5191.265] DOUT SR2.5:  00000000  00000000
[5191.265] DOUT SR2.4:  00000000  00000000
[5191.266] DOUT SR2.3:  00000000  00000000
[5191.266] DOUT SR2.2:  00000000  00000000
[5191.266] DOUT SR2.1:  00000000  00000000
[5191.266] DOUT SR2.0:  00000000  00000000
[5191.266] KB1: DOUT#1.D5 / DIN#1.D3: pressed    -->  key=11, make contact, note=B-1 (47)
[5191.266] Entry: timestamp_break=53693 timestamp_make=53774
[5191.266] PRESSED note=B-1, delay=81, velocity=123 (played from a white key)
[5191.297] ---
[5191.298] DOUT SR1.7:  00000000  00000000
[5191.298] DOUT SR1.6:  00000000  00000000
[5191.298] DOUT SR1.5:  00010000  00000000
[5191.298] DOUT SR1.4:  00110000  00000000
[5191.298] DOUT SR1.3:  00000000  00000000
[5191.298] DOUT SR1.2:  00000000  00000000
[5191.298] DOUT SR1.1:  00000000  00000000
[5191.299] DOUT SR1.0:  00000000  00000000
[5191.299] DOUT SR2.7:  00000000  00000000
[5191.299] DOUT SR2.6:  00000000  00000000
[5191.299] DOUT SR2.5:  00000000  00000000
[5191.299] DOUT SR2.4:  00000000  00000000
[5191.299] DOUT SR2.3:  00000000  00000000
[5191.299] DOUT SR2.2:  00000000  00000000
[5191.299] DOUT SR2.1:  00000000  00000000
[5191.299] DOUT SR2.0:  00000000  00000000
[5191.300] KB1: DOUT#1.D5 / DIN#1.D2: depressed  -->  key=10, make contact, note=A#1 (46)
[5191.300] Entry: timestamp_break=0 timestamp_make=0
[5191.300] RELEASED note=A#1
[5191.315] ---
[5191.316] DOUT SR1.7:  00000000  00000000
[5191.316] DOUT SR1.6:  00000000  00000000
[5191.316] DOUT SR1.5:  00010000  00000000
[5191.316] DOUT SR1.4:  00010000  00000000
[5191.316] DOUT SR1.3:  00000000  00000000
[5191.316] DOUT SR1.2:  00000000  00000000
[5191.316] DOUT SR1.1:  00000000  00000000
[5191.316] DOUT SR1.0:  00000000  00000000
[5191.316] DOUT SR2.7:  00000000  00000000
[5191.317] DOUT SR2.6:  00000000  00000000
[5191.317] DOUT SR2.5:  00000000  00000000
[5191.317] DOUT SR2.4:  00000000  00000000
[5191.317] DOUT SR2.3:  00000000  00000000
[5191.318] DOUT SR2.2:  00000000  00000000
[5191.318] DOUT SR2.1:  00000000  00000000
[5191.318] DOUT SR2.0:  00000000  00000000
[5191.318] KB1: DOUT#1.D4 / DIN#1.D2: depressed  -->  key=10, break contact, note=A#1 (46)
[5191.318] Entry: timestamp_break=0 timestamp_make=0
[5191.340] ---
[5191.340] DOUT SR1.7:  00000000  00000000
[5191.340] DOUT SR1.6:  00000000  00000000
[5191.340] DOUT SR1.5:  00010000  00000000
[5191.340] DOUT SR1.4:  00110000  00000000
[5191.340] DOUT SR1.3:  00000000  00000000
[5191.340] DOUT SR1.2:  00000000  00000000
[5191.340] DOUT SR1.1:  00000000  00000000
[5191.340] DOUT SR1.0:  00000000  00000000
[5191.341] DOUT SR2.7:  00000000  00000000
[5191.341] DOUT SR2.6:  00000000  00000000
[5191.341] DOUT SR2.5:  00000000  00000000
[5191.341] DOUT SR2.4:  00000000  00000000
[5191.341] DOUT SR2.3:  00000000  00000000
[5191.341] DOUT SR2.2:  00000000  00000000
[5191.341] DOUT SR2.1:  00000000  00000000
[5191.341] DOUT SR2.0:  00000000  00000000
[5191.342] KB1: DOUT#1.D4 / DIN#1.D2: pressed    -->  key=10, break contact, note=A#1 (46)
[5191.342] Entry: timestamp_break=54553 timestamp_make=0
[5191.349] ---
[5191.349] DOUT SR1.7:  00000000  00000000
[5191.349] DOUT SR1.6:  00000000  00000000
[5191.349] DOUT SR1.5:  00110000  00000000
[5191.349] DOUT SR1.4:  00110000  00000000
[5191.349] DOUT SR1.3:  00000000  00000000
[5191.349] DOUT SR1.2:  00000000  00000000
[5191.349] DOUT SR1.1:  00000000  00000000
[5191.349] DOUT SR1.0:  00000000  00000000
[5191.349] DOUT SR2.7:  00000000  00000000
[5191.350] DOUT SR2.6:  00000000  00000000
[5191.350] DOUT SR2.5:  00000000  00000000
[5191.350] DOUT SR2.4:  00000000  00000000
[5191.350] DOUT SR2.3:  00000000  00000000
[5191.351] DOUT SR2.2:  00000000  00000000
[5191.351] DOUT SR2.1:  00000000  00000000
[5191.351] DOUT SR2.0:  00000000  00000000
[5191.351] KB1: DOUT#1.D5 / DIN#1.D2: pressed    -->  key=10, make contact, note=A#1 (46)
[5191.351] Entry: timestamp_break=54553 timestamp_make=54644
[5191.351] PRESSED note=A#1, delay=91, velocity=122 (played from a black key)
[5191.354] ---
[5191.354] DOUT SR1.7:  00000000  00000000
[5191.355] DOUT SR1.6:  00000000  00000000
[5191.355] DOUT SR1.5:  00100000  00000000
[5191.355] DOUT SR1.4:  00110000  00000000
[5191.355] DOUT SR1.3:  00000000  00000000
[5191.355] DOUT SR1.2:  00000000  00000000
[5191.355] DOUT SR1.1:  00000000  00000000
[5191.355] DOUT SR1.0:  00000000  00000000
[5191.355] DOUT SR2.7:  00000000  00000000
[5191.356] DOUT SR2.6:  00000000  00000000
[5191.356] DOUT SR2.5:  00000000  00000000
[5191.356] DOUT SR2.4:  00000000  00000000
[5191.356] DOUT SR2.3:  00000000  00000000
[5191.356] DOUT SR2.2:  00000000  00000000
[5191.356] DOUT SR2.1:  00000000  00000000
[5191.356] DOUT SR2.0:  00000000  00000000
[5191.357] KB1: DOUT#1.D5 / DIN#1.D3: depressed  -->  key=11, make contact, note=B-1 (47)
[5191.357] Entry: timestamp_break=0 timestamp_make=0
[5191.357] RELEASED note=B-1
[5191.363] ---
[5191.363] DOUT SR1.7:  00000000  00000000
[5191.364] DOUT SR1.6:  00000000  00000000
[5191.364] DOUT SR1.5:  00100000  00000000
[5191.364] DOUT SR1.4:  00100000  00000000
[5191.364] DOUT SR1.3:  00000000  00000000
[5191.364] DOUT SR1.2:  00000000  00000000
[5191.364] DOUT SR1.1:  00000000  00000000
[5191.364] DOUT SR1.0:  00000000  00000000
[5191.364] DOUT SR2.7:  00000000  00000000
[5191.365] DOUT SR2.6:  00000000  00000000
[5191.365] DOUT SR2.5:  00000000  00000000
[5191.365] DOUT SR2.4:  00000000  00000000
[5191.365] DOUT SR2.3:  00000000  00000000
[5191.366] DOUT SR2.2:  00000000  00000000
[5191.366] DOUT SR2.1:  00000000  00000000
[5191.366] DOUT SR2.0:  00000000  00000000
[5191.366] KB1: DOUT#1.D4 / DIN#1.D3: depressed  -->  key=11, break contact, note=B-1 (47)
[5191.366] Entry: timestamp_break=0 timestamp_make=0
[5191.429] ---
[5191.429] DOUT SR1.7:  00000000  00000000
[5191.430] DOUT SR1.6:  00000000  00000000
[5191.430] DOUT SR1.5:  00100000  00000000
[5191.430] DOUT SR1.4:  00110000  00000000
[5191.430] DOUT SR1.3:  00000000  00000000
[5191.430] DOUT SR1.2:  00000000  00000000
[5191.430] DOUT SR1.1:  00000000  00000000
[5191.430] DOUT SR1.0:  00000000  00000000
[5191.430] DOUT SR2.7:  00000000  00000000
[5191.430] DOUT SR2.6:  00000000  00000000
[5191.431] DOUT SR2.5:  00000000  00000000
[5191.431] DOUT SR2.4:  00000000  00000000
[5191.431] DOUT SR2.3:  00000000  00000000
[5191.431] DOUT SR2.2:  00000000  00000000
[5191.431] DOUT SR2.1:  00000000  00000000
[5191.432] DOUT SR2.0:  00000000  00000000
[5191.432] KB1: DOUT#1.D4 / DIN#1.D3: pressed    -->  key=11, break contact, note=B-1 (47)
[5191.432] Entry: timestamp_break=55468 timestamp_make=0
[5191.435] ---
[5191.435] DOUT SR1.7:  00000000  00000000
[5191.436] DOUT SR1.6:  00000000  00000000
[5191.436] DOUT SR1.5:  00110000  00000000
[5191.436] DOUT SR1.4:  00110000  00000000
[5191.436] DOUT SR1.3:  00000000  00000000
[5191.436] DOUT SR1.2:  00000000  00000000
[5191.436] DOUT SR1.1:  00000000  00000000
[5191.436] DOUT SR1.0:  00000000  00000000
[5191.436] DOUT SR2.7:  00000000  00000000
[5191.436] DOUT SR2.6:  00000000  00000000
[5191.437] DOUT SR2.5:  00000000  00000000
[5191.437] DOUT SR2.4:  00000000  00000000
[5191.437] DOUT SR2.3:  00000000  00000000
[5191.437] DOUT SR2.2:  00000000  00000000
[5191.437] DOUT SR2.1:  00000000  00000000
[5191.438] DOUT SR2.0:  00000000  00000000
[5191.438] KB1: DOUT#1.D5 / DIN#1.D3: pressed    -->  key=11, make contact, note=B-1 (47)
[5191.438] Entry: timestamp_break=55468 timestamp_make=55534
[5191.438] PRESSED note=B-1, delay=66, velocity=125 (played from a white key)
[5191.469] ---
[5191.470] DOUT SR1.7:  00000000  00000000
[5191.470] DOUT SR1.6:  00000000  00000000
[5191.470] DOUT SR1.5:  00010000  00000000
[5191.470] DOUT SR1.4:  00110000  00000000
[5191.470] DOUT SR1.3:  00000000  00000000
[5191.470] DOUT SR1.2:  00000000  00000000
[5191.470] DOUT SR1.1:  00000000  00000000
[5191.470] DOUT SR1.0:  00000000  00000000
[5191.470] DOUT SR2.7:  00000000  00000000
[5191.470] DOUT SR2.6:  00000000  00000000
[5191.471] DOUT SR2.5:  00000000  00000000
[5191.471] DOUT SR2.4:  00000000  00000000
[5191.471] DOUT SR2.3:  00000000  00000000
[5191.471] DOUT SR2.2:  00000000  00000000
[5191.471] DOUT SR2.1:  00000000  00000000
[5191.472] DOUT SR2.0:  00000000  00000000
[5191.472] KB1: DOUT#1.D5 / DIN#1.D2: depressed  -->  key=10, make contact, note=A#1 (46)
[5191.472] Entry: timestamp_break=0 timestamp_make=0
[5191.472] RELEASED note=A#1
[5191.502] ---
[5191.503] DOUT SR1.7:  00000000  00000000
[5191.503] DOUT SR1.6:  00000000  00000000
[5191.503] DOUT SR1.5:  00110000  00000000
[5191.503] DOUT SR1.4:  00110000  00000000
[5191.503] DOUT SR1.3:  00000000  00000000
[5191.503] DOUT SR1.2:  00000000  00000000
[5191.503] DOUT SR1.1:  00000000  00000000
[5191.503] DOUT SR1.0:  00000000  00000000
[5191.504] DOUT SR2.7:  00000000  00000000
[5191.504] DOUT SR2.6:  00000000  00000000
[5191.504] DOUT SR2.5:  00000000  00000000
[5191.504] DOUT SR2.4:  00000000  00000000
[5191.504] DOUT SR2.3:  00000000  00000000
[5191.504] DOUT SR2.2:  00000000  00000000
[5191.504] DOUT SR2.1:  00000000  00000000
[5191.504] DOUT SR2.0:  00000000  00000000
[5191.505] KB1: DOUT#1.D5 / DIN#1.D2: pressed    -->  key=10, make contact, note=A#1 (46)
[5191.505] Entry: timestamp_break=0 timestamp_make=56224
[5191.528] ---
[5191.529] DOUT SR1.7:  00000000  00000000
[5191.529] DOUT SR1.6:  00000000  00000000
[5191.529] DOUT SR1.5:  00100000  00000000
[5191.529] DOUT SR1.4:  00110000  00000000
[5191.529] DOUT SR1.3:  00000000  00000000
[5191.529] DOUT SR1.2:  00000000  00000000
[5191.529] DOUT SR1.1:  00000000  00000000
[5191.529] DOUT SR1.0:  00000000  00000000
[5191.529] DOUT SR2.7:  00000000  00000000
[5191.529] DOUT SR2.6:  00000000  00000000
[5191.530] DOUT SR2.5:  00000000  00000000
[5191.530] DOUT SR2.4:  00000000  00000000
[5191.530] DOUT SR2.3:  00000000  00000000
[5191.530] DOUT SR2.2:  00000000  00000000
[5191.531] DOUT SR2.1:  00000000  00000000
[5191.531] DOUT SR2.0:  00000000  00000000
[5191.531] KB1: DOUT#1.D5 / DIN#1.D3: depressed  -->  key=11, make contact, note=B-1 (47)
[5191.531] Entry: timestamp_break=0 timestamp_make=0
[5191.531] RELEASED note=B-1
[5191.537] ---
[5191.537] DOUT SR1.7:  00000000  00000000
[5191.538] DOUT SR1.6:  00000000  00000000
[5191.538] DOUT SR1.5:  00100000  00000000
[5191.538] DOUT SR1.4:  00100000  00000000
[5191.538] DOUT SR1.3:  00000000  00000000
[5191.538] DOUT SR1.2:  00000000  00000000
[5191.538] DOUT SR1.1:  00000000  00000000
[5191.538] DOUT SR1.0:  00000000  00000000
[5191.538] DOUT SR2.7:  00000000  00000000
[5191.539] DOUT SR2.6:  00000000  00000000
[5191.539] DOUT SR2.5:  00000000  00000000
[5191.539] DOUT SR2.4:  00000000  00000000
[5191.539] DOUT SR2.3:  00000000  00000000
[5191.540] DOUT SR2.2:  00000000  00000000
[5191.540] DOUT SR2.1:  00000000  00000000
[5191.540] DOUT SR2.0:  00000000  00000000
[5191.540] KB1: DOUT#1.D4 / DIN#1.D3: depressed  -->  key=11, break contact, note=B-1 (47)
[5191.540] Entry: timestamp_break=0 timestamp_make=0
[5191.587] ---
[5191.588] DOUT SR1.7:  00000000  00000000
[5191.588] DOUT SR1.6:  00000000  00000000
[5191.588] DOUT SR1.5:  00100000  00000000
[5191.588] DOUT SR1.4:  00110000  00000000
[5191.588] DOUT SR1.3:  00000000  00000000
[5191.588] DOUT SR1.2:  00000000  00000000
[5191.588] DOUT SR1.1:  00000000  00000000
[5191.588] DOUT SR1.0:  00000000  00000000
[5191.589] DOUT SR2.7:  00000000  00000000
[5191.589] DOUT SR2.6:  00000000  00000000
[5191.589] DOUT SR2.5:  00000000  00000000
[5191.589] DOUT SR2.4:  00000000  00000000
[5191.589] DOUT SR2.3:  00000000  00000000
[5191.589] DOUT SR2.2:  00000000  00000000
[5191.590] DOUT SR2.1:  00000000  00000000
[5191.590] DOUT SR2.0:  00000000  00000000
[5191.590] KB1: DOUT#1.D4 / DIN#1.D3: pressed    -->  key=11, break contact, note=B-1 (47)
[5191.590] Entry: timestamp_break=57093 timestamp_make=0
[5191.594] ---
[5191.595] DOUT SR1.7:  00000000  00000000
[5191.595] DOUT SR1.6:  00000000  00000000
[5191.595] DOUT SR1.5:  00110000  00000000
[5191.595] DOUT SR1.4:  00110000  00000000
[5191.595] DOUT SR1.3:  00000000  00000000
[5191.595] DOUT SR1.2:  00000000  00000000
[5191.595] DOUT SR1.1:  00000000  00000000
[5191.595] DOUT SR1.0:  00000000  00000000
[5191.595] DOUT SR2.7:  00000000  00000000
[5191.596] DOUT SR2.6:  00000000  00000000
[5191.596] DOUT SR2.5:  00000000  00000000
[5191.596] DOUT SR2.4:  00000000  00000000
[5191.596] DOUT SR2.3:  00000000  00000000
[5191.596] DOUT SR2.2:  00000000  00000000
[5191.597] DOUT SR2.1:  00000000  00000000
[5191.597] DOUT SR2.0:  00000000  00000000
[5191.597] KB1: DOUT#1.D5 / DIN#1.D3: pressed    -->  key=11, make contact, note=B-1 (47)
[5191.597] Entry: timestamp_break=57093 timestamp_make=57159
[5191.597] PRESSED note=B-1, delay=66, velocity=125 (played from a white key)
[5191.638] ---
[5191.639] DOUT SR1.7:  00000000  00000000
[5191.639] DOUT SR1.6:  00000000  00000000
[5191.639] DOUT SR1.5:  00010000  00000000
[5191.639] DOUT SR1.4:  00110000  00000000
[5191.639] DOUT SR1.3:  00000000  00000000
[5191.639] DOUT SR1.2:  00000000  00000000
[5191.639] DOUT SR1.1:  00000000  00000000
[5191.639] DOUT SR1.0:  00000000  00000000
[5191.639] DOUT SR2.7:  00000000  00000000
[5191.640] DOUT SR2.6:  00000000  00000000
[5191.640] DOUT SR2.5:  00000000  00000000
[5191.640] DOUT SR2.4:  00000000  00000000
[5191.640] DOUT SR2.3:  00000000  00000000
[5191.641] DOUT SR2.2:  00000000  00000000
[5191.641] DOUT SR2.1:  00000000  00000000
[5191.641] DOUT SR2.0:  00000000  00000000
[5191.641] KB1: DOUT#1.D5 / DIN#1.D2: depressed  -->  key=10, make contact, note=A#1 (46)
[5191.641] Entry: timestamp_break=0 timestamp_make=56224
[5191.664] ---
[5191.664] DOUT SR1.7:  00000000  00000000
[5191.664] DOUT SR1.6:  00000000  00000000
[5191.664] DOUT SR1.5:  00110000  00000000
[5191.664] DOUT SR1.4:  00110000  00000000
[5191.664] DOUT SR1.3:  00000000  00000000
[5191.664] DOUT SR1.2:  00000000  00000000
[5191.664] DOUT SR1.1:  00000000  00000000
[5191.664] DOUT SR1.0:  00000000  00000000
[5191.664] DOUT SR2.7:  00000000  00000000
[5191.665] DOUT SR2.6:  00000000  00000000
[5191.665] DOUT SR2.5:  00000000  00000000
[5191.665] DOUT SR2.4:  00000000  00000000
[5191.665] DOUT SR2.3:  00000000  00000000
[5191.665] DOUT SR2.2:  00000000  00000000
[5191.665] DOUT SR2.1:  00000000  00000000
[5191.665] DOUT SR2.0:  00000000  00000000
[5191.667] KB1: DOUT#1.D5 / DIN#1.D2: pressed    -->  key=10, make contact, note=A#1 (46)
[5191.667] Entry: timestamp_break=0 timestamp_make=56224
[5191.683] ---
[5191.684] DOUT SR1.7:  00000000  00000000
[5191.684] DOUT SR1.6:  00000000  00000000
[5191.684] DOUT SR1.5:  00100000  00000000
[5191.684] DOUT SR1.4:  00110000  00000000
[5191.684] DOUT SR1.3:  00000000  00000000
[5191.684] DOUT SR1.2:  00000000  00000000
[5191.684] DOUT SR1.1:  00000000  00000000
[5191.684] DOUT SR1.0:  00000000  00000000
[5191.684] DOUT SR2.7:  00000000  00000000
[5191.685] DOUT SR2.6:  00000000  00000000
[5191.685] DOUT SR2.5:  00000000  00000000
[5191.685] DOUT SR2.4:  00000000  00000000
[5191.685] DOUT SR2.3:  00000000  00000000
[5191.685] DOUT SR2.2:  00000000  00000000
[5191.685] DOUT SR2.1:  00000000  00000000
[5191.686] DOUT SR2.0:  00000000  00000000
[5191.686] KB1: DOUT#1.D5 / DIN#1.D3: depressed  -->  key=11, make contact, note=B-1 (47)
[5191.686] Entry: timestamp_break=0 timestamp_make=0
[5191.686] RELEASED note=B-1
[5191.688] ---
[5191.688] DOUT SR1.7:  00000000  00000000
[5191.689] DOUT SR1.6:  00000000  00000000
[5191.689] DOUT SR1.5:  00100000  00000000
[5191.689] DOUT SR1.4:  00100000  00000000
[5191.689] DOUT SR1.3:  00000000  00000000
[5191.689] DOUT SR1.2:  00000000  00000000
[5191.689] DOUT SR1.1:  00000000  00000000
[5191.689] DOUT SR1.0:  00000000  00000000
[5191.689] DOUT SR2.7:  00000000  00000000
[5191.689] DOUT SR2.6:  00000000  00000000
[5191.690] DOUT SR2.5:  00000000  00000000
[5191.690] DOUT SR2.4:  00000000  00000000
[5191.690] DOUT SR2.3:  00000000  00000000
[5191.690] DOUT SR2.2:  00000000  00000000
[5191.691] DOUT SR2.1:  00000000  00000000
[5191.691] DOUT SR2.0:  00000000  00000000
[5191.691] KB1: DOUT#1.D4 / DIN#1.D3: depressed  -->  key=11, break contact, note=B-1 (47)
[5191.691] Entry: timestamp_break=0 timestamp_make=0
[5192.328] ---
[5192.328] DOUT SR1.7:  00000000  00000000
[5192.329] DOUT SR1.6:  00000000  00000000
[5192.329] DOUT SR1.5:  00000000  00000000
[5192.329] DOUT SR1.4:  00100000  00000000
[5192.329] DOUT SR1.3:  00000000  00000000
[5192.329] DOUT SR1.2:  00000000  00000000
[5192.329] DOUT SR1.1:  00000000  00000000
[5192.329] DOUT SR1.0:  00000000  00000000
[5192.329] DOUT SR2.7:  00000000  00000000
[5192.329] DOUT SR2.6:  00000000  00000000
[5192.330] DOUT SR2.5:  00000000  00000000
[5192.330] DOUT SR2.4:  00000000  00000000
[5192.330] DOUT SR2.3:  00000000  00000000
[5192.330] DOUT SR2.2:  00000000  00000000
[5192.331] DOUT SR2.1:  00000000  00000000
[5192.331] DOUT SR2.0:  00000000  00000000
[5192.331] KB1: DOUT#1.D5 / DIN#1.D2: depressed  -->  key=10, make contact, note=A#1 (46)
[5192.331] Entry: timestamp_break=0 timestamp_make=56224
[5192.336] ---
[5192.336] DOUT SR1.7:  00000000  00000000
[5192.337] DOUT SR1.6:  00000000  00000000
[5192.337] DOUT SR1.5:  00000000  00000000
[5192.337] DOUT SR1.4:  00000000  00000000
[5192.337] DOUT SR1.3:  00000000  00000000
[5192.337] DOUT SR1.2:  00000000  00000000
[5192.337] DOUT SR1.1:  00000000  00000000
[5192.337] DOUT SR1.0:  00000000  00000000
[5192.338] DOUT SR2.7:  00000000  00000000
[5192.338] DOUT SR2.6:  00000000  00000000
[5192.338] DOUT SR2.5:  00000000  00000000
[5192.338] DOUT SR2.4:  00000000  00000000
[5192.338] DOUT SR2.3:  00000000  00000000
[5192.338] DOUT SR2.2:  00000000  00000000
[5192.338] DOUT SR2.1:  00000000  00000000
[5192.338] DOUT SR2.0:  00000000  00000000
[5192.339] KB1: DOUT#1.D4 / DIN#1.D2: depressed  -->  key=10, break contact, note=A#1 (46)
[5192.339] Entry: timestamp_break=0 timestamp_make=56224

at 5191.503 I pressed the a#1 key after partially depressing, so make contact was briefly open while break contact was closed. 

No more A#1 sound while key A#1 is pressed.

Workaround #1: disable velocity

set kb 1 break_is_make on

Workaround #2: debounce

set kb 1 make_debounced on

And all works, more or less.

Imho when key is pressed, corresponding note should play, with low velocity, but I cannot imagine how to calculate it (perhaps double of time passed from make contact open and make contact close). 

 

Regards,

Cristiano

Share this post


Link to post
Share on other sites

Hm... I'm using NG in keyboards for a few years now and as far as I remember I never had the issue, that notes are not being played. I enable make_debounce on my keyboards. Without that sometimes note-off is not being send (IIRC). 

As NG does not support 3-contact-keybeds at the moment it needs both contacts to be opened before sending the next note-on. Without both switches opened NG can not calculate the velocity so it's not being send. 

If "break_is_make on" works for you, it's quite clear, because break_is_make doesn't wait for both switches to be released.

Share this post


Link to post
Share on other sites

Thank you FantomXR.

Both "break_is_make on" and "make_debounce on" work for me, hence I am satisfied.

I was commenting behaviour of keyboard scanning with both that directives off, because imho it could be improved.
It should behave better if sending a noteOn when detected make contact open-close without break contact opening. If not doing so, you could have a key pressed without sound.

Velocity perhaps could be calculated from a delay which value could be

if x < 2*delay_fastest

delay = ((delay_slowest - delay_fastest)/delay_fastest2) x2 - 2((delay_slowest - delay_fastest)/delay_fastest) x + delay_slowest

else 

delay = delay_slowest

where x = TimeMakeClose - TimeMakeOpen

It could be useful if you have a keyboard with heavy keys, for example.

Regards

Edited by Cristiano
Misspelling

Share this post


Link to post
Share on other sites

Thanks for the inspiration - I will try this soon! :)

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now