jjonas Posted June 22, 2016 Report Share Posted June 22, 2016 Hi, in the user manual's .NGC part, the EVENT_ENC intro section says, "An encoder can send and receive MIDI events. In 'absolute mode' it will handle a value internally, in incremental modes it will just send an inc/dec event and expects the handling of the resulting value at the host site.", However, in the possible enc_modes list, there is no enc_mode=relative, enc_mode=inc_dec or something, which would allow me to send NRPN value increment/decrement commands, instead of absolute values. If EVENT_ENC is type=NRPN, MIOS Studio shows that MBNG is sending the CCs for NRPN selection (98 and 99), and then the absolute value, but is there a way I can send CCs 96/97 for value increment/decrement with NRPNs, instead of absolute values? Quote Link to comment Share on other sites More sharing options...
TK. Posted July 3, 2016 Report Share Posted July 3, 2016 Hi, relative changes can be sent with the various relative value modes, example: EVENT_ENC id= 1 type=NRPN chn= 1 nrpn=1 enc_mode=40Speed EVENT_ENC id= 2 type=NRPN chn= 1 nrpn=2 enc_mode=40Speed EVENT_ENC id= 3 type=NRPN chn= 1 nrpn=3 enc_mode=40Speed EVENT_ENC id= 4 type=NRPN chn= 1 nrpn=4 enc_mode=40Speed Aside from 40Speed, there is also 00Speed, Inc00Speed_Dec40Speed, Inc41_Dec3F, Inc01_Dec7F, Inc01_Dec41 These are all "relative values" (I guess that this is for what you asked for) Sending different NRPN numbers would be possible with conditional events. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
jjonas Posted January 10, 2020 Author Report Share Posted January 10, 2020 This is an old thread, but because the original was by me and this is the exact same issue, I thought I'll reply here (rather than make a new post and refer to this one). Today I tried all these modes on my DSI Tetra, but they all change the target parameter between two values, rather than increment or decrement it by one step. to To try I put the enc_mode=xx in a line like this: EVENT_ENC id=65 hw_id=1 label="@(2:1:1)Frq1%B@(1:38:2)%03d" type=NRPN chn=12 nrpn=0 I've used my own Arduino-based controller to do it like this: MIDI.sendControlChange(99, NRPN_MSB + MSB_modifier, sendCh); MIDI.sendControlChange(98, NRPN_LSB, sendCh); MIDI.sendControlChange(CC, 1, sendCh); // send increment or decrement value by 1 In other words, select the target NRPN, then use either CC96 or CC97 for increment or decrement by the given value (=1). Is this possible? Quote Link to comment Share on other sites More sharing options...
FantomXR Posted January 10, 2020 Report Share Posted January 10, 2020 I don't see the enc_mode parameter in the line. You have to set it to enc_mode=40Speed for example. All modes are listed on ucapps.de Quote Link to comment Share on other sites More sharing options...
jjonas Posted January 10, 2020 Author Report Share Posted January 10, 2020 I did try each encoder mode definition one after the other in the example line that I posted, even though the example line given above doesn't include any particular enc_mode definition. Sorry for any confusion! Quote Link to comment Share on other sites More sharing options...
TK. Posted January 11, 2020 Report Share Posted January 11, 2020 An example setup for this use case can be found here: https://github.com/midibox/mios32/blob/master/apps/controllers/midibox_ng_v1/cfg/tests/conev_1.ngc # send CC#96 if value is incremented EVENT_ENC id=2000 hw_id=2000 enc_mode=Inc01_Dec7F if_equal=0x01 type=CC cc=96 lcd_pos=1:1:2 label="Enc INC" # send CC#97 if value is decremented EVENT_ENC id=2001 hw_id=2000 enc_mode=Inc01_Dec7F if_equal=0x7f type=CC cc=97 lcd_pos=1:1:2 label="Enc DEC" Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
jjonas Posted January 11, 2020 Author Report Share Posted January 11, 2020 How to select the target NRPN to increment/decrement in that case? An event can't be type=CC and type=NRPN simultaneously, and trying to use the same enc with different id's to both select the target NRPN and then increment or decrement with CC96/97 it hasn't worked in any of the combinations I tried. Below one of the things I tried. Three absolute mode NRPN encoders (hw_id=2-4) and one (hw_id=1) where turning hw_id=1 only increments/decrements the most recent parameter, but doesn't select any parameter on its own: EVENT_ENC id=1 hw_id=1 label="@(2:1:1)Attk " range=0:0 type=NRPN chn=12 nrpn=23 EVENT_ENC id=9 hw_id=1 label="@(2:1:1)Attk " enc_mode=Inc01_Dec7F type=CC cc=96 if_equal=0x01 chn=12 EVENT_ENC id=11 hw_id=1 label="@(2:1:1)Attk " enc_mode=Inc01_Dec7F type=CC cc=97 if_equal=0x7f chn=12 EVENT_ENC id=3 hw_id=2 label="@(2:6:1)Dcay " range=0:127 type=NRPN chn=12 nrpn=24 EVENT_ENC id=5 hw_id=3 label="@(2:11:1)Sust " range=0:127 type=NRPN chn=12 nrpn=25 EVENT_ENC id=7 hw_id=4 label="@(2:16:1)Rel " range=0:127 type=NRPN chn=12 nrpn=26 (I also tried selecting the NRPN with CC98 and 99, but wasn't successful.) Quote Link to comment Share on other sites More sharing options...
TK. Posted January 11, 2020 Report Share Posted January 11, 2020 There is a trick which might help here: a SysEx stream can also send "common" events, which means: we can just put all CCs into a single String. Example: EVENT_ENC id=1 hw_id=1 label="@(2:1:1)Attk " enc_mode=Inc01_Dec7F if_equal=0x01 type=SysEx stream="0xbb 99 0 98 23 96 1" EVENT_ENC id=1 hw_id=1 label="@(2:1:1)Attk " enc_mode=Inc01_Dec7F if_equal=0x7f type=SysEx stream="0xbb 99 0 98 23 97 127" Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
jjonas Posted January 11, 2020 Author Report Share Posted January 11, 2020 That's it!! This works, with the small correction that the sent decrement value shouldn't be 127, but 1 just like with the increment: EVENT_ENC id=3 hw_id=2 label="@(2:6:1)Dcay " enc_mode=Inc01_Dec7F if_equal=0x01 type=SysEx stream="0xbb 99 0 98 24 96 1" EVENT_ENC id=3 hw_id=2 label="@(2:6:1)Dcay " enc_mode=Inc01_Dec7F if_equal=0x7f type=SysEx stream="0xbb 99 0 98 24 97 1" 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.