Dynamic lists


    Nov 14 2014 | 11:20 pm
    I am trying to find a way to create a list that can grow dynamically. By that I mean that I don't know how long the list will end up being, but I need to feed a stream of integers in one end and have a list that grows each time a new integer is fed in being output the other end. Any ideas?

    • Nov 15 2014 | 5:32 am
      This can grow fairly far, though it all depends on what you're recording. If you need something bigger than this, you might look into storing data in coll/buffer~, but this will likely handle what you need.
    • Nov 15 2014 | 7:25 am
      Alternatively you could use js for that:
      var myList = [];
      var intIn = function(x) { var temp = myList.length; myList[temp] = x; outlet(0, myList); };
      var clearList = function() { myList = []; };
    • Nov 15 2014 | 8:44 am
      Perfect, many thanks guys!
    • Nov 20 2017 | 11:08 pm