jjonas Posted January 20, 2020 Report Share Posted January 20, 2020 Hi, I'm trying to use an encoder to select the outgoing midi channel by using receiver, sender and if_equal. I'm able to change the channel in a "static" way, regardless of the encoder value, but I'm unsuccessful in trying to use if_equal to control which sender gets activated. The following setup (with only one sender and router routings disabled) works if I remove the if_equal=Enc:1:1. If it's in, the receiver does work, but the sender won't send anything, no matter what the encoder value is. Am I thinking this the right way? RESET_HW ENC n=1 sr=1 pins=0:1 type=detented3 ROUTER n= 1 src_port=IN1 src_chn=0 dst_port=OUT1 dst_chn=0 ROUTER n= 2 src_port=IN1 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n= 3 src_port=IN1 src_chn=0 dst_port=OUT4 dst_chn=0 ROUTER n= 4 src_port=IN2 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n= 5 src_port=IN2 src_chn=0 dst_port=OUT4 dst_chn=0 ROUTER n= 6 src_port=IN3 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n= 7 src_port=IN3 src_chn=0 dst_port=OUT4 dst_chn=0 ROUTER n= 8 src_port=IN4 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n= 9 src_port=IN4 src_chn=0 dst_port=OUT4 dst_chn=0 ROUTER n=10 src_port=SPI4 src_chn=0 dst_port=OUT1 dst_chn=0 ROUTER n=11 src_port=SPI4 src_chn=0 dst_port=OUT1 dst_chn=0 ROUTER n=12 src_port=SPI4 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=OUT2 dst_chn=0 ROUTER n=15 src_port=USB1 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n=16 src_port=USB1 src_chn=0 dst_port=OUT4 dst_chn=0 # select outgoing channel EVENT_ENC id=1 hw_id=1 value=1 range=1:16 label="@(1:35:1)Ch: %02d@(1:34:2)^synth" # receive on channel 1 on port 1 EVENT_RECEIVER id=1 fwd_id=SENDER:1 fwd_to_lcd=1 type=NoteOn chn=1 key=any lcd_pos=1:1:1 label="Receiver%3i: %e" ports=0000100000000000 # send on channel 6 on ports 3-4 EVENT_SENDER id=1 if_equal=Enc:1:1 fwd_to_lcd=1 type=NoteOn chn=6 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 Quote Link to comment Share on other sites More sharing options...
jjonas Posted January 23, 2020 Author Report Share Posted January 23, 2020 The following setup is the same as above, only for a button instead of an encoder (the encoder setup is commented out). The button if_equal setup works as expected, the encoder one doesn't, even though to me they seem the same. The encoder value changes and the label updates on the display, but no receiver is receiving; for some reason the if_equal condition doesn't trigger like it does for the equivalent (so it seems to me) button value condition. RESET_HW ENC n=1 sr=1 pins=0:1 type=detented3 ROUTER n= 1 src_port=IN1 src_chn=0 dst_port=OUT1 dst_chn=0 ROUTER n= 2 src_port=IN1 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n= 3 src_port=IN1 src_chn=0 dst_port=OUT4 dst_chn=0 ROUTER n= 4 src_port=IN2 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n= 5 src_port=IN2 src_chn=0 dst_port=OUT4 dst_chn=0 ROUTER n= 6 src_port=IN3 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n= 7 src_port=IN3 src_chn=0 dst_port=OUT4 dst_chn=0 ROUTER n= 8 src_port=IN4 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n= 9 src_port=IN4 src_chn=0 dst_port=OUT4 dst_chn=0 ROUTER n=10 src_port=SPI4 src_chn=0 dst_port=OUT1 dst_chn=0 ROUTER n=11 src_port=SPI4 src_chn=0 dst_port=OUT1 dst_chn=0 ROUTER n=12 src_port=SPI4 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=OUT2 dst_chn=0 ROUTER n=15 src_port=USB1 src_chn=0 dst_port=OUT3 dst_chn=0 ROUTER n=16 src_port=USB1 src_chn=0 dst_port=OUT4 dst_chn=0 MAP1 1 5 6 9 10 12 16 EVENT_BUTTON id=33 hw_id=33 range=map1 value=1 label="@(1:35:1)Ch: %02d@(1:34:2)^synth" button_mode=Toggle EVENT_ENC id=1 hw_id=1 range=1:16 value=1 label="@(1:35:1)Ch: %02d@(1:34:2)^synth" # receive on channel 1 on port 1 EVENT_RECEIVER id=1 fwd_id=SENDER:1 fwd_to_lcd=1 type=NoteOn chn=1 key=any lcd_pos=1:1:1 label="Receiver%3i: %e" ports=0000100000000000 # send on channel 6 on ports 3-4 EVENT_SENDER id=1 if_equal=Button:33:1 fwd_to_lcd=1 type=NoteOn chn=1 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 EVENT_SENDER id=1 if_equal=Button:33:5 fwd_to_lcd=1 type=NoteOn chn=5 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 EVENT_SENDER id=1 if_equal=Button:33:6 fwd_to_lcd=1 type=NoteOn chn=6 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 EVENT_SENDER id=1 if_equal=Button:33:9 fwd_to_lcd=1 type=NoteOn chn=9 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 EVENT_SENDER id=1 if_equal=Button:33:10 fwd_to_lcd=1 type=NoteOn chn=10 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 EVENT_SENDER id=1 if_equal=Button:33:12 fwd_to_lcd=1 type=NoteOn chn=12 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 EVENT_SENDER id=1 if_equal=Button:33:16 fwd_to_lcd=1 type=NoteOn chn=16 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000# EVENT_SENDER id=1 if_equal=Enc:1:1 fwd_to_lcd=1 type=NoteOn chn=1 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 # EVENT_SENDER id=1 if_equal=Enc:1:5 fwd_to_lcd=1 type=NoteOn chn=5 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 # EVENT_SENDER id=1 if_equal=Enc:1:6 fwd_to_lcd=1 type=NoteOn chn=6 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 # EVENT_SENDER id=1 if_equal=Enc:1:9 fwd_to_lcd=1 type=NoteOn chn=9 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 # EVENT_SENDER id=1 if_equal=Enc:1:10 fwd_to_lcd=1 type=NoteOn chn=10 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 # EVENT_SENDER id=1 if_equal=Enc:1:12 fwd_to_lcd=1 type=NoteOn chn=12 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 # EVENT_SENDER id=1 if_equal=Enc:1:16 fwd_to_lcd=1 type=NoteOn chn=16 key=any lcd_pos=1:1:2 label="Sender%3i: %e" ports=0000001100000000 Quote Link to comment Share on other sites More sharing options...
Zam Posted January 23, 2020 Report Share Posted January 23, 2020 Hello All your sender have same id... Define hw_id=1 for all event AND id=100..101..102... (or whatever numbering strategy you choose) Don't know if it's the reason of your issue (but it might, same events with different conditional may behave strange and conflict...), you better make a correct config first Best Zam Quote Link to comment Share on other sites More sharing options...
jjonas Posted January 24, 2020 Author Report Share Posted January 24, 2020 The reason why the sender id's are the same: In this TK's example on if_equal the id's are the same for each command. I assume this works because the conditions are mutually exclusive, so that only one of the events will be triggered at any one time. The same id for all senders works ok with one button, but not with one encoder, which leads me to think it's not the sender id that's the problem. Quote Link to comment Share on other sites More sharing options...
TK. Posted January 26, 2020 Report Share Posted January 26, 2020 It should work now -> http://www.ucapps.de/mios32/midibox_ng_v1_037_pre13.zip Reason was, that I "compacted" the storage for conditions so that it fits into a 32bit value. But meanwhile we've so many different event types, that I had to spend another bit for the hw_id of the condition. As a quick solution I sacrificed two bits from the condition value, and gave it to the id Which means: currently it's not possible to check for values >12bit anymore, but the ENC event type should be found as expected Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
jjonas Posted January 26, 2020 Author Report Share Posted January 26, 2020 Thanks! I will be able to check this next Friday when I'm back home. Quote Link to comment Share on other sites More sharing options...
jjonas Posted January 31, 2020 Author Report Share Posted January 31, 2020 Works! 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.