MT Pro Crash (Duplicatable) on RAW MIDI Send/Bank Change

CreepyPants

2016-07-23 16:45:58

Wow. Never had this pgm crash before!

This is the only Preset running (testing a new translator in a clean preset).
It must be a known issue or perhaps I'm doing something wrong.

Situation:
Controller only sends out MSB for Bank Select.
Synth (older 90s rompler) only responds to LSB for Bank Select. From MIDI Spec Page for rompler, bank select should be in format Bn 00 00 20 bb where n=MIDI Channel & bb=bank

Translator:
Incoming: MIDI Message/Bank Change
Channel: Any set to oo
Bank: Any set to pp
Program: Any set to qq
[X] Swallow MIDI

Outgoing: MIDI Message/Raw MIDI
Boo 00 00 20 pp Coo qq

Upon invoking this Translator (ie sending a bank change from controller), the Translator works, but then I get Windows error:

Bome MIDI Translator: MIDI engine and router has stopped working

Problem signature:
Problem Event Name: APPCRASH
Application Name: MIDITranslator.exe
Application Version: 1.8.0.757
Application Timestamp: 4650b8ed
Fault Module Name: mt.dll
Fault Module Version: 1.8.0.757
Fault Module Timestamp: 558a7dcd
Exception Code: c0000005
Exception Offset: 000b3a1a
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789


i7Intel Laptop (Win7 Ultimate), sh*tloads of RAM, SSD, Roland UM-ONE MIDI to USB interface

Probably bad syntax in my SysEx msg?

CreepyPants

2016-07-23 16:49:25

Oh, doesn't like my MIDI Channel variable.

Is it possible to use a variable for MIDI Channel on RAW MIDI/SysEx?

#StupidN00bTricks

CreepyPants

2016-07-23 18:11:10

Here's a strange bit that is confusing me.

My Controller only sends MSB for Bank Changes.
HOWEVER - if I send a Bank Change *and* a Program Change, let's say Bank 1, Pgm 5, it sends
Bank 128
Pgm 5

Is there a MIDI understanding that I'm missing?

DvlsAdvct

2016-07-23 22:50:58

Hi Creepy Pants

Does this crash when you have other translators in? Or is it just with this translator?

I would use the incoming message as RAW MIDI, instead of the MIDI Message/Bank Select. I think a part of the problem is the Outgoing Message is using the messages Boo and Coo. Those, unfortunately, can quickly confuse MT Pro. What I would do is use the MIDI Raw message, and type out what you're expecting, replacing with different local variables. Use the capture MIDI for the incoming, and just type out the message format you need for the outgoing message.

I can help, just give me the incoming message and we can work from there

J

CreepyPants

2016-07-24 15:28:44

Greetings DvlsAdvct!

Thank you for your response!

This crash occurs as the only Translator running, so it's definitely something to do with this one.
I'm able to make the Translator work properly by accepting RAW MIDI input.

Incoming: B0 00 pp
Outgoing: B0 00 00 20 pp

It would be nice to have just one Translator for all channels (at least channels 1-8). Is there a way to do this?

I'm going to attribute this to my lack of experience with MIDI Bank Change messages. I seem to *sometimes* be getting bank change values of 0, 128, 256, 384, 512 when sending 0, 1, 2, 3, 4 respectively - but not always. It has to do with if/when I send a Program Change along with the message. (My logs and trouble shooting was done yesterday & the studio isn't powered up yet for today's escapades)

However, your suggestion of just using RAW MIDI in strips out the specific B0 msg and inserts the LSB Bank Change RAW MIDI right in the same stream before the Program Change I believe, which resolves the crash.

Thanks again & be well!
-J

DvlsAdvct

2016-07-24 18:48:32

You can have one translator for all channels. If the outgoing channel needs to match the incoming one, we can lock that down. It would look like:

Code: Select all

Incoming: g0 00 pp
Rules: if g0<0xB0 then exit rules, skip outgoing action
if g0>0xB7 then exit rules, skip outgoing action
Outgoing g0 00 00 20 pp
That should lock it down to just those channels.
J

CreepyPants

2016-07-25 16:28:47

Okay, I understand this Rules test.
If i may restate it to verify my understanding:

