bach.ratnum and pattr

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
leooel
Posts: 1
Joined: Tue Aug 27, 2019 9:59 am

bach.ratnum and pattr

Post by leooel » Tue Aug 27, 2019 10:22 am

Hello,

well i'm sorry if this question had been allready asked or there is something i'm missing here,
but well for some reason I would love to have the output of bach.ratnum being output through pattr, like it can work with a normal float of int (give a scripting name to it and communicate with pattr).
I chose the list output format and @out t of course, but still nothing happen..
I have to say also that it works really fine to INPUT data... but not to output.
well, thanks, if any one can help me with that!
Léo

klausfilip
Posts: 3
Joined: Tue Aug 27, 2019 11:34 pm

Re: bach.ratnum and pattr

Post by klausfilip » Thu Nov 28, 2019 6:07 pm

yes !
i was puzzled, that bach.ratnum does not comunicate with the pattrsystem.
please, please consider adding these few lines of code.
the (bach.)type of rational numbers for max is so brilliant!
best
klaus

sydy
Posts: 155
Joined: Tue Mar 21, 2017 1:34 pm

Re: bach.ratnum and pattr

Post by sydy » Fri Nov 29, 2019 8:55 am

Hey Klaus and Léo,

The pattr discussion is an ongoing subject. Look in the forum to understand the reasons why it's not an issue of Daniele and Andrea but a problem related to the way cycling handles the pattrstorage.

Here's a workaround I use to handle bach data together with pattr. It's just a reduced version of it but it give a possible way.
I normally add a qlim before the set $1 and even a gate which allows me to stop updating the UI by closing the gate from a central send because you can loose a lot of cpu if you update many UI by pattrstorage. (concerns live applications)


<pre><code>
----------begin_max5_patcher----------
808.3ocwXssbaBCD8Y3qfgoO5lh3ls6SseGcx3QFq3nLfDiP331L9euqj.aR
4RkcItOXrQZQmcO5r6J7atN9a4GIU9de06GdNNu453nGRMfSy8N9E3iY43Js
Y9Lxq7su3uvLkjbTpGdKN64GJ4BIN26a7Zomr0jRrL6YJa+FAISZPJJH5gfE
dgnkpuPgg56fqdO17Pr5BJKmH0XhtLHrxsiF1LJcm1A.m5ynzVPM1I+YIwfn
u+BkOx16eFhJ7AxtMviAt0FrTJnaqkFtv4br63efHpnbFf8VhPM4p.TPfdxS
ttsWO4tvV9yrPiSNgnXEcrVSQIAyE0DeETSIVfKHRhXCgg2lqML3iHVQIq+H
h0v+CwZAopBumzKwnRxEDuOgZmHmxHY7ZlrqyON0zjbX3lnjw3lvA4Fz.bSv
3bi2i2xd76pGb.KX.cpm4INuGaTpRzTTBPUdcLXBBXoNc.x4tE0w.LP5TDv0
UaHKmRXxN9L3gKWq1zVo9UZZ6BNhLq+jE3xxdS2vWcvIEEAnnuDjtDDFKQlM
uaqlzXZ2jufhlpR0Rs1LJHwlzWqknw2MEp.KAuYip20vJUuArv1D31lbwq5n
eGOCdX8aTe5Y5ha5OmQPPzkeZlWucdsZ7aQ3d6JQ8wHLj9jpwm3L44swuKn3
7+9wMPqRL6DI1UIAbLZA3GZMDmQ5h8S3rtLwH8jfEcvUna83qnUkB3J5uzFf
TodmeRCB9yXpOvd377N8sF+jJssnhmo7+K6xyTAfQaMSjSGfsBmj4s.GZ08J
.MMNdkx1wecp3zzoMMzp7C6iy0VFmZbzEV+iWEQ6qpweevWwqEYsKUKRdWb2
cPYOJCKgys2wnTiMCxuVCTpE.ENC.EZANPiROzYa3hclWPI3CGXk.tiQEzck
bJS1r4EA0lR.Aj4T8gqi6eGJVWrnwR8c8iCz+1NUv8RRDcu.ZkMaMyAP1fyr
DQw1fTzbfjUx5fdHYpLAmso4uAPCiBDn.7Kby+GvBWSqdys55fP6yCzV6Mif
EPUWITxs1bdL+iolC55WvAAOql1n4gvyU8pEPwc0IbpJaNpgtGf6I2eCVFfF
ZB
-----------end_max5_patcher-----------
</code></pre>

sydy
Posts: 155
Joined: Tue Mar 21, 2017 1:34 pm

Re: bach.ratnum and pattr

Post by sydy » Fri Nov 29, 2019 9:07 am

And I forgot something to add which might help you too.
Max handles not "unlimited" list length like bach. The default list length of a zl-object in Max is limited to 256 signs. I you want a longer list you'll need to indicate. For zl that is possible but it's, of course, an unhappy situation.

And finally, don't forget: Converting a bach.lll to a text message (@out t or @out m – another format concerning backticking) TAKES TIME i.e. cpu. If you do it to many times in a fast algorithme you'll have cpu load and your process is slowing down.
<pre><code>
----------begin_max5_patcher----------
1378.3oc0X1sbZiDDE9Z3oXJcMqK0sF82dUdORkxk.lXqTfDkjvq2jJu664z
B7OwXYRL9h8hALiNM8z82L8z3eLeVzx16C8Qt+18Y2rY+X9rY1TbhYG97rns
U2uZSUuIKZU61sglgnEiOaHb+fMee82Ct9vfqZY6cA25vWq1uYvsIz3Z+pSS
yNZwl5lvp18MlY9CStqKziu0pg51lqOshpgU2V2by0cgUCiK3TI8p3ENsHlu
k4sWwe69xAaZ1ustYSXvV4xiS1te33rwGlsdsEEsK+1eIEQbteNeNeYw6LuL
zsuYU0PXsaYXU099GSM08Ls3lNu7xnVE4CIpy+Sh5sg99paBuHpeBuOUHTXg
Phjw2Rs.Q0WKDzSFBxIBgzi9bT2v+tKL5vnH2WtfQWRrLQzkTnVzowW1nyeg
itlv+fu2WDbeeiCwGO3NQL5kjmrITh+iBR8DAYxqGjKt3A5USGjIh9wDj5GP
Ptb+vP6YDMokVT3O95uSYiSrqr7UCkkUM2D8v29tptpsggP20glpkaLQwWNV
N3V5V91AuDa2XTVbU5TjTNWR5mN5W7PV3xEoKqVc6UqZ2rAwl6SvutgyHty8
iuUL8V3jyE6ISUK5vi5qtKr9ZnFqlqqFF5pwdzwlMl8PLOK5tPWOt0GtbYni
OrHFG0rGZYrKYdqpqd31s8gNWLJxE6lrLdovcIh+PFLc5Tm+bSc5+WRc2U00
fyr1S1z1byl59W1dyNt5b+5imnX5Xkm2rX5oOBlbhhoSWKcwSSqnIyg1tCOm
qBrBvE0K.7b.0YKb4KbEn9.WfXfmKPfjvsAXvsCYbu.FPl.cJiB98.cZBKoh
AKt.cZNu7.CnKw52gcEfAzk.cIPWBzk.cIPWBz4gNOz4gNOWYPmG57PmG57P
mujsUfAzkBcoPWJCAnKE5RgtzBVpmcFhAzkAcYIreQLXrBcYPWFzkAc4PWNz
kCc4PWNzkCc4Lo.c4PWNzU.cEPWAzU.cEPWAzU.cEL6AcEPWIKyBck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