Duggle
1
I have an encoder to send synth patch bank change, its a CC (to avoid confusion I’ll call it Sbank).
I have an encoder to send a patch change, its a PrgChange message.
I have a button to trigger a dump request, it’s a sysex message.
These controllers are all now working.
What I want to have happen is this:
- When a change of bank is made with it’s encoder:
- Sbank change is sent
- Whatever value the PrgChange was, it gets sent again (this is what actually changes the patch/bank in the synth)
- A dump request gets sent (this updates the MIDIbox with all values in the new patch)
- When the PrgChange encoder is changed:
- The new PrgChange gets sent
- A dump request gets sent
Can forwarding to SENDER be made to work this way or do I have resort to meta=RunSection:xx
or do I need to combine them to do what I described?
This is what I have tried:
#Virus state dump
EVENT_BUTTON id=4 fwd_id=LED:37 button_mode=OnOff type=SysEx stream="0xf0 0x00 0x20 0x33 0x01 0x00 0x30 0x00 0x40 0xf7"
###SBank Select -> Progchange -> Dump request
EVENT_ENC id= 65 hw_id= 65 fwd_id=SENDER:1 fwd_to_lcd=1 chn= 1 type=CC cc=0 range=0:7 ports=1000100000001000 enc_speed_mode=Slow:4 label="^Sbanksel"
EVENT_SENDER id=1 type=Meta meta=RunSection:12
####Progchange -> Dump request
EVENT_ENC id= 66 hw_id= 66 fwd_id=BUTTON:4 fwd_to_lcd=1 chn= 1 type=ProgramChange range=0:127 ports=1000100000001000 enc_speed_mode=Slow:4 label="^prgch"
and the run script:
if ^section == 12
delay_ms 100
LCD "@(23:1:1)trigger ENC"
trigger ENC:66
LCD "@(23:1:2)trigger button"
trigger BUTTON:4
exit
endif
Encoder 65 and 66 and button 4 work as controllers here, but there is no evidence of events being forwarded:
Here’s moving the Encoder 65:
[10641.717] MBNG_ENC_NotifyChange(65, -1)
[10641.718] [EVENT] id=ENC:65 hw_id=ENC:65 bank=0 fwd_id=SENDER:1 type=CC value=1 label=^banksel
[10641.718] MBNG_EVENT_ItemReceive(1, 0) (Sender)
Here’s moving Encoder 66:
[10774.467] MBNG_ENC_NotifyChange(66, 1)
[10774.467] [EVENT] id=ENC:66 hw_id=ENC:66 bank=0 fwd_id=BUTTON:4 type=ProgramChange value=24 label=^prgch
[10774.467] MBNG_DIN_NotifyReceivedValue(4, 25)
[10774.468] MBNG_DOUT_NotifyReceivedValue(37, 25)
It seems the notifications are generated, but not the forwarded actions themselves?
Is there a simpler way to achieve the intent?
The order in which controls are defined in NGC is important.
If a control forwards to a sender, the sender has to be defined first.
If the EVENT_SENDER is defined after the EVENT_ENC then debug output shows fwd_id=DISABLED.
According to debug output the following works for what I described in the OP.
###Dump request
EVENT_SENDER id=2 type=SysEx stream="0xf0 0x00 0x20 0x33 0x01 0x00 0x30 0x00 0x40 0xf7"
####Progchange -> Dump request
EVENT_ENC id= 66 hw_id= 66 fwd_id=SENDER:2 fwd_to_lcd=1 chn=1 type=ProgramChange range=0:127 label="^prgch"
###Bank Select -> Progchange -> Dump request
EVENT_ENC id= 65 hw_id= 65 fwd_id=ENC:66 fwd_to_lcd=1 chn= 1 type=CC cc=0 range=0:7 label="^banksel"
The synth is not responding reliably. I will try implementing a delay between operations by calling an NGR run section.
T.K
4
I’m surprised, because the order of EVENT definitions shouldn’t matter.
“show pool” shows, that the fwd_id is set correctly:
[773001.402] show pool
[773001.404] 3 Events in pool:
[773001.404] [EVENT] id=ENC:66 hw_id=ENC:66 bank=0 fwd_id=SENDER:2 type=ProgramChange value=0 label=^prgch
[773001.405] [EVENT] id=SENDER:2 hw_id=SENDER:2 bank=0 fwd_id=DISABLED:0 type=SysEx value=0 label=
[773001.405] [EVENT] id=ENC:65 hw_id=ENC:65 bank=0 fwd_id=ENC:66 type=CC value=0 label=^banksel
[773001.405] No Maps in pool
and “show id” confirms this as well:
[773110.617] show id ENC:66
[773110.620] id=ENC:66 (hw_id=ENC:66)
[773110.620] - bank=0
[773110.620] - condition: none
[773110.620] - fwd_id=SENDER:2
[773110.620] - fwd_to_lcd=1
[773110.620] - type=ProgramChange
[773110.620] - chn=1
[773110.620] - ports=1000100000001000
[773110.620] - value=0
[773110.620] - secondary_value=0
[773110.621] - map=0
[773110.621] - min=0
[773110.621] - max=127
[773110.621] - offset=0
[773110.621] - dimmed=0
[773110.621] - rgb=0:0:0
[773110.621] - syxdump_pos=0:0
[773110.621] - radio_group=0
[773110.621] - enc_mode=Absolute
[773110.621] - enc_speed_mode=Auto:0
[773110.621] - led_matrix_pattern=1
[773110.622] - colour=0
[773110.622] - lcd_pos=1:1:1
[773110.622] - label="^prgch"
I need more input.
Best Regards, Thorsten.
I’ve just tried it again (with EVENT_SENDER after EVENT_ENC) and it seems to be producing the correct result.
Put it down to some kind of “user error”.
Anyhow, thanks for clarifying.