Jump to content

Custon Sysex question


KUI
 Share

Recommended Posts

Sysyex stream definition :   stream="0xf0  ^dev  ^chn  ^val_h  ^val  0xf7"

 

 

Trying to send 14 bit fader data over Sysex. How can we get the 14 bit value calculated from ^val_h and ^val and sent to MF1 as if we where using nrpn?

 

This is the entry now. Its works but only from 0-127.

 

EVENT_MF  ID=1    fwd_id= MF:1  type= Sysex stream="0xf0 0x00 0x01 ^val_h ^val 0xf7"

 

 

Thanks

 

KUI

 

Link to comment
Share on other sites

So i have another strange occurrence. We are trying to write a custom sysex control chart for Software Audio Console. I have the developer in the loop on this.

He has been able to output the sysex stream and been able to receive it. The MBNG responds great to the incoming stream.

Here is the NGC file contents.

# Reset to default
RESET_HW
LCD "%C"


# the SCS should emulate button/enc functions in main page
SCS soft1_button_emu_id=2000 \
    soft2_button_emu_id=2001 \
    soft3_button_emu_id=2002 \
    soft4_button_emu_id=2003 \
    shift_button_emu_id=2004 \
    enc_emu_id=2000








EVENT_BUTTON id=2000 fwd_id=LED:1 button_mode=toggle type=SysEx stream="0xf0 0x02 0x01 ^val_h ^val 0xf7" 
EVENT_BUTTON id=2001 fwd_id=LED:2 button_mode=toggle type=SysEx stream="0xf0 0x02 0x02 ^val_h ^val 0xf7"  
EVENT_BUTTON id=2002 fwd_id=LED:3 button_mode=toggle type=SysEx stream="0xf0 0x02 0x03 ^val_h ^val 0xf7"  
EVENT_BUTTON id=2003 fwd_id=LED:4 button_mode=toggle type=SysEx stream="0xf0 0x02 0x04 ^val_h ^val 0xf7"  








# on motorfader movements

EVENT_MF  id= 1    fwd_id=MF:1     range=0:16383 type=Sysex stream="0xf0 0x00 0x01 ^val_h ^val 0xf7"
EVENT_MF  id= 2    fwd_id=MF:2     range=0:16383 type=Sysex stream="0xf0 0x00 0x02 ^val_h ^val 0xf7"
EVENT_MF  id= 3    fwd_id=MF:3     range=0:16383 type=Sysex stream="0xf0 0x00 0x03 ^val_h ^val 0xf7"
EVENT_MF  id= 4    fwd_id=MF:4     range=0:16383 type=Sysex stream="0xf0 0x00 0x04 ^val_h ^val 0xf7"
EVENT_MF  id= 5    fwd_id=MF:5     range=0:16383 type=Sysex stream="0xf0 0x00 0x05 ^val_h ^val 0xf7"
EVENT_MF  id= 6    fwd_id=MF:6     range=0:16383 type=Sysex stream="0xf0 0x00 0x06 ^val_h ^val 0xf7"
EVENT_MF  id= 7    fwd_id=MF:7     range=0:16383 type=Sysex stream="0xf0 0x00 0x07 ^val_h ^val 0xf7"
EVENT_MF  id= 8    fwd_id=MF:8     range=0:16383 type=Sysex stream="0xf0 0x00 0x08 ^val_h ^val 0xf7"
EVENT_MF  id= 9    fwd_id=MF:9     range=0:16383 type=Sysex stream="0xf0 0x00 0x09 ^val_h ^val 0xf7"
EVENT_MF  id= 10   fwd_id=MF:10    range=0:16383 type=Sysex stream="0xf0 0x00 0x0a ^val_h ^val 0xf7"
EVENT_MF  id= 11   fwd_id=MF:11    range=0:16383 type=Sysex stream="0xf0 0x00 0x0b ^val_h ^val 0xf7"
EVENT_MF  id= 12   fwd_id=MF:12    range=0:16383 type=Sysex stream="0xf0 0x00 0x0c ^val_h ^val 0xf7"
EVENT_MF  id= 13   fwd_id=MF:13    range=0:16383 type=Sysex stream="0xf0 0x00 0x0d ^val_h ^val 0xf7"
EVENT_MF  id= 14   fwd_id=MF:14    range=0:16383 type=Sysex stream="0xf0 0x00 0x0e ^val_h ^val 0xf7"
EVENT_MF  id= 15   fwd_id=MF:15    range=0:16383 type=Sysex stream="0xf0 0x00 0x0f ^val_h ^val 0xf7"
EVENT_MF  id= 16   fwd_id=MF:16    range=0:16383 type=Sysex stream="0xf0 0x00 0x10 ^val_h ^val 0xf7"




# MF hardware (has to be configured for Motormix protocol!)