{Test to ensure that the incoming MIDI Control Change (Bank Change) and MIDI Channel is in the range B0 -> B7 (Bank changes channel 1-8), since Bank Changes are always starting with B and then followed by the Channel#}

This is the stuff that eludes me that you explained with this code. Thank you! Here I was thinking I had to just try to pull only Bank Changes first and then set the channel to a variable.

Stupid question time:
- Is there a reason for specifically a Global Variable (g0) rather than a local variable (gg)?

CreepyPants

2016-07-25 16:47:31

Okay, and this is wholly baffling me:

Sometimes the Bank Change is not being recognized/processed.
The Translator per your spec above is the only one running. I'm trying to duplicate a situation where I can verify that MTPro is not processing properly, or see what my controller is sending. It seems intermittent - or at least I can't define a specific situation where it barfs. I noticed this in testing and still trying to duplicate a situation where I know it will fail.

I changed nothing on the Translator over these tests - same translator - first two times it doesn't want to 'work' even though I'm sending what MTPro is logging as "B0 00 01".

If I'm understanding this Translator properly, MTPro recognizes the incoming "B0 00 01" but *should* be doing something with it - testing it against the Rules & outputting "B0 00 00 20 {Bank}" - but for the life of me I can't figure out why it's not. "B0" specifically resides within the range of the test, although MTPro doesn't even log the variable assignment in the first two examples.

Each of these tests was done sequentially with no changes to the Translator. I edited only to add some spaces to document what I was sending from my controller. (I'm not above blaming the controller, but it seems from the logs that MTPro is receiving the expected data)

Note: I also tried this same test with a local variable of gg instead of g0 and get the same intermittent results.

umm...whut? :)

//Sending on Channel 1, Bank Change of 1, Program Change 5
2452834 - MIDI IN [UM-ONE]: B0 00 01
2452834 - MIDI OUT [UM-ONE]: B0 00 01
2452834 - MIDI IN [UM-ONE]: C0 05
2452834 - MIDI OUT [UM-ONE]: C0 05
2452835 - MIDI IN [UM-ONE]: C3 00
2452835 - MIDI OUT [UM-ONE]: C3 00

//Sending on Channel 1, Bank Change of 0 (No Pgm Change)
2462764 - MIDI IN [UM-ONE]: B0 00 00
2462764 - MIDI OUT [UM-ONE]: B0 00 00

//Sending on Channel 1, Bank Change of 1 (this time works)
2467184 - MIDI IN [UM-ONE]: B0 00 01
2467184 - IN 3.8 MIDI B0 00 01, g0=0xB0 pp=0x01
2467184 - MIDI OUT [Bome MIDI Translator 1 Virtual Out]: B0 00 00 20 01
2467184 - MIDI OUT [UM-ONE]: B0 00 00 20 01
2467184 - OUT 3.8 MIDI 5 bytes B0 00 00 20 01

//Sending Channel 1, Bank Change of 0 (works again)
2491073 - MIDI IN [UM-ONE]: B0 00 00
2491073 - IN 3.8 MIDI B0 00 00, g0=0xB0 pp=0x00
2491073 - MIDI OUT [Bome MIDI Translator 1 Virtual Out]: B0 00 00 20 00
2491073 - MIDI OUT [UM-ONE]: B0 00 00 20 00
2491073 - OUT 3.8 MIDI 5 bytes B0 00 00 20 00

//And back to Bank 1 this time with a Program Change
2505488 - MIDI IN [UM-ONE]: B0 00 01
2505488 - IN 3.8 MIDI B0 00 01, g0=0xB0 pp=0x01
2505488 - MIDI OUT [Bome MIDI Translator 1 Virtual Out]: B0 00 00 20 01
2505488 - MIDI OUT [UM-ONE]: B0 00 00 20 01
2505488 - OUT 3.8 MIDI 5 bytes B0 00 00 20 01
2505489 - MIDI IN [UM-ONE]: C0 0A
2505489 - MIDI OUT [UM-ONE]: C0 0A

CreepyPants

2016-08-04 20:08:53

|Bump|

Last post has log that indicates MTPro not doing what was intended...?

florian

2016-08-05 11:22:07

Sorry for the silence on our part. Can you please attach the project file. Which exact version are you using (Menu Help|About)?
Thanks!
Florian

CreepyPants

2016-08-05 16:21:06

No worries on silence.
Box arrived yesterday so more interested than ever in ensuring all my scripts are resilient.

MTPro V1.8.0 Build 757

The project file has 8 "one channel per" translators (disabled) & another Translator (the one that works intermittently) that was the suggested 'all in one' translation scheme.
Attachments
OT - Bank Change Testing.bmtp
(1.64 KiB) Downloaded 103 times

CreepyPants

2016-08-05 16:26:06

Note: Just verified that the build I have is the latest (757, correct?).
Reinstalled MTPro and reinstalled the MIDI drivers and testing to see if I can duplicate.

EDIT: After reinstall/MIDI Drivers, I can't seem to duplicate the issue. Will follow up if I can get it to duplicate.

Thank you so much for your patience, support, and understanding!
Sometimes technology looks like majik to the unevolved - and by similarly: sometimes easily resolved systems problems are seen as "wholly misunderstanding the programming concepts" to the n00b. :)

