Closed matcham closed 8 years ago
the trouble is certainly into the JamomaModularForMax.cpp file inside the jamoma_callback_return_value_typed function and jamoma_ttvalue_to_typed_Atom. I'm not able to look into it precisely for now but maybe those information can help someone else to dig into it ?
here s a simpler example showing the problem :
looks like arrays are prepended by some kind of hidden word "list" , and and some Max object do not like it...
----------begin_max5_patcher----------
712.3oc0W00TiBCE8Y5uhL4EevtNjTn.9z9CX+GrtiS.tSMZIvjDbqii+2WH
ApUseDqE15KvvkPtm64dRNgmm3gSKWAJL5ZzuQddOOwyyDpMfW2yd3B1prkL
kYX3BPoXK.7T66zvJsINghHzn9vURPABMSyKE2JgLsMEAAIW4OEQm62dq+B5
OcekntnrVuDzlTQ5hZCoepBrSBFu9CpX5r63hE6LEglqT5FIgmavaY58+fD2
iWk9okloGieEKbQOTnswdYxj1KScjnZlfTPd.BIzetAfIybfPn6jPlhvoLwh
8RLuMUGfXRVialjU.ZPdKHXoVNx2MRibLjF72l7+Aw0kNRieMcEWnchAsYIf
rOFj5OjRqsyRUrrGPbDGeJWNEaEJ1Rm3ueYSz.VzYkEEMs9OT0563JTo.PMC
nZIiKT2Ht3xqQ4kfRbgFUKxAoRyD4navK4J8MqwzRt.xJqE5MWc8VVye2TCc
tYkDII9pvlaQFpYVzFTSZcZ2RFxVHq.7vsN5KsKMIH11ymMX6RS51k1JqNvl
QzATU4FQcRJ4OQES9e6KQrtDT6lbCpuTGiPmkbXhI96ksTOK5GOj1R8Dn819
skRFMg0oThDk3rBI5LUgbh50QIN2pC+V1psG2Hjb3Ncv4Umth8.x+T6YXa2I
DGN6Ec7Ou48Wsl5QEO8qliVg9YakgV.BPxyNB8gKazQB6VDP2qG5Qb5Jy7XN
U369kXCXZi+VRRUVKy5ge+AfQuBmbPo4BiqvFCp8WC1XP2wyyAwlh1btpUGa
pE+s1tNo3o8ufQjQAOuqz2AdRFO9wE3DcdAG530sbANjQCNtvNimzIwAzDOZ
nIzAzLd5XWDNgiFZBbYO4yJtgbjnw5ewppdDjptoz.jF676KksOFM07HWXez
LiXI7Hue7yMQXxFyWciyasz5ctJdN19ok4fTTy67Nax7KS9GTE5CqB
-----------end_max5_patcher-----------
sounds like pd… ;-)
Le 8 oct. 2015 à 17:15, Mathieu CHamagne notifications@github.com a écrit :
here s a simpler example showing the problem :
looks like arrays are prepended by some kind of hidden word "list" , and and some Max object do not like it...
----------begin_max5_patcher---------- 712.3oc0W00TiBCE8Y5uhL4EevtNjTn.9z9CX+GrtiS.tSMZIvjDbqii+2WH ApUseDqE15KvvkPtm64dRNgmm3gSKWAJL5ZzuQddOOwyyDpMfW2yd3B1prkL kYX3BPoXK.7T66zvJsINghHzn9vURPABMSyKE2JgLsMEAAIW4OEQm62dq+B5 OcekntnrVuDzlTQ5hZCoepBrSBFu9CpX5r63hE6LEglqT5FIgmavaY58+fD2 iWk9okloGieEKbQOTnswdYxj1KScjnZlfTPd.BIzetAfIybfPn6jPlhvoLwh 8RLuMUGfXRVialjU.ZPdKHXoVNx2MRibLjF72l7+Aw0kNRieMcEWnchAsYIf rOFj5OjRqsyRUrrGPbDGeJWNEaEJ1Rm3ueYSz.VzYkEEMs9OT0563JTo.PMC nZIiKT2Ht3xqQ4kfRbgFUKxAoRyD4navK4J8MqwzRt.xJqE5MWc8VVye2TCc tYkDII9pvlaQFpYVzFTSZcZ2RFxVHq.7vsN5KsKMIH11ymMX6RS51k1JqNvl QzATU4FQcRJ4OQES9e6KQrtDT6lbCpuTGiPmkbXhI96ksTOK5GOj1R8Dn819 skRFMg0oThDk3rBI5LUgbh50QIN2pC+V1psG2Hjb3Ncv4Umth8.x+T6YXa2I DGN6Ec7Ou48Wsl5QEO8qliVg9YakgV.BPxyNB8gKazQB6VDP2qG5Qb5Jy7XN U369kXCXZi+VRRUVKy5ge+AfQuBmbPo4BiqvFCp8WC1XP2wyyAwlh1btpUGa pE+s1tNo3o8ufQjQAOuqz2AdRFO9wE3DcdAG530sbANjQCNtvNimzIwAzDOZ nIzAzLd5XWDNgiFZBbYO4yJtgbjnw5ewppdDjptoz.jF676KksOFM07HWXez LiXI7Hue7yMQXxFyWciyasz5ctJdN19ok4fTTy67Nax7KS9GTE5CqB -----------end_max5_patcher----------- — Reply to this email directly or view it on GitHub https://github.com/jamoma/JamomaMax/issues/937#issuecomment-146575864.
yes there is a "list" word added before the array. but as it is the Max SDK who provided such feature I'm wondering if the bug is on Jamoma side or on Max side ?
I mean if the "list" word is recognized by most of the basic objects (like message object) I would expect other more advance objects follow the same policy isn't it ?
in Jamoma all externals have a list method to handle quickly arrays which avoid to test the first element in case there is a symbol (which could be the name of a method). so if I remove the "list" word we loose this shortcut and will consume more cpu.
I add @tap and @lossius to this thread to get there point of view.
In Max there has always been a distinction between list
messages and other types of messages. A legal list
in Max always begins with an int or float -- other kinds of "lists" are in fact not lists but just messages with additional arguments.
This distinction was confusing to me initially back in circa 1998/1999. You can see that there is a distinction between handling "list" and handling "anything" here:
so the discussion above tends to conclude that is not a jamoma trouble so I would close it. what is your opinion @matcham ?
...no, I don't think we should close it ! I've never seen this trouble anywhere else, so I really think there is something wrong in the way lists are passing thru j.parameter maybe it just doesn't need to prepend 'list' at all ? ...
anyway, the way it works actually is really confusing ...
----------begin_max5_patcher----------
544.3oc2VsraaCCD7r7WAAujCw0PjV1xJm5GP+CpKBnjVXSCIRCRpTaDj+8x
GVNNM1ArJIFs8BA3nUqlc1QK4iiRvkxcfFitC8cTRxiiRR7PNfjC6SvsrcUM
LsOLbKn0rU.db3YFXmwiSPzdLYmoALl8agPhwXzON7nsLS0ZtX08JnxDdJYd
9jzwnYotUZwjY1U5jziuh1ruwmHbe9409sxxMegj1CJ5Z4B6m0yR5yfAx3QI
NvmFMxsLNxxsR11BByqJWyZtFIE.xFv1FFWnWJt416P0RPKtwf5D0fRaXhZz
RbCWaVdj9MbATI6DlSY5YDFJMyIIjoScZBI2KPSyiVZx5AK6JKCwQNmXQNqX
kN.w5i2aP7EMIibhEIdyA8S1bXyPIntboMFgKYhUwX+I4YCoDWfOlYEqELf5
dPvNzsSiuaSGR0C+zRgW0ru8h5A2Y4iPJBc6vZ7RQw+.M6rz2QuN++odcV56
nUO6ytUe9pcyjiJOpc+2rC0Qe0UxnUf.T7p2zaDiyuv6Knoz+v4b3g078Y2e
bzucC.OCc3uTizxNUUeM0e5K5YRVCZCWvLbo3jfl8hXVyqqAwoN1Zt1Yhqu7
gNenzgb0nyrHXS9UiMEQvlEWuVUDro3uJ13tLAhL.5D9Kisc6C1KDdHmdlXm
4rQpbayG62xEgs9LhUvC793m6QXJ6bCicnQmJLKX2h43vqJs21TzwOLvy9ke
Zzu.cGEsuC
-----------end_max5_patcher-----------
ok so if the returned values start by a numeric value don't add 'list'
Are you using outlet_list() or outlet_anything() ? Maybe if you point me to the spot in the code I can offer a suggestion?
best, Tim
On Fri, Nov 20, 2015 at 11:24 AM, theod notifications@github.com wrote:
ok so if the returned values start by a numeric value don't add 'list'
— Reply to this email directly or view it on GitHub https://github.com/jamoma/JamomaMax/issues/937#issuecomment-158465796.
as you can see here (https://github.com/jamoma/JamomaMax/blob/master/source/j.parameter/j.parameter.cpp), in data_return_value I use outlet_anything or outlet_atom.
actually the 'list' word is added before (https://github.com/jamoma/JamomaMax/blob/master/library/source/JamomaModularForMax.cpp) during the conversion of TTValue to atom made into jamoma_ttvalue_to_typed_Atom called from jamoma_callback_return_value_typed.
and precisely I think I should add a case when the size is more than one and the first atom is a numerical value where I don't add 'list' before.
I would like to take care of this a bit latter as this have to be done carefully by launching integration tests.
sorry I've forgot to run the integration test so I have to revert the change as it was on master branch.
Thanks to the integration tests I've made a fix that's not breaking anything !
when I send an array of int thru j.return (to j.send) , the array seems ok, ... but is not ! (standard Max objects that are supposed to receive this array do not like it ...)
in this example, I try to send midi notes (simple array of 2 ints). the message arrives, looks correct (I can print it or display it with a message box) , but noteout or kslider are not able to use it.
note : nslider DO accepts these messages !
so looks like some max objects might be more picky about it than others.
same problem with j.parameter / j.message