Alternative way of querying coll
I was wondering if it is possible to query data from a coll using symbol other than the index.
For example, I have data stored in a coll :
1, alpha beta gamma
2, omega theta zeta
Anybody has a clue?
Thanks a lot for your help guys!
you can try something like this. but i think it needs to be adapted…
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 675.3oc6W1rbaBCDG+L9oPCmc8f9fu5s9bjIiGAn3nVPvfDo1ISd2KR.t3Lj FUWUpOzKRlUqk9u+1EMKurwyOq9HS5C9L3Nfm2Ka77LlzF7Fe1yuhdLujJMt 4WwjR5Al+1g03EFq0Ye8SvvIiOTKTBZEyrzWZ4zxoUDcUbQISY1KznwFpJ+Q t3v9VVtZPKHLZWvV.gXlBCzivjcAf6mcDR9yli.pc579W2olN.3n0ASpSMrg c22GbudkW2rQOr0xPWv9debNEJJ1QiX8etDHK44L.bInfcHTPPCTfCPIVOhB 9cgB5cgxVGCl75xRvo5tVyOVjNASFaZYRlPQU7Zw7PFFoiRbJVOELNbQ.aAS geHSwwg5oD70wTxujoaOy1Q2z7XeAUQGY5HT0KzITyRRd9Sdcmwuyd1ux2Xm lEaZKOQK6lNXp9DyzC4i4TuoL5haCZ4soPuCL8vCy2lwe1ueCAjj9DqXeeFs mq6oJUKOqSMbux7viUkwLIe33e2c0ZJP1B0Wo9NqPARLuugglhPD45JTd2aj xnhCN8kO9B3Hw42EgIIlIztPmhCt90.WRCEqcAfD6x5izgRBCPPwNt9vozn+ x1Fln.HYpEfRj6fBhXtVEhMEKwjaYnTok+B3Hz80HglZDB9VFGJPQWUCPt.Q HNmHvfgN7fgNtmFcLb8807ldcOyF5BPwg84MBknzed05sZuuVzhm6KVhP+uW s+o8pYfieIW71Oczjzz1urRRpKPlj4zWEAfmYbASp3BSu+ycJ7BmdjWTvLqO kWq3EM08cJLJh2ot1ZM0+sHffORS3Kb5uslRsPRIqphBsPQoqphRrIsErpRB ZQ0cx5VbaAjhWUFQrIsspJJ1BEEtpJJ5lSQDKpriVUEgsfQj+.E0+vqa9A.l bx6f -----------end_max5_patcher-----------
Yeah it works, the principle is there, but I feel that the dump operation would a bit costly on the CPU usage, since my coll is very very large…
Still thanks g!
And also, since there is many symbols in each index, I presume it would be problematic of getting any of them using iter and match.
yes, not very efficient, and you’ll have a problem too if the same symbol is present at different indexes…
Anybody can confirm this is the way to go?
Merci quand même Guillaume!
why don’t you just use the initial data element as an index, instead of ints?
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 682.3ocyV0zbaBCD8L9WgFtjKtdPBrA2a82QlNdDfbhRAIFPjZZl7euRq.Wh Clf+nN4fkvRqV8zSuU69xLG2X4NVkK56n6QNNuLywAFxLfS6+cbyo6RxnUfY tB1ukwO4N2NkhsSACWTxJXhTTUSdrLqaZQctrVkwTvZwsiVPUIOxEOrojknr 6MNjrvaNBuLxzsdkok3svC8y10vSgsQu0eacm2stV0TvrNw0cu4akBkflCS3 9iRNsOj3hCQjw7J9e.ywZjXF80YyLMymHujHyyYB06HF0iLAhljvppPw0a2x JQoTEEkxMm9rltEjwErDYs.VEYP9y637Gw2C3OhkFwPmevvDXj6GxR5qyJ8o gp3RQ+sAG.92Ca57Za1uG2ZtUCRUYchptjYI03FTZcdglaPbgRhnn6rb9cnD YV10gqwXefcCApHxaLpNz8SSPlqUbzGXmbn3ZH1i.gfgdKVZNiCe3VcQAhGQ hEXExgSPgQ9uQV6UXzy3kLPcf8gHEexXD3xq2KY2.tvDYcxzwJ3dL.DUAXaD yvjQvWRx3Ho6Lul.OmivCSIAeDkfWCcqHikpy+3bx7d+tVo8ZGth9LKcid+0 PdCUoJ4w0JaUBN6oIGWVdLCfJvqVh8JQu6qlPIKYmolC6AQfQKGifIeIqkXL QWirtD93bEdgPdqH+wnE7mhtybr1XxienR6vb0NtcVcOX2dK0y7KVSusxLxy zr5N3SM3N1zjnQeqI1KlAcCYX2jZ7.yzrsuaZ+T6uyKPB+9.IfhgBVNnJc39 0L9a0QUF4QGLaqVF8u63TcESbAjysmM9uwlG4ooLQ+hfx4oERcAUsP.GgsY0 B5Wi.TAzfh8oB0kS.pqOMndgHxeBHRWEDBeyPTvDPD9lxQjqu.6BQDdBHhbA HR+mWm8Wb6zd4C -----------end_max5_patcher-----------
Because I using the coll content with a jit.cellblock and I need the sorting to be steady and logic. That is why is use a Int as an index. I also use "insert" and renumbering to be sure everything is in the same order, which makes it difficult to change it to symbol indexed coll.
Each line of data is like a cue, containing lines of actions that are parsed when I trigger it. Actually, I’m triggering them sequentially, one at a time, but I really need to be able to trigger them with a symbol.
Forums > MaxMSP