Jump to content

Control surface for XVA1 Synthesizer Module


Recommended Posts

I'd like to make an hardware control surface for fantastic XVA1 synth
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
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.


Link to comment
Share on other sites

  • 1 month later...

No news?

Is there a way to read two consecuitive bytes from a received sysex and assign to a hardware controller?


From pag. 35 of Xva1 manual:

XVA1 can be controlled also by using the dedicated external UART, by using pins 26 (TX) and 27 (RX) in the CMOD-A7 module.

The external UART is set to send/receive at 500 kbps, 8-bit, one stop bit, no parity.

Command are: 

r = Loads a program from EEPROM

w =Writes active program into EEPROM.

s= Sets specified parameter to specified value.

g =Gets active value for specified parameter


is there a way to use these commands in my midibox?

is possible to send command like this from a midibox to the synth?


If there is no solution the last thing i can do is to manually copy all preset from eeprom and save every preset in the sd card. I fear that 500 parameters for every preset are too many to save on sd card. I have bad experience with sd card. I prefer eeprom.




Link to comment
Share on other sites


By default the UART are configured for regular MIDI DIN speed, 31250 baud.
But you can change their configuration, in the mios32_config.h file of your project.

The default value(if not previously defined in mios32_config.h) are found in include/mios32/mios32_uart.h

// Baudrate of UART first interface
#define MIOS32_UART0_BAUDRATE 31250

Others settings are not easily accessible, they are dependant of the cpu.  They are set in mios32_uart.c
But they meet your requirement, example for stm32f4xx:

  USART_InitTypeDef USART_InitStructure;
  USART_InitStructure.USART_WordLength = USART_WordLength_8b;
  USART_InitStructure.USART_StopBits = USART_StopBits_1;
  USART_InitStructure.USART_Parity = USART_Parity_No;
  USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
  USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

Best regards

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...