saving data as .text

    Aug 07 2013 | 6:11 pm
    Hey guys
    Just wondering if someone could assist me with an issue I am having with saving data to a text file on closing the max patch.
    I am trying to compile a list of data (numbers which will be gathered over a period of say 10 minutes), so the data needs to be compiled in a system of pairs. So when opened on the text file it might look something like this:
    4 1 4 1 4 1
    I thought I managed to sort this by using pack 0 0 (not sure if that works)
    I have tested the patch, and save it as a .text file but when I open it, it is blank. So I am unsure if the problem is with the method of packing the data into pairs or with saving/opening the .text file.

    • Aug 08 2013 | 11:51 am
      Okay, I have a slightly updated version which is now saving data correctly. The only problem now is it is not saving ALL the data. It only saves the first two numbers of the list. How can I make it to make a list in the same 4, 1 format? So in theory it could look like this;
      4, 1. 4, 1. 4, 1. 4, 1.
    • Aug 08 2013 | 10:15 pm
      The [coll] object needs a unique index number so if you send it a list beginning with 4 each time it will overwrite the previous data stored at index 4. You can either set a unique index using something like [counter] to increment the index with each new piece of data you send or switch to using [text] as shown in this example:
      The "cr" stands for carriage return and tells the [text] object to start the next input on a new line.
    • Aug 10 2013 | 2:30 pm
      thanks mate, that system works fine. I have now adopted it to save a number to a time
      see what you think
    • Aug 26 2013 | 5:13 pm
      Is it possible to pre-determine the name of the file that is being saved?
      so all the user has to do is press save and choose a location