bach.eval - length of expressions

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
belljonathan
Posts: 11
Joined: Fri Mar 24, 2017 12:48 pm

bach.eval - length of expressions

Post by belljonathan » Wed Nov 20, 2019 10:01 pm

Hi,

First of all, congratulations on bach 0.8.1, this is just AMAZING!!!

The integration of dynamics makes a real expressive leap forward in my case.

I am now exploring bach.eval and the bell language, which makes patching much clearer, but I've been confronted with the impossibility to make expressions longer. I am probably miss-using it, but :

this works
bach.eval $x1:1 $x1:3 $x1:2 $x1:4 $x1:3 $x1:5 $x1:4 $x1:6

while that doesn't work
bach.eval $x1:1 $x1:3 $x1:2 $x1:4 $x1:3 $x1:5 $x1:4 $x1:6 $x1:5

should I just cope with it? Or is there a work around?

Thanks, and congrats on the great work!

danieleghisi
Site Admin
Posts: 1347
Joined: Fri Dec 03, 2010 1:25 pm

Re: bach.eval - length of expressions

Post by danieleghisi » Thu Nov 21, 2019 10:10 am

That seems like a bug of the object to me. I'll let andrea answer though.
On my side, I can give you a workaround :)

bach.eval $x1:(1 3 2 4 3 5 4 6 5)

belljonathan
Posts: 11
Joined: Fri Mar 24, 2017 12:48 pm

Re: bach.eval - length of expressions

Post by belljonathan » Thu Nov 21, 2019 3:08 pm

So much neater :)

Many thanks!

andreaagostini
Posts: 209
Joined: Fri Dec 03, 2010 1:51 pm

Re: bach.eval - length of expressions

Post by andreaagostini » Thu Nov 28, 2019 11:37 am

Hello Jonathan,

I can confirm the issue. It not about the length of the expression, but specifically to the : operator. By the way, the dot operator has the same problem.

For now, you can adopt Daniele's solution, or—for a more general case—add parens: ($x1:1) ($x2:2) ($foo.'three') and so on will work regardless of the expression length.

Best,
andrea

belljonathan
Posts: 11
Joined: Fri Mar 24, 2017 12:48 pm

Re: bach.eval - length of expressions

Post by belljonathan » Fri Dec 06, 2019 6:34 pm

Thanks a lot,

I can make it work now :)

Post Reply