How to "thin" redundant data?

dburns

2009-05-17 03:13:51

Is it possible to make a Translator that will thin redundant data in a MIDI stream?

I have tried using my EWI USB wind controller with Ableton Live 7, and the vast amount of MIDI data (mostly PB and BC) will choke Live when recording, usually ending in a crash and loss of the recording. The horn sends more data than Live can process.

I have contacted Ableton, and they said the EWI simply sends too much data.

MIDIOx tells me that the EWI sends a stream of PB as long as I am playing the horn, even though I am not using the bend plates or bite vibrato (both mapped to PB). The EWI seems extremely sensitive, and I think some of the data may be unecessary.

I would like to use Bome MT to monitor the MIDI stream from the EWI and remove (not pass on) redundant data. For example, if two or more PB data have the same value (or relative range of values), the first data would continue to Live, but no subsequent PB data would be sent until the data value changed. I would also like to be able to set a range of values so insignificant values would not be passed.

I think this may filter the data sufficiently not to choke Live.

Can this be done?

:)

Thanks!

florian

2009-05-22 09:54:54

Hi dburns,

yes, that's no problem with Midi Translator. As a matter of fact, there are even different ways to achieve this.

The first way is simple and you should try it first, as it won't actually remove information. Just remove duplicated values:

Code: Select all

Translator 1: Filter duplicate pitch bend messages
Options: stop=true
Incoming: MIDI E0 pp qq 
Rules: 
  if pp==gp then Goto "Same1"
  gp=pp
  gq=qq
  exit rules, execute Outgoing Action
  Label "Same1"
  if qq==gq then Goto "Same2"
  gp=pp
  gq=qq
  exit rules, execute Outgoing Action
  Label "Same2"
  exit rules, skip Outgoing Action
Outgoing: MIDI E0 pp qq 
Basically, the rules will remember the current pitch bend value in the global variables gp and gq. For every incoming pitch bend message with values pp and qq, first pp is compared to the previous pitch bend pp value (i.e. gp). If it is the same, continue the rules further down at label "Same1". If pp is different from the previous value, remember the current pp and qq values in gp and gq and execute the outgoing action, which outputs the pitch bend message. For the second pitch parameter qq, the same logic is applied. Now if both pp and qq are the same as previous, the last line is executed, which will cause the outgoing action to not be executed.

You probably also need to pass thru other MIDI messages from the device. You could use a MIDI route for that, or use explicit translator entries:

Code: Select all

Translator 2: MIDI Thru all other 3-byte messages
Options: stop=true
Incoming: MIDI pp qq rr 
Outgoing: MIDI pp qq rr 

Translator 3: MIDI Thru all other 2-byte messages
Options: stop=true
Incoming: MIDI pp qq 
Outgoing: MIDI pp qq 
Let me know if this will thin out enough for Live to work correctly.

Oh, one note to the MIDI setup:
- in MT, choose EWI as MIDI IN
- in MT, choose "Bome's Midi Translator Virtual Out 1" as MIDI OUT
- in Live, choose "Bome's Midi Translator 1" as MIDI IN
- in Live DESELECT EWI from MIDI IN

The last point is the most important step, as otherwise Live would still receive the original messages from MT.

Let me know how it works!
Florian

PS: the other way of thinning out messages would use a timer to limit the message flow to e.g. 1 every millisecond or so.

dburns

2009-05-22 10:18:05

Thank you Florian!

I'll try it out and report back.

:)