• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Cristiano

  • Rank
    MIDIbox Newbie
  1. Hello Chris, I am probably the fifth wheel, but if no one else answers... Here are my 2 pences. I suspect you have to modify trunk\modules\keyboard\keyboard.h to add a u8 dout_sr3; near dout_sr2, then find all occurences of dout_sr2 in trunk\modules\keyboard\keyboard.c, and add management for dout_sr3 in a similar way. Be careful, you should also modify  u16 selection_mask = ~(1 << (u16)kc->selected_row); if( kc->din_inverted ) selection_mask ^= 0xffff; in u32 selection_mask = ~((u32)1 << (u16)kc->selected_row); if( kc->din_inverted ) selection_mask ^= 0xffffffff; finally modify trunk\apps\controllers\midibox_ng_v1\src\mbng_file_c.c for manageing command input (find all occurences of dout_sr2 and add management for dout_sr3), and trunk\apps\controllers\midibox_ng_v1\src\mbng_kb.c for initialization. Obviously, I did not try, hence I cannot tell if missing something... Good luck!
  2. Midibox_NG and kb_transpose

    Hi all, working on many projects this period, hence no time to follow my first passion. First of all, I am a newbie (as you can see on the left), but Last one, if it is possible to modify contrast for GLCD DOGM using some kind of instruction on NGC file, because there is no hardware way to do it. Thanks to all, Cristiano
  3. Midibox_NG and kb_transpose

    Hi Thorsten and all, when printing a negative transpose value, the vertical bar at its right becomes a box. I suspect there is a bug in mbng_lcd.c, line 692 probably should be int normalized_value = (item->min <= item->max) ? ((s16)item->value - item->min) : ((s16)item->value - item->max);  
  4. SCS encoder jumps

    Thank you FantomXR, I missed it! And now I cannot try, damn!  Ok, I am not pretty sure which of two soultion is better, but... who cares 
  5. SCS encoder jumps

    Hi all, today I would like to share my experience with encoder on scs, the board version made by ilmenator (semper laudetur), attached to MBHP_CORE_STM32F4, midibox_NG project. I noticed that sometimes, especially when fast rotating my encoder (I choosed a bourns PEC12R), midibox_NG detects more events than really executed, or worse, events in opposite verse. Using an oscilloscope I saw many spikes on encoder pin, duration shorter than 1 ms. Following suggestion on attached datasheet (I hope attaching this document is permitted, I did not find any rule against, but if so I will remove it immediately), second page, bottom right, I modified circuit with some patches. Now it works perfectly, but I have some requests/suggestion to improve design if anyone knows, please tell me if there is a NGC parameter to allow debouncing on encoder inputs, otherwise for TK, please modify SCS scheme to suggest RC filter usage; for ilmenator, please modify your board design and allow to connect necessary 4 resistances and 2 capacitors. Thanks to anyone, Regards, Cristiano PEC12R.pdf
  6. Midibox_NG Event NoteOn lost

    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
  7. Midibox_NG Event NoteOn lost

    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) 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... 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
  8. Midibox_NG Event NoteOn lost

    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
  9. Midibox_NG and kb_transpose

    Thank you, I will try. The problem should be to send multiple CC numbers, following a sequence (CC 101 and 100 being a preliminary instruction to tell which is registered parameter, and CC 6 the value to write). In any case, I am not sure this being the better way to obtain transposition message because: it is not atomic (with two midi message interleaving writing CC 101 or 100 before CC 6, we will not be able to predict what will happen), another device could try to send this command to a synth thru midibox. If both midibox_NG and synthesizer manage that command, transposition will double its value I have to study these aspects a bit more (maybe a SysEx message could be better). For the moment many thanks, I will update when ready. Best regards, Cristiano
  10. Midibox_NG and kb_transpose

    Hi All, first of all, many thanks to Thorsten for his great work! Excuse me if this is a trivial question, but I looked for a while at the forum without reaching key information. I have already prepared one MBHP_CORE_STM32F4, one MBHP_DIO_MATRIX (connected with a FATAR keyboard), a SCS, a DOGM display, and all seems working correctly. I am trying to substitute two broken keyboards of a midi church organ using two new 61 keys Fatar keyboards and midibox_NG project. I would like to control also pedalboard using a midibox_NG (having midibox NG or KB a keyboard number limit of 2), and control actual synthesizer completely by midi messages (perhaps in the future I will substitute also synthesizer with a PC based or other synth, I do not know). I need to transpose two keyboards and pedalboard using only one encoder, and I have to do this by transposing EVENT_KB (having the synth a mechanical transposition encoder, not perfectly working). I read about kb_transpose parameter of EVENT_KB, but how can I modify it runtime according with SCS encoder rotation? Perhaps I should introduce a meta like KbBreakIsMake (say KbTranspose), but It seems being a bit more complicated... Furthermore, I would like to send transposition request to another device (for the third keyboard), but I am not sure of how to do this, and how to capture that information on receiver. I suspect having to use Registered Parameter 2 setting (, sending three CC (101 : 0, 100 : 2, 6 : transposition + 64), but NGC cc directives processing allow to send only one CC per event. On receiver side I do not know how to retrieve this registered parameter. If anyone has a suggestion, at least to point me on the right direction, I will appreciate it. Thanks to all, regards, Cristiano