data into Coll - display and edit via textedit

    Sep 18 2022 | 1:54 pm
    Hi, I have the following start of a patch:
    when press "1" on the keyboard a two number list with a index start at 0 is generated and saved into coll.(blue part of screenshot) I would like that the values saved in Coll object will be presentable at the textedit object marked purple and will be able to be edited by that object.
    so if I press 1 3 time and generate that list into Coll:
    0, 0.5 1.5 1, 1.2 1.3 2, 2.0 1.8
    when moving the integer number box at the purple area I will be able to see those numbers in the textedit object and if I stay on lets say index 2
    Max Patcher
    In Max, select New From Clipboard.
    and change 2.0 to 5.5 and 1.8 to 4.3 it will be change that index in the Coll object. Does it make sense? How can I do so?

    • Sep 19 2022 | 7:05 am
      This was in the coll : Rather, use the _ref.xml files found in the 'edits' folder.--> <c74object name=textedit module=max category=U/I> <digest> Enter text within a patcher </digest> <description> Provides a user interface within a patcher which can collect typed-in text from the computer-keyboard. </description> <!--METADATA--> <metadatalist> <metadata name=author> Cycling '74 </metadata> <metadata name=tag> Max </metadata> <metadata name=tag> U/I </metadata> </metadatalist> <!--INLETS--> <inletlist> <inlet id=0 type=INLET_TYPE> <digest> bang Reports Text </digest> <description> TEXT_HERE </description> </inlet> </inletlist> <!--OUTLETS--> <outletlist> <outlet id=0 type=OUTLET_TYPE> <digest> Text Output </digest> <description> TEXT_HERE </description> </outlet> <outlet id=1 type=OUTLET_TYPE> <digest> ASCII Value of Character Typed </digest> <description> TEXT_HERE </description> </outlet> <outlet id=2 type=OUTLET_TYPE> <digest> Item or Character Clicked On </digest> <description> TEXT_HERE </description> </outlet> <outlet id=3 type=OUTLET_TYPE> <digest> Sends &amp;
      You asked about int based index and float data ? So what is that text in the coll about ? -------------------------------------- here is patch doing what you asked for.
      Max Patcher
      In Max, select New From Clipboard.
      I would add a button to allow editing or to confirm rewriting of the values.
    • Sep 19 2022 | 1:59 pm
      Thanks for your patch. I did not understand your question regarding the text in the coll, which text? What do you mean a button to allow editing? something that will open a gate to pass the data from the textedit to coll? So it won't pass automatically ?
      What is the delete $1 and remove $1 at the bottom left of your patch?
    • Sep 19 2022 | 2:58 pm
      patch you posted has coll named textedit, without added "1" which would prevent it from searching for the file named "textedit" and so it read somewhere in max 6 search path something named textedit and filled the coll. I thought it was embedded in the coll. remove and delete are options to remove index if it is empty - no data. Coll help file will tell you the difference.
      With button I mean to fire replacing of data with entered values by clicking on the button, instead of it getting replaced as soon as one types something. Would avoid mistakes. It is no big deal with 2 floats, but with longer strings ....
    • Sep 22 2022 | 11:43 am
      I would like to have the option to make a summing of the value from the coll object with another integer from outside and that summing to send back to coll to the specify index
      something like this:
      Max Patcher
      In Max, select New From Clipboard.
      so if my coll looks like: 1, 10 10;
      2, 20 20;
      and I'm at index 1 and I'm adding first number that is 20 and then press bang , the coll at index 1 will be 1, 15 10; ((20 + 10) /2 = 15)
      If I stay at index 1 and I'm adding second number that is 30 and then press bang, the coll at index 1 will be: 1, 15 20;
      Does it make sense?
    • Sep 22 2022 | 3:00 pm
      You have 2 options. 1- unpack the list and apply math to wished list members, pack into list again and replace the index. 2- use nsub message to coll example : 1, 10 20 30 40; message nsub 1 1 33 will substitute item 1 in index 1 with 33 result: 1, 33 20 30 40;
      how you extract list members and multiply them is your thing.