Getting a symbol index out of the 2nd outlet of coll.
I have question about coll that has been bugging me for a while and can find no other reference to it in existing posts. In my patch I am using a coll which can be indexed by either an integer or symbol, as follows:
1 mdto, 18.104.22.168;
2 iogk, 22.214.171.124;
3 sctq, 126.96.36.199;
4 nkgk, 0.4.0.2;
The issue is that I want to be able to index the coll using an integer and get the associated symbol index out of the second outlet. The description of the outlet says that it can output the "Number or symbol associated with data", but I can only seem to get it to do the former. Even when indexing with the symbol itself, only the integer comes out. Perhaps there is some function I am missing?
Of course, I could additionally include the symbol as data in the coll, or some other type of workaround, but it seems a bit unwieldy.
Cheers for any insights…
think u will have to work around
AFAIK when using int + symbol as index, the int supersedes symbol on output.
or u could have 2 colls… one with int, data; — the other with int, symbol;
Why not just modify the way you’re formatting the data for coll so it’s like this:
1, mdto 188.8.131.52;
Then just [zl slice 1 ] the output of the first coll outlet. Zl rather than unpack because then you can still have an arbitrarily long list of data, and the first item is always the "symbol index".
----------begin_max5_patcher---------- 577.3ocwV1sbiBBEG+Z8ovgqy5HflV6CxdSmcxPT1TZTHUvtosSe2W9xF6tz sNMQ2a7iyA9ygeb3.uDGA1JNRkfjaRtMIJ5k3nHqIigH++QfVxwpFhz1LPKU JI6nfUNeJ5Qk0trR8vfQVs0jX68eCiFL9SAWwIsTqquS6pIbxfOQupgpTOcf 5BE.H4Gi5lj8r0ADkl4MeniJobEQwD7MczJkqiXzZcSRxQPyqL+i2Di22x35 QxNUPmL5FeqU3v.PTU2w36FKdQgQPj6UQt4IrzHuoKuFGadr5L4XdZY5UoYg PIdYQ40v4CknxKHJ4zeo4yeQxmaRjMrJZBLDLgeMXtZB.cBnA8uPik0HnEMq QtetvYY3PHIaQyuxyrySLpbFxuxgYixuvnzhYXqZHHt9+wdTHBOGk6txJHLe NYXv8lyCCOSZfcznH6BPiOnhUknoI.ONiRUq9JkrfAYS9mdvH7ZW07RCabkr 78wLw1TSTDOS7Pw3nmqFodDXnU2Za2asT6YO8oQQmwxijl9goaasRXlp5gUe 9IF3VWhFVUBJEJrTLwt8FovZgzynIIENrTtaEc5T8oHUdXo36cQUVp9zxTzX o7ep0zgaI4QZ8FcpidEZCQo5Xa6Utq4MF9z1sTaVFz28QYx1kNPCi+m2Nzt7 ar+9zaonuqZHT8IsImR.poREiaKeMpM322n6X00Tq+gzxVV8AAiq7wvGrWap gDdRwj9BqIvkMlfeVLgWzXZRgT1hFRqmvJ2BmLMyQj9mWi+MR1SBs. -----------end_max5_patcher-----------
Forums > MaxMSP