Nexus Posted January 4, 2013 Report Posted January 4, 2013 Hi TK, I have a question. Is it possible to "group" banks or define "sub-banks"? Example: In "group 1" 25 HW-Buttons + LEDs are assigned with the banks 1-5. In "group 2" another 16 HW-Buttons + LEDs are assigned with the banks 6-12. Let´s say bank 2 (from group 1) is selected. Now when I selct bank 8 (from group 2) bank 2 should stay controllable. Currently the Buttons are deactivated when the bank changes (of course). So the idea was to "group" the banks, but maybe this could be achived with another command-combination? Quote
TK. Posted January 4, 2013 Author Report Posted January 4, 2013 Hi Nexus, yes, this is possible by using the new introduced SetBankOfHwId meta event. See following example, where two encoders control the banks of two encoder rows independent from each other: http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fbnk_2sel.ngc Instead of an encoder, you could also use buttons to set the banks, e.g. the "CycleBankOfHwId" meta event would only require a single button to switch between the banks (once the last bank is reached, it will switch back to the first bank) Best Regards, Thorsten. Quote
TK. Posted January 5, 2013 Author Report Posted January 5, 2013 Duo-LED and RGB LEDs connected to a DOUT matrix are properly supported in V1.008: MIDIbox NG V1.008 ~~~~~~~~~~~~~~~~~ o DIN_MATRIX with rows=4 now properly supported o DIN_MATRIX/DOUT_MATRIX: it's now possible to invert the rows as well: inverted=1 or inverted_sel=1 will invert the selection lines inverted_row=1 will invert the row pattern o configuration examples for the 16x4 Button/Duo-LED matrix are now available under cfg/tests/blm16x4*.ngc I tested it only with my 16x4 Button/Duo-LED matrix. @Ilmenator: could you please check if: http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fblm16x4.ngc and http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fblm16x4e.ngc is working at your side? Best Regards, Thorsten. Quote
ilmenator Posted January 5, 2013 Report Posted January 5, 2013 Sorry my setup is currently not working - I had to move some stuff around the house, but I'll look into this asap. Quote
Nexus Posted January 5, 2013 Report Posted January 5, 2013 yes, this is possible by using the new introduced SetBankOfHwId meta event. Thanks TK for the advice - it works perfectly! Quote
folly Posted January 6, 2013 Report Posted January 6, 2013 hi! Happy New Year. I need a controller with 20 encoder, and to control volume of 20 tracks, and 80 buttons. What hardware do I need MIDIBOX? thank. Quote
Duggle Posted January 6, 2013 Report Posted January 6, 2013 I need a controller with 20 encoder, and to control volume of 20 tracks, and 80 buttons. What hardware do I need MIDIBOX? You'll be needing a core module plus DINs (based on your description). Encoders use 2 DIN pins each. If you want to wire as matrix 8x8 (1DOUT SR+1 DIN SR) This covers 64 buttons so x2 to cover your 80. Quote
TK. Posted January 6, 2013 Author Report Posted January 6, 2013 Alternatively (the newbie solution - most simple wiring, no special PCBs required): - 1 MBHP_CORE_LPC17 module - a SD Card - 4 MBHP_DINX4 modules - an optional 2x20 LCD Best Regards, Thorsten. Quote
ilmenator Posted January 6, 2013 Report Posted January 6, 2013 @Ilmenator: could you please check if: http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fblm16x4.ngc and http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fblm16x4e.ngc is working at your side? Well, something is strange - I guess the config file does not match this schematic? Quote
TK. Posted January 6, 2013 Author Report Posted January 6, 2013 The schematic should be correct, but it doesn't explicitly specify the order of DOUT/DIN shift registers.Maybe they have a different order on your PCB? Then just change these definitions:DIN_MATRIX n=1 rows=4 inverted=1 sr_dout_sel1=1 sr_din1=1 DIN_MATRIX n=2 rows=4 inverted=1 sr_dout_sel1=4 sr_din1=2 DOUT_MATRIX n=1 rows=4 inverted=1 sr_dout_sel1=1 sr_dout_r1=2 sr_dout_g1=3 DOUT_MATRIX n=2 rows=4 inverted=1 sr_dout_sel1=4 sr_dout_r1=5 sr_dout_g1=6 If this doesn't help: ensure that at least v1.008 is installed.And you probably also want to check if it works better with inverted=0 (in this case, your LED/Button selection lines are swapped compared to my implementation)Another hint: the configuration doesn't forward button to LED events. The buttons should send Note events, the LEDs should react on the same note events (e.g. sent from the virtual MIDI keyboard of MIOS Studio) Best Regards, Thorsten. Quote
TK. Posted January 6, 2013 Author Report Posted January 6, 2013 A new version is available where a (hopefully easy to use) MIDI Learn mode has been added: MIDIbox NG V1.009 ~~~~~~~~~~~~~~~~~ o with a button assigned to 'type=Meta meta=MidiLearn range=0:1' it's now possible to activate a MIDI Learn mode which allows to assign an incoming MIDI event to any control element o with 'type=Meta meta=MidiLearn range=0:2' also NRPN events can be learned (in this case, CC#62 and CC#63 will be ignored!) o MIDI Learn mode can also be activated in the SCS menu Best Regards, Thorsten. Quote
ilmenator Posted January 6, 2013 Report Posted January 6, 2013 As far as I understand, only these two lines are required to configure the button part of the matrix: DIN_MATRIX n=1 rows=4 inverted=0 sr_dout_sel1=1 sr_din1=1 DIN_MATRIX n=2 rows=4 inverted=0 sr_dout_sel1=4 sr_din1=2 So here is what I have in hardware on my board: The left part of my matrix (8x4 buttons) is connected to DIN SR1 (pins D0...D7) and the second half of DOUT SR1 (i.e. pins D4...D7), with the cathodes of the diodes pointing towards the DOUT SRs. Pins D0...D3 are connected to the cathodes of the LEDs of that matrix. I suspect that the latter might be the problem? Upon repeated button presses I get different Pin numbers in the LCD, with an offset of 8: so e.g. for a certain button it is either Pin 1 or Pin 9 that gets displayed. In the manual of MB NG it says: "rows=4: 4 selection pulses are output by the DOUT register specified with sr_dout_sel1. The pulses are available twice: at D7:D4 and D3:D0 (inverted!)." Hmmhhh? Quote
ilmenator Posted January 6, 2013 Report Posted January 6, 2013 I suspect that the latter might be the problem? Upon repeated button presses I get different Pin numbers in the LCD, with an offset of 8: so e.g. for a certain button it is either Pin 1 or Pin 9 that gets displayed. Confirmed. Commenting out the DOUT_MATRIX lines configuring the LED matrix makes the button matrix work like it is supposed to: # DOUT_MATRIX n=1 rows=4 inverted=1 sr_dout_sel1=1 sr_dout_r1=2 sr_dout_g1=3 # DOUT_MATRIX n=2 rows=4 inverted=1 sr_dout_sel1=4 sr_dout_r1=5 sr_dout_g1=6 So I guess to get this running we would need another parameter to configure :unsure: !? Quote
TK. Posted January 6, 2013 Author Report Posted January 6, 2013 Ha - alright, finally I understand what was going wrong at my side: I opened my BLM case and noticed, that I added sink drivers some time ago. I haven't added them to the LEDs, but to the buttons (soldering error) - and this was the reason why I integrated the strange workaround with the nibble based inversion ;-) Could you please try: http://www.ucapps.de/mios32/midibox_ng_v1_010_pre1.zip the nibble-wise inversion has been removed, documentation has been updated, and in the configuration file I set inverted=0 again for all matrices. Although it would be nice-to-have, I won't add another parameter for nibble-wise inversion till somebody really need it. There are always simple HW based solutions which I could explain on case-by-case basis. Best Regards, Thorsten. Quote
ilmenator Posted January 6, 2013 Report Posted January 6, 2013 (edited) The problem actually remains the same - it was not that there was nibble-wise inversion, but that buttons and LEDs share the same DOUT SR - the buttons use the upper nibble, the LEDs the lower one. I have to deactivate either the button part or the LED part to make the other work properly. What I was suggesting was to add a parameter that would make it possible to specify whether the whole SR, or only the upper (or lower) nibble should be used for the scanning. I don't know how much effort that means implementation-wise, but it would allow the use of the original 16x4 BLM as used in SEQ V4, according to this schematic. Well, I still used the old .NGC file with the DOUT_MATRIX inverted - sorry, now it is working properly! Edited January 6, 2013 by ilmenator Quote
TK. Posted January 6, 2013 Author Report Posted January 6, 2013 Fine! :) Sidenote: it was intended that DOUT_MATRIX and DIN_MATRIX write to the same selection DOUT, see also the comments below: # note: actually the sr_dout_sel1 in DOUT_MATRIX could be removed, # since DIN_MATRIX already outputs the selection pulses there # this is just for the case that somebody copy&pastes the definition... This also means, that the inverted flag has to be identical for the DIN/DOUT_MATRIX entries, and this might be confusing. In V1.010 the inversion (resp inversion_sel) flag inverts both nibbles again - meanwhile I know that buttons could also be connected after the sink drivers (proven with the MBSEQV4L frontpanel), which means that it isn't really necessary to add even more inversion parameters. Actually it also wasn't required to use separate DOUT pins for LEDs and Buttons in the BLM 16x4 design - I made this decision at a time I wasn't sure if the LED selection signals could influence the button behaviour... Best Regards, Thorsten. Quote
ilmenator Posted January 6, 2013 Report Posted January 6, 2013 There is still an issue with the LED matrix part, though. The note numbers I send do not match with the LEDs that light up. My current config file looks like this, so I would assume that buttons and LEDs should share the same note numbers (even if they are not triggered internally): # test the configuration of a 16x4 Button/Duo-LED matrix # Schematic: http://www.ucapps.de/mbhp/button_duoled_matrix.pdf RESET_HW LCD "%C@(1:1:1)BLM 16x4" # In the SR configuration we assume that the DINs/DOUTs are directly connected to J8/9 of the core DIN_MATRIX n=1 rows=4 inverted=0 sr_dout_sel1=1 sr_din1=1 DIN_MATRIX n=2 rows=4 inverted=0 sr_dout_sel1=4 sr_din1=2 DOUT_MATRIX n=1 rows=4 inverted=0 sr_dout_sel1=1 sr_dout_r1=3 sr_dout_g1=2 DOUT_MATRIX n=2 rows=4 inverted=0 sr_dout_sel1=4 sr_dout_r1=6 sr_dout_g1=5 # note: actually the sr_dout_sel1 in DOUT_MATRIX could be removed, # since DIN_MATRIX already outputs the selection pulses there # this is just for the case that somebody copy&pastes the definition... # the left half of the BLM will send and receive Note On C-1 (key=36) .. G-3 over channel #1 # the right half of the BLM will send and receive Note On G#3 (key=68) .. D#6 over channel #1 EVENT_BUTTON_MATRIX id=1 type=NoteOn key=36 chn=1 lcd_pos=1:1:1 label="Matrix1 Pin %2p %b" EVENT_BUTTON_MATRIX id=2 type=NoteOn key=68 chn=1 lcd_pos=1:1:1 label="Matrix2 Pin %2p %b" # receive feedback from DAW EVENT_LED_MATRIX id=1 type=NoteOn key=36 chn=1 fwd_to_lcd=1 lcd_pos=1:1:2 label="Matrix1 Pin %2p %b" EVENT_LED_MATRIX id=2 type=NoteOn key=68 chn=1 fwd_to_lcd=1 lcd_pos=1:1:2 label="Matrix2 Pin %2p %b" # TK: I've 4 additional buttons connected to DIN#3 (hw_id=17..20), and 4 Duo-LEDs connected to DOUT#7 (hw_id=49..54) # send CC#16..19 with these buttons # and allow to control the Duo-LEDs with the same controllers EVENT_BUTTON id=17 type=CC cc=16 chn=1 EVENT_BUTTON id=18 type=CC cc=17 chn=1 EVENT_BUTTON id=19 type=CC cc=18 chn=1 EVENT_BUTTON id=20 type=CC cc=19 chn=1 # 0..31: Green LED: off Red LED: off # 32..63: Green LED: on Red LED: off # 64..95: Green LED: off Red LED: on # 96..127: Green LED: on Red LED: on # -> not working yet!!! Green LED will be on if value >= 64! EVENT_LED id=49 type=CC cc=16 chn=1 range=0:63 EVENT_LED id=50 type=CC cc=16 chn=1 range=0:127 EVENT_LED id=51 type=CC cc=17 chn=1 range=0:63 EVENT_LED id=52 type=CC cc=17 chn=1 range=0:127 EVENT_LED id=53 type=CC cc=18 chn=1 range=0:63 EVENT_LED id=54 type=CC cc=18 chn=1 range=0:127 EVENT_LED id=55 type=CC cc=19 chn=1 range=0:63 EVENT_LED id=56 type=CC cc=19 chn=1 range=0:127 Quote
TK. Posted January 6, 2013 Author Report Posted January 6, 2013 That's the expected behaviour and related to the way how the matrix is organized. Please try blm16x4e.ngc - it shows, how to change the mapping at the software side. It's better to solve it this way, than adding a DOUT_MATRIX ... special_tweak_for_expired_design=1 option... :wink: Best Regards, Thorsten. Quote
ilmenator Posted January 6, 2013 Report Posted January 6, 2013 Well then I must be overlooking something. When defining # In the SR configuration we assume that the DINs/DOUTs are directly connected to J8/9 of the core # they emulate button/led functions DIN_MATRIX n=1 rows=4 inverted=0 sr_dout_sel1=1 sr_din1=1 button_emu_id_offset=1001 DIN_MATRIX n=2 rows=4 inverted=0 sr_dout_sel1=4 sr_din1=2 button_emu_id_offset=1033 DOUT_MATRIX n=1 rows=4 inverted=1 sr_dout_sel1=1 sr_dout_r1=3 sr_dout_g1=2 led_emu_id_offset=1001 DOUT_MATRIX n=2 rows=4 inverted=1 sr_dout_sel1=4 sr_dout_r1=6 sr_dout_g1=5 led_emu_id_offset=1033 I get the LEDs to react properly, but the buttons send three note-on events each: [19329.809] 90 34 7f Chn# 1 Note On E-2 Vel:127 [19329.819] 90 54 7f Chn# 1 Note On C-5 Vel:127 [19329.830] 90 44 7f Chn# 1 Note On G#3 Vel:127 [19330.314] 90 34 00 Chn# 1 Note Off E-2 (optimized) [19330.324] 90 54 00 Chn# 1 Note Off C-5 (optimized) [19330.335] 90 44 00 Chn# 1 Note Off G#3 (optimized) is what I get for the first button (C-1). For # In the SR configuration we assume that the DINs/DOUTs are directly connected to J8/9 of the core # they emulate button/led functions DIN_MATRIX n=1 rows=4 inverted=0 sr_dout_sel1=1 sr_din1=1 button_emu_id_offset=1001 DIN_MATRIX n=2 rows=4 inverted=0 sr_dout_sel1=4 sr_din1=2 button_emu_id_offset=1033 DOUT_MATRIX n=1 rows=4 inverted=0 sr_dout_sel1=1 sr_dout_r1=3 sr_dout_g1=2 led_emu_id_offset=1001 DOUT_MATRIX n=2 rows=4 inverted=0 sr_dout_sel1=4 sr_dout_r1=6 sr_dout_g1=5 led_emu_id_offset=1033 the buttons work properly, but three LEDs light up at the same time, and they don't correspond to the note-on message. I must be doing something wrong, but what? Quote
TK. Posted January 6, 2013 Author Report Posted January 6, 2013 Could you please doublecheck that you are using v1.010_pre1? In addition: as mentioned earlier, it's expected that the inverted flag is set to the same value for DIN/DOUT_MATRIX statements which write to the same sr_dout_sel* registers. Best Regards, Thorsten. Quote
Koerby Posted January 6, 2013 Report Posted January 6, 2013 Hello, is it possible to define a "timeout" after this some default values/Page are displayed? I have 10 Parameters and if I change one of them, i will forgot :) the other nine. So it would be great, if the display jumps after a specific to a page were all 10 values are shown. Other question: Is there a chance to clear the display, before a write something? Because if the new string is shorter than the old, i have a fragments on the LCD. Quote
ilmenator Posted January 6, 2013 Report Posted January 6, 2013 (edited) Could you please doublecheck that you are using v1.010_pre1? In addition: as mentioned earlier, it's expected that the inverted flag is set to the same value for DIN/DOUT_MATRIX statements which write to the same sr_dout_sel* registers. Well now I feel stupid because indeed I was testing on v1.008. It looks much better now :rolleyes: . I do not have the LEDs soldered on my board yet, so analyzing this systematically is a bit difficult, but I still get two LEDs lit from single note on events - but let's just assume that that is due to the example config file for now. I cannot solder the LEDs before the case is ready, and that will not be tonight. Edit: apparently, that was due to another EVENT_LED_MATRIX statement present in the same config file. So I should confirm that the old 16x4 BLM is working! Edited January 6, 2013 by ilmenator Quote
TK. Posted January 6, 2013 Author Report Posted January 6, 2013 is it possible to define a "timeout" after this some default values/Page are displayed? I have 10 Parameters and if I change one of them, i will forgot :smile: the other nine. So it would be great, if the display jumps after a specific to a page were all 10 values are shown. this is currently not possible, but I can consider this as a future feature. Would it be sufficient to define a couple of id numbers which should be triggered after a certain time to reprint their labels? E.g. something like this: # re-print following labels after 2 seconds inactivity: LCD_DEFAULT t=2 hw_id=Enc:1 hw_id=Enc:2 hw_id=Enc:3 (taking hw_id instead of id to ensure that the currently selected bank will be considered) Other question: Is there a chance to clear the display, before a write something? Because if the new string is shorter than the old, i have a fragments on the LCD. Yes, the display can be cleared with %C It's also possible to clear a segment before writing to it by setting the cursor within the string, e.g. ... lcd_pos=1:1:1 label="%20s@(1:1:1)New Text" This will: - start at 1:1:1 - print 20 spaces - set the cursor back to 1:1:1 - write a new text (with less than 20 characters) Well now I feel stupid because indeed I was testing on v1.008. It looks much better now :rolleyes: . Somehow I knew it, because your descriptions didn't make much sense anymore. However, as we can see small errors at my side can cause a lot of confusion at the user side - I hope that MBNG get's stable soon before more people are working with it, otherwise supporting different versions/effects will become very difficult. I do not have the LEDs soldered on my board yet, so analyzing this systematically is a bit difficult, but I still get two LEDs lit from single note on events - but let's just assume that that is due to the example config file for now. I cannot solder the LEDs before the case is ready, and that will not be tonight. Ok, no problem. I'm sure that it will work now - you helped to clarify the only open topic where I wasn't 100% sure (nibblewise inversion). :smile: Best Regards, Thorsten. Quote
Koerby Posted January 6, 2013 Report Posted January 6, 2013 E.g. something like this: # re-print following labels after 2 seconds inactivity: LCD_DEFAULT t=2 hw_id=Enc:1 hw_id=Enc:2 hw_id=Enc:3 (taking hw_id instead of id to ensure that the currently selected bank will be considered) yes something like this, maybe also with an meta_event Yes, the display can be cleared with %C It's also possible to clear a segment before writing to it by setting the cursor within the string, e.g. ... lcd_pos=1:1:1 label="%20s@(1:1:1)New Text" This will: - start at 1:1:1 - print 20 spaces - set the cursor back to 1:1:1 - write a new text (with less than 20 characters) I tried something like this EVENT_AINSER id=1 fwd_to_lcd=1 range=0:127 type=CC chn= 1 cc= 20 lcd_pos=1:1:1 label="%20s@(1:1:1)Osc1 %20s@(1:1:2)Shape:^OSC_Shp" but i got the error message: [MBNG_FILE_C] ERROR: string to long in EVENT_AINSER ... label=%20s@(1:1:1)Osc1 %20s@(1:1:2)Shape:^OSC_Shp Quote
TK. Posted January 6, 2013 Author Report Posted January 6, 2013 The label size is currently limited to 40 characters... :-/ However, it could make sense to optimize the size by using a label which is defined in your .NGL file. E.g. with following definitions in the .NGL: # clear first line LABEL clr1 "@(1:1:1)%20s@(1:1:1)" # clear second line LABEL clr2 "@(1:1:2)%20s@(1:1:2)" your label definition will be much shorter: label="^clr1 Osc1^clr2 Shape:^OSC_Shp" And while I'm writing this, I notice that a label terminator beside of space or ^ is missing - therefore I've added a space after ^clr1 and ^clr2, which you probably won't like. In the next version it will be possible to terminate the label identifier with: label="^clr1^#Osc1^clr2^#Shape:^OSC_Shp" Cryptic enough? ;-) Best Regards, Thorsten. Quote
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.