jamoma / JamomaMax

Implementation of Jamoma for Cycling'74 Max:
http://www.jamoma.org
41 stars 9 forks source link

j.remote doesn't constraint the value anymore when @repetitions/filter 1 #934

Closed theod closed 9 years ago

theod commented 9 years ago

----------begin_max5_patcher----------
440.3oc0TssaiBCD8Y3qvZdlMEmxkz9T9OpVUYfoINBrQFS2DE0+80dLIsc0
pTTaT0tO.VywiGelCmgiwQPkdON.r6YOvhhNFGEQPdfno3HnSrutULPoApwt
Jz.Igszi1VzZOzigZ.PBCpDpM.6mSozKr0akpMOZvZaHKNe0hzD1xauyujmR
AKWjd9LxF5tzU69QIbtNFQGZQyinRT0RWX5zdC1CA.3T1NZJUNpQjl+JXfvD
5RO3Kww9WIys6we4H0oKwh6oNB1svfcZKxdRqunzb9YNxSAsTlcI4IG9JRP1
mQBtdF.9J9Ga.x92x.bE6ddwG2829+g8+L67S.r0dEgIUVbiCYswIHHKksLu
fsttU12oaPVk1t0sG1iVoUpUC27jr0WA9kmflixlQKYYEWRZ4v0R9npCsR0e
9qThhd72qoC5QS8olZ5qL6UN1fCVoR3Ek2jC+c4rU1zfp2ZBZjCdeA0eo+0u
sykM7YvlruM1jOC1T9swlxYvl7OIaB1HQe+ynYXpjDQbCg6zFeXYBEJUgPph
fAeVdJ+bBQXbSFV2XwnIXr2up.BG0M5YTiRxXG6u4Wh+MT0+c+K
-----------end_max5_patcher-----------
theod commented 9 years ago

@lossius finally I assign to you as it is maybe related to the code you rewrite into TTData

lossius commented 9 years ago

Hmm, this works as expected here...

Dragging the uppermost object box upwards beyond 256, the parameter is clamped to 256. Dragging it below 0 it is clamped to 0.

I do however see a problem with j.return in the patch: If you drag it up above 256 the displayed value is permitted to go beyond 256. The reason is that j.remote does not output any set messages in response to incoming values. Ditto for when you move below 0. However, if you look at what is output from j.parameter, it is clear that that value is clamped.

I believe that the two possible solutions to this are either:

  1. The developer has to set min and max values for GUI widgets in the views
  2. We could automatically forward the range attribute values of j.parameter to the widget to set min and/or max value. I'm not wild about this though, as only some widgets (like the number box) will be able to make sense of this message, and live.widgets can't have their min and max attributes changed dynamically.

I wouldn't really consider this a bug at all, but rather a slight inconvenience that the developer of views have to take into consideration.

Reassigning to @theod for feedback

lossius commented 9 years ago

A last, and possible better solution would be that if you attempt to set a j.remote to a value that is out of range, it outputs a set value in respons to get it right again.

lossius commented 9 years ago

OK, and on further examination I start to see what the real problem is with j.remote here. It actually does send set messages all the time, but only as long as the input message is within the range.


----------begin_max5_patcher----------
573.3ocyVtsahCCDF95vSgUtlkMNjCvdEuGUqpxgofQI1Q1Ncoppu6q83jz8
.Ps.1sbAAMiO8+MdlI40YAgkhCfJj7MxCjffWmEDftrNBFrCBaKNT0TnvoE1
BJUwVHbtaLMbPi9UflDM5k22J50MfFWCcvqR+RCfSdbdrZzTTt+KT5nS2J0u
zANcEFR99vPcE5pcL91GkPk1MZbT7hn4jjnL6eoQ1mwFWSqwnEFeTJwVeuMa
l8wbOItrWqE7q.s0mjrxB91yRGcYpEnkqyQtRFedb5neFzkcEzsZMBT5+L5L
aPIHGUXAmKzEZlgWbPAGNN3w9.d9oSXm6C7zU3UK0qDW5zFIKZAMHeD3EkNw
EcIAF3GFF9qp38KjPqPCjmDhiGZR7Izjd1PyzOeBOIXAPdxGDdt5biKHAH4l
j.Dmt5SIA3Zoe4Mgd5cV5+zAXq.HarTQXbMr03Yiz.EPhLWYYjMUMrtVQMPJ
E5clwfNPyr8VTe8IVicGldiVCiCUhdNdHoWdHmd9xJeB2It+hoXUUlO0S3LP
F9iOT.OFq+eOPqD8xpQgMjoPd+bpAklwm5B+vDZ+xb1wpqAb3nwUwT1665Se
g6qZndnlj+apI0C0j+ApokU2ILIoCWOz37EolNm43aUoQqNhUTpKMHex5cMb
yXK2C1RuqhzquqTi8ShIzKPNtJ1httmAoZXOQkXZBtWHsl4yQSF2Yh6XnDdl
MN+LzSgzzHQa5hzKcckNj4dqWns0mj2yF5VXN42l8Sv9yMck
-----------end_max5_patcher-----------

Reassigning to myself.