oh...and: [eyeroll]@myself

florian

2016-08-08 00:17:10

Hi CreepyPants,
I've had a look at your project file, in particular this translator:

Code: Select all

[x] Translator 0.8: GLOBAL Bank Change
Options: swallow
Incoming: MIDI g0 00 pp
Rules:
  if g0<176 then exit rules, skip Outgoing Action
  if g0>183 then exit rules, skip Outgoing Action
Outgoing: MIDI g0 00 00 20 pp
Some notes:
  • "g0 00 pp" could also be triggered by the valid MIDI sequence of "C0 00 B0 01 23". Then g0 would be set to C0 and pp to B0. Note that this behavior is changed in the upcoming version 1.8.1, where "g0 00 pp" only triggers on full 3-byte messages.
  • the outgoing message "g0 00 00 20 pp" uses running status. It's probably a good idea to specify 2 full MIDI messages: "g0 00 00 g0 20 pp". That will make the project file much more compatible with different systems where you're running the project.
  • unrelated note: "gg" is also a global variable. Only oo...xx are local variables. I know, it's kind of arbitrary. It's recommended to use local variables where you can, so using qq instead of g0 would be nicer, but not change the results.
  • by the MIDI spec, a bank change must be completed by a program change message, so I wonder if the program change message (C0) is coming every time after a bank select?
  • it's easier to use the "simple MIDI" incoming (control change) and possibly the simple outgoing action (bank change), but the latter requires you to specify the program change number, too.
Probably the best way would be to use a "simple" bank change as incoming action, using a local variable pp for the bank number and qq for the program number. Then, modify the bank number pp as needed in the rules, and then use a "simple" Bank Change outgoing action with the modified bank number pp, and the same program number qq.

Anyway, for now, attached is my modified project. It uses a simple MIDI action for incoming, but still uses raw MIDI for outgoing, because i don't know if the program change message is consistently coming.

Code: Select all

[x] Translator 0.0: GLOBAL Bank Change
Options: swallow
Incoming: Control Change set 'qq' to ch. with CC#:0 (0x00) set 'pp' to value
Rules: qq=qq+176
Outgoing: MIDI qq 00 00 qq 20 pp
Florian
Attachments
OT - Bank Change Testing2.bmtp
(1.02 KiB) Downloaded 111 times

CreepyPants

2016-08-08 19:19:52

I adore y'all for constantly being the first ones to post a proper script!
Really: that's above & beyond constantly!
Really wish I could figure this out on my own instead of bothering you all the time, though.

Note: The script I posted was a bastardized one that DvlsAdvct sent, but I forgot I had edited it because it wasn't working for me (the problem I posted earlier in the thread) so I was messing around with things to see what would happen. (Sorry DvlsAdvct!)

Unrelated Note: Duh@me - I assumed that 'gg' was a local variable!
Also, I forgot that Bank Change is CC#0 and thought I needed to test for Bank Change only as a Raw MIDI.

And stupid question #5,067:
Why the "qq=qq+176" rule?

I feel like I'm in remedial MIDI hell!
But if I understand correctly, if something comes in as MIDI Channel 1, then it makes the incoming qq value 0, which 0+176=176=B0, right?

florian

2016-08-08 22:07:22

But if I understand correctly, if something comes in as MIDI Channel 1, then it makes the incoming qq value 0, which 0+176=176=B0, right?
you nailed it, sir!

I actually had to look up if gg is local or global :)

You're making phenomenal progress, soon you'll teach us tricks :)

Florian

CreepyPants

2016-08-10 06:09:05

Bwahahhahhahah!

I'm a slow learner and y'all have been exceedingly patient. Thank you & thank DvlsAdvct for me.