Retrieve Symbol Associated with Address in Coll
I cant seem to find a way to retrieve the symbol, which would be helpful if i wanted to use (next) or (goto) to scroll the coll. Have the symbol outputted so i can see where im at in the coll.
read the coll help file, tab symbols
However you access the coll, the data values are sent out of output 1 and the corresponding line number or symbol is sent out of output 2.
Hi Andy
corresponding line number is not really correct.
it is actually index which can also be a symbol
I think you'll find that I said number OR symbol. And yes, it's an index number OR symbol.
Now I know why I gave up helping people here!
Hey Andy, I'm with you, Im not sure what this dude is worked up about, but please know that i appreciate your help...
Anyway, the patch is a scale grimoire, i can input the scale along with its conventional name as a symbol associated or [nstore], but id like to be able to scroll thru with (next) or whatever and have it kick back the symbolic name. Ive worked around it by making element 1 of the index hold the symbolic name, which is fine, but it seems counterintuitive that i can't grab the symbolic name.
I did read the coll help prior to asking my question, and here is the result i got from trying to adopt that patch:
I think the associated symbol is a special feature just for calling an entry
and thus not sent to the 2nd outlet of coll.
But why don't you use the symbol alone without index number?
Right I think you’re right.
i wan to be able to scroll thru the coll numerically, and if I’m not mistaken, you can write the entry with a symbol directly, but I don’t think you can scroll through numerically when only a symbol is present. Let’s say I need to call an entry from another patch which references that coll, I will have to input the sumbol in order to call it. Thwill prove awkward - I really need to be able to call an entry numerically and have it show me the symbol associated with what I just called numerically.
it’s basically a slonimsky-style thesaurus in a coll that needs to operate aleatorically, so having the computer call names of scales randomly won’t work without an integer reference.
First of all, Andy, I am so sorry you gave up on all of us. I guess we’ll just have to muddle through.
I’m afraid you’re wrong on the “index OR symbol” output of “outlet 2” (which is in fact outlet 1, as it is to the right of outlet 0, the data outlet).
No matter how you query the coll, by index or by associated symbol (and it is ALWAYS a symbol, see patcher 1), the output is always the numerical index:
There is indeed no way to output the associated symbol except by duplicating it as a data element, as J Mangel does in his reply of 220824.
I ran into this building a shift puzzle. I stored the tile data in a coll where the tile number is the index and the associated symbol the tile coordinates, i.e. column and row in the matrix, so I could easily query a tile for its coordinates and vice versa.
When a tile is shifted, its coordinates and those of the empty place, the ‘shift spot’, have to be swapped. But if you do a swap operation, the associated symbol is swapped as well. It stays with its index.
So what one has to do in such a case, clunky though it may be, is 1) replicate the symbol, c.q. the coordinates, into the data and, at swapping time, use the replicas to deassociate both symbols and then re-associate them, as follows:
if all you need is to randomly pick coll entry
or numerically scroll, dump indexes into for example umenu.