FEATURE SUGGESTION: Equivalent 'eval' function for strings

Just a thought;’
It often very efficient to execute the value of a string
eg lets say there are 2 cases where case 1 will send ‘90 2D 7F’ and case 2 needs to send 3 of the same ie ‘90 2D 7F’ ‘90 2D 7F’ ‘90 2D 7F’
myVal = caseStr
Ideally you could composite a string linearly and then simply execute the string ie on the raw midi line


OK however you know there are currently no string variables in MT Pro, right? This, along with arrays has also been requested. I think eval would come later.

Steve Caldwell
Bome Customer Care

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

Yep totally…was more on the back of being able to use the sprint stuff re: goto using int>str etc
Arrays would be nice but named globals and then eval would be way more immediate impact and more contextually relevant (to the rules type language) than arrays? ie in priorities imvho
I havent had the need for arrays yet but of course others may be using it completely differently to me.

Do you have a need for arrays and how might you apply them? Interested :slight_smile:

Eval allows a huge reduction of forking although the change in mindset can be a bit painful

Cheers Steve

Yes, arrays for me would be nice like

fader[0], fader[1] etc (if using user created global variable names)

Even this would be nice

ga[0] = 7
ga[1] = 3

For instance if these are faders.

Then I wouldn’t need to do this

// default
// Put the appropriate global variable into rr
if pp==1 then rr=g1
if pp==2 then rr=g2
if pp==3 then rr=g3
if rr<0 then exit rules skip outgoing action

// Now do stuff with rr

// Now put it back into the global space
if pp==1 then g1=rr
if pp==2 then g2=rr
if pp==3 then g3=rr

A construct like this would be nice (Macro)


Then if if expanded and ga was was a 1, it would expand to

or if ga was a 2 it would expand to


And then I could put back into global variable space by


Steve Caldwell
Bome Customer Care

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