Code that use to work now being strange and weird

hi guys i have a strange situation stuff that use to work stopt working or just acting strange like losing its capabilitys to folow its programing here is the the bigest crasher
input 90 20 7F

//zero
if if>=2 then Goto "fyra"

//two
if if>=1 then Goto "fem"

//one
if if==1 then Goto "el"

Label "el"
qq=80
if ig!=1 then Goto "en"
ig=0
exit rules, execute Outgoing Action

Label "en"
if ih!=1 then Goto "tva"
ih=0
exit rules, execute Outgoing Action

Label "tva"
if ii!=1 then Goto "tre"
ii=0
exit rules, execute Outgoing Action

Label "tre"
if ij!=1 then skip next rule
ij=0
exit rules, execute Outgoing Action

//two

Label "fem"
qq=90
if ig!=2 then Goto "sex"
ig=0
exit rules, execute Outgoing Action

Label "sex"
if ih!=2 then Goto "sju"
ih=0
exit rules, execute Outgoing Action

Label "sju"
if ii!=2 then Goto "ota"
ii=0
exit rules, execute Outgoing Action

Label "ota"
if ij!=2 then skip next rule
ij=0
exit rules, execute Outgoing Action

//zero
Label "fyra"
exit rules, skip Outgoing Action

out put
qq 20 7F

so before 80 use to be 144
and 90 127
but that stopt working then this started working
but now it dont out put qq= 80
or qq=90
and the software have been glitchy for a while
and this also changes the leds
its like it forgets to use the code and becomes a togge on or off and other times it start controlling leds on other buttons .
rebotting the software or the pc normaly clear the led problem
but the output still not working
but the most irritating is it was working a couple of months ago and i have not changed any thing in bome

Hi, maybe you should post the project file because these constructs are not legal

//zero
if if>=2 then Goto "fyra"

//two
if if>=1 then Goto "fem"

//one
if if==1 then Goto "el"

Perhaps you you posted them here, the web interface deleted some text.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

the code part is scroll able

//zero
if if>=2 then Goto “fyra”

//two
if if>=1 then Goto “fem”

//one
if if==1 then Goto “el”

Label “el”
qq=80
if ig!=1 then Goto “en”
ig=0
exit rules, execute Outgoing Action

Label “en”
if ih!=1 then Goto “tva”
ih=0
exit rules, execute Outgoing Action

Label “tva”
if ii!=1 then Goto “tre”
ii=0
exit rules, execute Outgoing Action

Label “tre”
if ij!=1 then skip next rule
ij=0
exit rules, execute Outgoing Action

//two

Label “fem”
qq=90
if ig!=2 then Goto “sex”
ig=0
exit rules, execute Outgoing Action

Label “sex”
if ih!=2 then Goto “sju”
ih=0
exit rules, execute Outgoing Action

Label “sju”
if ii!=2 then Goto “ota”
ii=0
exit rules, execute Outgoing Action

Label “ota”
if ij!=2 then skip next rule
ij=0
exit rules, execute Outgoing Action

//zero
Label “fyra”
exit rules, skip Outgoing Action

i was using code block

Oh I see I was misreading the first if. You were using the global variable “if”. Again to see the full picture though I would probably need to see your project file. The most likely cause of incorrect behavior would be not properly directing from or to the right MIDI ports which I would not see looking at just rules.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

ok no probs i will

apc,40 022122.bmtp (161.3 KB)
preset nr 26

n ´r 27 is the same
got the out puts to give correct values some how bome had changed 0x90 and 0x80 to 80 90
but its like after changing some of the values it stop reading the globals and when that happes i need to rebot the pc to get it back reading the globals

apc,40 022122.bmtp (161.1 KB)
this is with the corrected values

after u mention the ports i just as test added aport on the missbehaving translators and now they work but its wierd since i have never had ports there before and this have been working since u tried to teach me bit banging

Hi,

The way it works is if you don’t define any incoming and outgoing ports at the preset or project level, then the incoming ports will be all defined incoming ports in the project and the outgong ports will be all defined outgoing ports in the project. You override this at the preset level or the translator level. The preset definitions will override the project definitions and the translator definitions will override the preset and project definitions. My guess is you added some ports at the project level that weren’t there before which resulted in different behavior. I didn’t look at your project file since I think you have things sorted out now.

This tutorial explains how port definition and routing works within translators.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Thx mate but not only port some of the code had changed so strange i have seen this before it randomly change some code mostly values in the code .and this is with out touching a thing
And some times it stops reading the global varibles
Not on up start but during usage .then a hole sys reboot is needed to get it working again

OK, there are other things to look for.

  1. Make sure under options you have suppress incoming keystrokes when focused. If you don’t do that, then it is possible if you happen to have MT Pro focused and you are typing on the keyboard, you may inadvertently change translators or translator rules.

  2. At the project level, select all ports that you are going to use within the project. Then override them at the preset and translator level as earlier discussed. This will ensure that all used ports are held open and will not be taken over by any other MIDI enabled running application. On Windows, a given MIDI port can only be accessed by one application at a time. I found out when using some applications, they want to automatically open a given MIDI port and if you are not using it at the time, the MT Pro project may no longer have access to that port (since it is being exclusively held open by another application. It is best to always open MT Pro first so that it can open any MIDI ports it needs.

  3. Make sure to reduce the possibility of multiple translators changing a given global variable at a given time. Global variables are not locked and if there are multiple translators changing the value asynchronously, that could cause some intermittent problems with the logic of the translators. It is really best practice if you can only have a single translator change a given global variable while multiple translator can read the value of it. If something can happen asynchronously or in parallel, that can be problematic and cause a lock or spin condition.

These are the key reasons, thing will generally “randomly” stop working. For troubleshooting, I typically disable sections (presets) to test individual functionality. If it works with a given preset disabled and breaks with it enabled, that is a key indicator that one section is interacting with another causing a potential for breakage.

I’ll poke at your project file to see if there are any obvious questionable areas, in generally debugging other people’s code is out of scope for free support but if I can find something obvious in a short amount of time, maybe I can help.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hey mate u dont need to check i have done the test and i never have bome open normaly and it happens so rarely . Now when its i whent down to translator level with the ports they are working .
The stranges thing was it changed all values in 2 presets so normaly it changes all 0x90 to 144 or 128
0×80 but it changes them to 90 and 80 was so strange this is the third time in 1 year and a hlf .

OK,

Another thought is I think you are running Midi Helper and this does not use a true database but a text file so there may be some timing issues with reading and writing persistent variables there. I think I sold you this application about 2 years ago in conjunction with some new functionality Florian implemented in MT Pro.

Just make sure you give enough time to read and write the data file and that there is no overlap (ie writing) when you are in the middle of a read. If I remember it reads and writes the data file (variables) serially.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Well I know if you put 0x90 in rules, save and open it again it will show 144 and if you put 0x80 in rules and save and open it will show 128 so rules will change hex to decimal values but shouldn’t effect functionality since it is really the same value in just a different representation.

Yeah know the numbers becouse u explained that when i was making the code but the weir part was they all had turned in to normal 90 and 80 on those possitions .
And i had some led showing wrong colors and they where reading the wrong global var .
Its almost that some time its reading small parts from difrent project .
The persistant globals are still working and i got a delay in there and they only run before shut down and boot i changed the overlap system so it dont need to run them on a button press .
And thanks to voice meeter midi feedback i could take away some more sensitive/irritating codes

You are not running more than 1 Bome Project file concurrently are you?

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

No i dont .
Just one of those things .
Il see how loong it runs now whit no issues :slight_smile: