# KEYBOARD hardware KEYBOARD n=1 rows=8 dout\_sr1=1 dout\_sr2=2 din\_sr1=1 din\_sr2=2 din\_inverted=1 break\_inverted=0 din\_key\_offset=0 \ make\_debounced=0 \ scan\_velocity=1 scan\_optimized=0 note\_offset=36 \ 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 lcd\_pos=1:1:1 label="Note %n" EVENT\_KB id=2 fwd\_id=SENDER:1 type=NoteOn chn=1 key=any range=0:127 # ports = 4xUSB 4xMIDI 4x--- 4xOSC 4xSPI EVENT\_SENDER id=1 type=NoteOn chn=1 ports=10001111000000000000
The above is part of the .NGC file I am trying to use to send notes played on the keyboard to MIDI port 1. However, for the life of me I can’t seem to get the port right. What would be the correct .NGC for this simple task?
Part of my problemis that there is contradictory information about how the ports are coded, and I believe that the description on the MB_NG page is wrong because it doesn’t match with what I observe:
ports=\<port-selections\> Expects a 16bit binary value (0|1) to select the MIDI ports over which the event should send and receive: the first 4 digits enable/disable USB1..USB4 the next 4 digits enable/disable MIDI1..MIDI4 the next 4 digits are reserved, don't use! the next 4 digits enable/disable OSC1..OSC4 the last 4 digits enable/disable SPI1..SPI4 (requires that the spi\_midi flag has been enabled in the MIOS32 Bootloader configuration. Example: following binary value (which is the default value) ports=00001000100000001000 will enable USB1, MIDI1 (IN1 and OUT1) and OSC1, and following binary: ports=00000000110000000000 will only enable MIDI1 and MIDI2 ports=00010000000000000000 will enable SPI1
First of all, 5 times 4 digits is not 16 but 20 bits.
Second, do we start counting from the left or from the right? If “the first 4 digits enable/disable USB1..USB4”, then the first example above doesn’t make sense, because it starts with four zeros, meaning that all USB ports are not playing?!
Thanks, ilmenator
T.K
December 19, 2016, 8:05pm
2
You are right, this is a documentation error: we are counting from left (USB1 is the leftmost digit)
Meanwhile corrected at my website
To the actual issue: are you sure that the MIDI output is working at all?
You could test it with following terminal command:
ngr send CC OUT1 1 1 127
This should send CC#1 with value 127 over channel 1
Doublecheck with:
ngr send CC USB1 1 1 127
to ensure that the command itself is working…
Best Regards, Thorsten.
ngr send CC OUT1 1 1 127
gives me
f0 00 00 7e 32 00 0f 00 f7
whereas
ngr send CC USB1 1 1 127
gives me
b0 01 7f Chn# 1 CC# 1 = 127 f0 00 00 7e 32 00 0f 00 f7
Does that make sense?
T.K
December 19, 2016, 8:18pm
4
Yes, this is the rely message.
Does “ngr send… OUT1” also output the event at MIDI OUT1?
Best Regards, Thorsten.
Ok my bad, I monitored the USB in…
Actually, I do not get any message at all on the MIDI Out1, so this might as well be a hardware problem.
(Feeding Out1 of the MB NG back into an Emu MIDI interface that is monitored with a MIDI monitor).
Here is an update: I can confirm all 4 MIDI outs working now by sending
ngr send CC OUT1 1 1 127 ngr send CC OUT2 1 1 127 ngr send CC OUT3 1 1 127 ngr send CC OUT4 1 1 127
However, the above .NGC only sends from the keyboard on MIDI out 1, even though I set
ports=10001111000000000000
Even setting the out port to only MIDI out 2 as in
ports=00000100000000000000
Doesn’t give me the keyboard notes on the MIDI out 2.
Instead, I always have KB output on USB1 as monitored by MIOS Studio, as well as on MIDI out 1.
These are my router settings:
# ROUTER definitions (Note: chn=0 disables, chn=17 selects all channels) ROUTER n= 1 src\_port=IN1 src\_chn= 0 dst\_port=OUT2 dst\_chn=0 ROUTER n= 2 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n= 3 src\_port=USB1 src\_chn= 0 dst\_port=OUT2 dst\_chn=0 ROUTER n= 4 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n= 5 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n= 6 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n= 7 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n= 8 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n= 9 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n=10 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n=11 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n=12 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n=13 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n=14 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n=15 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0 ROUTER n=16 src\_port=USB1 src\_chn= 0 dst\_port=OUT1 dst\_chn=0
What else can I test to get this solved?
T.K
December 21, 2016, 9:34pm
7
Works at my side, tested with:
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" kb\_transpose=0 ports=00000100000000000000
Quote
Instead, I always have KB output on USB1 as monitored by MIOS Studio, as well as on MIDI out 1.
any error message during the upload of the .NGC file?
Quote
These are my router settings:
shows that all src_chn and dst_chn are disabled: no routing takes place
Is this relevant for the test?
Best Regards, Thorsten.
19 hours ago, TK. said:
Works at my side, tested with:
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” kb_transpose=0 ports=00000100000000000000
Ok, this is actually what did the trick - thanks!
But I wonder what is wrong with my approach:
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 fwd\_id=SENDER:1 type=NoteOn chn=1 key=any range=0:127 EVENT\_SENDER id=1 type=NoteOn chn=1 ports=10001111000000000000
Shouldn’t the second line create an event that is then forwarded by the EVENT_SENDER?