I’d like to make an hardware control surface for fantastic XVA1 synth
(XVA1 Synthesizer | High-end DIY Subtractive Virtual-Analog Sound Generator | futur3soundz)
The synth use a 24LC1025 I2C EEPROM memory to store preset.
All parameters in XVA1 can be controlled via MIDI System Exclusive messages.
The message format for the messages is as follows:
F0 44 00 P1 P2 V1 V2 F7
Where:
P1 P2 = Parameter number, 0~511 in two hexadecimal 7-bit values.
V1 V2 = Value, 0~255 in two hexadecimal 7-bit values .
So i use encoder on MBNG to change value like this ( example for filter-1-cutoff where P1=0x00 and P2=0x48)
EVENT_ENC id= 1 hw_id = 1 bank=1 fwd_id=LED_MATRIX:1 fwd_to_lcd=1 range= 0:255 type=SysEx stream=“0xf0 0x44 0x00 0x00 0x48 ^val_h ^val 0xf7” ports=100011000000000 lcd_pos=1:1:1 label=“filter1_cutoff %3d”
All is ok
It is also possible to request a SysEx Dump
Get Program Dump (512 parameter values)
F0 43 uu 04 04 00 00 F7
Where uu = unit number.( In my case 0x00)
So i implemented a button to request a dump and store it in a general receiver
EVENT_BUTTON id= 80 button_mode=OnOnly type=SysEx stream=“0xf0 0x44 0x00 0x04 0x04 0x00 0x00 0xf7” chn= 1 range= 0:1 offset= 0 ports=100011000000000 lcd_pos=1:1:1 label=“get dump”
EVENT_RECEIVER id= 1 type=SysEx stream=“0xf0 0x43 0x00 ^dump 0xf7” ports=1000100000001000 fwd_to_lcd=1 lcd_pos=1:1:2 label=“Received SyxDump”
This part is ok. Using MIDI-OX software i can see the 1024 byte of the dump that synth out of its midi out port.
Now the problem.
I’d like to use syxdump_pos parameter to update the value af any controller to reflect the current value stored in the current selected program in the synth memory.
syxdump_pos fails because it points to a single byte in the ^dump , while the parameter value consists of two bytes.
I’m not a programmer but in MIDIbox NG repository i find this section in mbng_event.c file
case MBNG_EVENT_SYSEX_VAR_VAL: match = 1; pool_item->value = (pool_item->value & 0xff80) | (midi_in & 0x7f); break;
case MBNG_EVENT_SYSEX_VAR_VAL_H: match = 1; pool_item->value = (pool_item->value & 0xf07f) | (((u16)midi_in & 0x7f) << 7); break;
case MBNG_EVENT_SYSEX_VAR_VAL_N1: match = 1; pool_item->value = (pool_item->value & 0xfff0) | (((u16)midi_in << 0) & 0x000f); break;
case MBNG_EVENT_SYSEX_VAR_VAL_N2: match = 1; pool_item->value = (pool_item->value & 0xff0f) | (((u16)midi_in << 4) & 0x00f0); break;
case MBNG_EVENT_SYSEX_VAR_VAL_N3: match = 1; pool_item->value = (pool_item->value & 0xf0ff) | (((u16)midi_in << 8) & 0x0f00); break;
case MBNG_EVENT_SYSEX_VAR_VAL_N4: match = 1; pool_item->value = (pool_item->value & 0x0fff) | (((u16)midi_in << 12) & 0xf000); break;
Is it possible to edit this file to get a solution to my problem?how?
Can anyone help me find a solution?
Thanks in advance.
UCapps is a fantastic place.