Velocities in a roll at first build

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
jmdbrady
Posts: 12
Joined: Sat May 06, 2017 4:52 pm

Velocities in a roll at first build

Post by jmdbrady » Tue Jun 13, 2017 12:29 pm

Hi everybody,

I have a small issue with bach.roll.
I just want to build, in separate syntax, a small sequence of chords with a crescendo.
Everything works fine except the first time I load the patch where the crescendo is ignored , all velocities are at 100.
The second and following drawings are fine with the crescendo as expected.

I have found a workaround which is to delay the last bang to the bach.roll by at least 5ms.

Well, I think I can live like that but I'm wondering if there is not a more elegant solution.
Everything is happening like if the last bang from the trigger is too fast. Indeed if I bang by hand it behaves normally.

Is it normal? Is something wrong in my patch?

Thanks for any help.

<pre><code>
----------begin_max5_patcher----------
2067.3oc6bssbihCD8YmuBJdZxVYcgj35919xteDSMkKYP1VyfAJPNW1s1+8
UW.LXKvjDFhloFmJFmtAoiNpa0RpU7+d2J6s4OSprs9CqOasZ0+d2pURQBAq
p+6U1GwOGmhqj2lcF4o7se09AkJF4YlT7Vb7g0EkzLl0ijz7XJixK256J6zQ
ZVJgIKAvYg4mXMRcpkVfYwGnY62TRhYJb4GAWCcbb.vGr.9Aqc3W.9hKPm0N
Veo9IoIRfvA2u61Tw6xyXY3iDol+rjhS6poh9ORM.3ZGgz+6t6Du8vDYhijp
J7dxUTQbJAWpsoC01zAizz8jsV+HwEjpoGpuMitcaVUmrWJHpR21tsflA5X.
CiDRpk27vF.vZOtcfiqv.v4LkLjY.7MPIawY6WBZovJtjTE+J7PFyLwEcoGh
azXLCvKXVMW5BMRYMaTSG76llRdjTVQyy5zPVYiKJ5HdUmGQvgeMWVP9OzJh
loDAZEURdj1VrNshwkbFhwomSkp10yg91Jk7Nt6Zd1y1UHfjyD9VbRySN3hK
z6L4w6k2yGU6ajjNCVwonBRFMqf2SRxXXVMRZUmP1gOkx1nmt5qeGNlL3Cqs
CZk89RZRdl.D8dRg3lpi25TigzqwHuiLbglGth2NNUsEWJX1sojNdpby277z
9pZ6L4dA3L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isi
Site Admin
Posts: 1349
Joined: Fri Dec 03, 2010 1:25 pm

Re: Velocities in a roll at first build

Post by danieleghisi » Wed Jun 14, 2017 11:05 am

Hi, the problem in your case is a Max programming one: [thresh] is a bad choice in your context, because it is "asynchronous", which means that it breaks the normal flow of data, waiting for a certain time in order to collect all the elements arriving within that time.
That is why you need to put the delay: if you don't, when the final bang arrives, thresh is still waiting for the elements to come.

I'm pretty sure that if you remove [thresh], and you use something else to build the crescendo like [bach.arithmser] from 1 to bach.length, and then multiply it by 10 via [bach.* 10], you'll be fine.

Hope this helps!
d

jmdbrady
Posts: 12
Joined: Sat May 06, 2017 4:52 pm

Re: Velocities in a roll at first build

Post by jmdbrady » Wed Jun 14, 2017 1:56 pm

Thank you Daniele,
I wasn't very sure about thresh but I didn't find anything better and it worked so far.

Your suggestions solved this anyway.

Cheers.

JMD

Post Reply