ilmenator Posted December 19, 2016 Report Share Posted December 19, 2016 # 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 Quote Link to comment Share on other sites More sharing options...
TK. Posted December 19, 2016 Report Share Posted December 19, 2016 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. Quote Link to comment Share on other sites More sharing options...
ilmenator Posted December 19, 2016 Author Report Share Posted December 19, 2016 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? Quote Link to comment Share on other sites More sharing options...
TK. Posted December 19, 2016 Report Share Posted December 19, 2016 Yes, this is the rely message. Does "ngr send... OUT1" also output the event at MIDI OUT1? Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
ilmenator Posted December 19, 2016 Author Report Share Posted December 19, 2016 (edited) 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). Edited December 19, 2016 by ilmenator monitored the wrong port Quote Link to comment Share on other sites More sharing options...
ilmenator Posted December 21, 2016 Author Report Share Posted December 21, 2016 (edited) 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? Edited December 21, 2016 by ilmenator added info on router settings Quote Link to comment Share on other sites More sharing options...
TK. Posted December 21, 2016 Report Share Posted December 21, 2016 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. Quote Link to comment Share on other sites More sharing options...
ilmenator Posted December 22, 2016 Author Report Share Posted December 22, 2016 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? 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.