COUNTER: Why does it not count first click?

Learn about building and using Max for Live devices.
Post Reply
IMage_Engine
Posts: 152
Joined: Sat Jun 07, 2008 10:38 pm
Location: Sydney, Australia

COUNTER: Why does it not count first click?

Post by IMage_Engine » Sat Jan 27, 2018 5:57 am

Have a simple counter from 0 - 7. The first click is not counted...why?

doubleUG
Posts: 249
Joined: Sun Apr 24, 2011 7:19 am

Re: COUNTER: Why does it not count first click?

Post by doubleUG » Sat Jan 27, 2018 11:35 am

copy the text, open Live > drag in empty M4L device > open Max editor > paste > save M4L device
https://docs.cycling74.com/max8/vignett ... ng_patches

https://doubleUG.bandcamp.com/releases

IMage_Engine
Posts: 152
Joined: Sat Jun 07, 2008 10:38 pm
Location: Sydney, Australia

Re: COUNTER: Why does it not count first click?

Post by IMage_Engine » Sun Jan 28, 2018 10:47 am

Here is the patch. Open it and bang once...shouldnt it output 1??

<pre><code>
----------begin_max5_patcher----------
364.3ocmS90aBCBD.+4Zx9NP34tkZsU21WkEigVu3vTgF5gqFy9tO3PTiqoS
2CE58+iebb7oII7JcOzwYuy9fkjbzoIgz40jDUjv2I5qaDcjibkcWEX3omr4
DkpF.IiSuRq1hQ04Q0c3gFfxx43CtgGZgPa3rv3UB0FNaYzG4ZJFc01mKJOG
Yq.q+Tp1rx.0XH3EEujkxlNO2uUl4Wyc+eISsBiXGffYEnDUgdIir88SS76t
sz6FEUVD0pGBESeDTLBFJFCCkz4eVIc9Khqrk+6CpB9xU0ykDgdpR7ZsU4fI
KiMaXJTNLEJdDJHUnelH94EGjI4Yixj4dN7FQiEWMYbCSBYl2HU+5cAkTuga
HUm1ZpiMarQXWMzsF5PoRfR2rxEu7SxrQuTt6B5mF96BFaqgOwh118fo6THg
Z4FB1pMd4EoAYoJHOKHaf8xXHg6Ttv3HO5vt0DtX6ecN+Tz50fQYkz6.mFpG
bK+.0OF.4A
-----------end_max5_patcher-----------
</code></pre>

doubleUG
Posts: 249
Joined: Sun Apr 24, 2011 7:19 am

Re: COUNTER: Why does it not count first click?

Post by doubleUG » Sun Jan 28, 2018 11:33 am