MF n=  1   enabled=1  midi_in_port=IN3   midi_out_port=OUT3  chn=1  ts_first_button_id=0 config_port=USB2
MF n=  2   enabled=1  midi_in_port=IN2   midi_out_port=OUT2  chn=2  ts_first_button_id=0 config_port=USB2
MF n=  3   enabled=0  midi_in_port=0x00  midi_out_port=0x00  chn=1  ts_first_button_id=0 config_port=0x00
MF n=  4   enabled=0  midi_in_port=0x00  midi_out_port=0x00  chn=1  ts_first_button_id=0 config_port=0x00

The soft buttons emulate the mutes.

 

So here is the problem

 

We have 16 faders on two NG_MF boards.

 

When moving fader 5,6,7,8 on mfb 1 and 9,10,11,12 on mfb 2 we get the following error

 

f0 00 0b 4c 60 f7 
f0 00 07 04 50 f7 
f0 00 09 3f 40 f7 
f0 00 07 03 40 f7 
f0 00 0c 3b 00 f7 
f0 00 07 00 07 f7 
f0 00 08 09 60 f7 
f0 00 0b 4c 20 f7 
f0 00 08 02 60 f7 
f0 00 08 01 60 f7 
f0 00 08 00 60 f7 
f0 00 0c 2c 20 f7 
f0 00 0b 4c 70 f7 
f0 00 0c 19 50 f7 
f0 00 09 19 50 f7 
f0 00 0a 21 30 f7 
f0 00 0b 23 60 f7 
f0 00 0a 1d 00 f7 
f0 00 0b 1f 50 f7 
f0 00 0c 12 20 f7 
f0 00 09 11 40 f7
f0 00 0a 18 70 f7 
f0 00 0b 1b 60 f7
f0 00 0c 0e 60 f7 
f0 00 09 0e 40 f7 
f0 00 0a 16 00 f7 
f0 00 0b 18 30 f7 
f0 00 0c 0b 60 f7 
f0 00 09 0b 00 f7 
f0 00 0a 11 20 f7 
f0 00 0b 14 70 f7 
f0 00 0c 08 40 f7 
f0 00 09 07 30 f7 
f0 00 0a 0d 60 f7 
f0 00 0b 11 40 f7 
f0 00 0c 05 60 f7 
f0 00 09 04 00 f7 
f0 00 0a 0b 00 f7 
f0 00 0b 0e 30 f7 
f0 00 0c 02 70 f7 
f0 00 09 01 10 f7 
f0 00 0a 06 60 f7 
f0 00 0b 0b 20 f7 
f0 00 0c 00 00 f7 
f0 00 09 00 00 f7 
f0 00 0a 03 50 f7 
f0 00 0b 08 30 f7 
f0 00 0a 02 10 f7 
f0 00 0a 00 70 f7 
f0 00 0b 05 40 f7 
f0 00 00 7e 32 00 0d 40 5b 4d 49 4f 53 33 32 5f 4d 49 44 49 5f 52 65 63 65 69 76 65 5f 48 61 6e 64 6c 65 72 5d 20 54 69 6d 65 6f 75 74 20 6f 6e 20 70 6f 72 74 20 30 78 32 31 0a 00 f7

Is this a merging error?

 

I noticed some todo's in the sysex handler.

Any help is appreciated.

 

This work will help Novski greatly once he's done with his board.

The map will include all controls for 96 channels if we can get this sorted.

 

KUI

Link to comment
Share on other sites

Do you mean the last SysEx string?

 

It's not a merging error, but a message to the MIOS Terminal.

f0 00 00 7e 32 00 0d 40 5b 4d 49 4f 53 33 32 5f 4d 49 44 49 5f 52 65 63 65 69 76 65 5f 48 61 6e 64 6c 65 72 5d 20 54 69 6d 65 6f 75 74 20 6f 6e 20 70 6f 72 74 20 30 78 32 31 0a 00 f7

 

stands for:

 

 

[MIOS32_MIDI_Receive_Handler] Timeout on port 0x21

 

Port 0x21 stands for IN2

 

It could be, that this happens since currently short messages from the IN side generate long messages at the OUT side (bottleneck issue), so that a MIDI IN buffer overrun could happen depending on the amount of messages which are received in a given timeframe.

 

This can be avoided by sending messages only to a MIDI port which is faster than the IN port.

 

In other words: if you would explicitly define

 

ports=1000000000000000

 

 

 

in the EVENT_* statements, so that messages are only forwarded to USB1 (and not to OUT1 and OSC1 in addition, which is done by default...), the timeout error shouldn't happen anymore, because USB is *much* faster than traditional MIDI! :smile:

 

Best Regards, Thorsten.

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.

Guest
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.

Loading...
 Share

×
×
  • Create New...