<pre><code>
----------begin_max5_patcher----------
977.3oc0Y00aaBCE84To8e.wyYU9af8119YLUUQRrZoJAhHl1TUs+6ybMjFx
BDO.CZODbwf88bO9568f6Ge4tE9qxNJO368Mue4sXwG5dV.8U1yh5NV3uK93
5swGfWzec1tcxTk+xpGpjGUvCvdDOp9G9zi1GqV+bR5SOlKWqLVgyD2iV5IX
AkMXNBZBuG48P8nNndeqDlwSSTZwtjzsREf.7ooOWdPijXURVZql.Uc4y4WO
YYEp5YCU2cxFvlYqd4qjPenye+k6Ja0MKGN8f71jTBRMX8vdaydyacVQpRSY
OmX9ySiYaRpzzidfjNXy.L3ibMAxOwljnwjMaZhdwlQ8mMSkuomh+lL2mmno
te1UjlfAfUffFFEnFzXRMMsPenFJp+TypBkJKsy8ZDLrzEAMDV80QbqVCKbK
F.eMF3yrEl2T89doYx8WEm9ju2C8O3oX2JYdmLT.5L7Ws8omwHw4w6jJY9ix
z3UlwftE80v72h9HWi9HsSe9KGNEZQPFKD1eIXNKHqgE5UPF0gAYsjgBxeKy
KqG5Q6j.4DHHf.YnBH+6wf7qyDrqwDr1YhjxJPlvlxek2N.do05ffDAutXDL
xrhSEgCWjfE0mBbP0diXHy0ty.AkWoghIwU4+mHrASvQvFAZjyT1bgM5S8ab
vrHsAiYPZBpo76fz1XgSF5RQJXjIwGESbUAjKLQepffilSYJXjorPkCL45Tt
v98QnBAO2BUvn5jqb2En0vD8IPiPlOoJ3aIUQ6eUrFaBzpPnytVEm7M6F8dD
cnxfqrYQxagSp32IUbEmlRMa5njoPlCl4Dm1nlqpsy8IQv9CJeZ7VjqDg7iN
Oek.XIkZVRcrFDlSOmDtvnlh5rOgsgE5ScA9bp+Pf3mA+IW9QSy2G0GhY+TR
BAriiDNKDqgE5SHVv7o7.cyCIILvTzjOABOBmJcGcm886cVPEAe5GEYx9RbZ
1WpS+.vPC3iFd1WKjWOmoQIT7Ydp6Rid67gL9bmPjffydAKDSvpNiMmo15Lw
FAaB6IlDaH29EUngkYy.J3Sct7eZL3ZkO3Bt5PVQ95ZaTeBzdm4dajGTIoP0
ryeKTy2JKeiduUYPd6KTiMDHs.A7X.ApUPnBnSmOiawmIi.DHV4ykmzl6f.w
FHTCzIymIXGFpYIsG5vMbg1f.lCA.AYUz+bSAbGF5GXC.BGs.eq7WgKC6sZI
m3PFmYUJ2ZbNYtLiaIqWUsOd+9Wk4GplDi00RfdICFTvRy8Iol6ol6ykulTO
DiRD+3bs1GkV3SQtQNyQQkrL+cYZHjVjTiB.C5K+Ab2xokO
-----------end_max5_patcher-----------
</code></pre>
copy the text, open Live > drag in empty M4L device > open Max editor > paste > save M4L device
https://docs.cycling74.com/max8/vignett ... ng_patches

https://doubleUG.bandcamp.com/releases

IMage_Engine
Posts: 152
Joined: Sat Jun 07, 2008 10:38 pm
Location: Sydney, Australia

Re: COUNTER: Why does it not count first click?

Post by IMage_Engine » Sun Jan 28, 2018 8:34 pm

Ok..so the counter is not interpreting 0 = origin or null but rather as a number. If I am at origin and I click once, then in human terms that would represent 1. So what is the origin state of the counter? There is no null value that I can see to register a count from? I just would have thought the first click actually does represent 1 else where is it counting from? I am struggling dealing with deviations from 30 years experience of coding in other languages...argh.

chapelier fou
Posts: 6021
Joined: Mon May 15, 2006 12:15 pm

Re: COUNTER: Why does it not count first click?

Post by chapelier fou » Mon Jan 29, 2018 9:59 am

Sending the message "set $1" will set it's value without output.
So loadmess set 1 will force it to be at 1.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

IMage_Engine
Posts: 152
Joined: Sat Jun 07, 2008 10:38 pm
Location: Sydney, Australia

Re: COUNTER: Why does it not count first click?

Post by IMage_Engine » Mon Jan 29, 2018 10:50 am

chapelier fou wrote:Sending the message "set $1" will set it's value without output.
So loadmess set 1 will force it to be at 1.
Thanks for the workaround...I would still count it as a dysfunction?

chapelier fou
Posts: 6021
Joined: Mon May 15, 2006 12:15 pm

Re: COUNTER: Why does it not count first click?

Post by chapelier fou » Mon Jan 29, 2018 12:15 pm

It's just how it works and how it's been working for.... years.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

IMage_Engine
Posts: 152
Joined: Sat Jun 07, 2008 10:38 pm
Location: Sydney, Australia

Re: COUNTER: Why does it not count first click?

Post by IMage_Engine » Mon Jan 29, 2018 8:46 pm

chapelier fou wrote:It's just how it works and how it's been working for.... years.
I'm just amazed no one questioned the logic...I guess it would need a backwards compatibility flag...but if I'm the only one that's noticed...I guess it doesn't matter but it really is illogical...but 0 + 1 = 1 ;-)
Thanks chapelier

Post Reply