jsbuffer methods


    Jan 09 2015 | 6:56 am
    What methods are currently exposed to the Javascript Buffer object? I'm specifically looking for the sizeinsamps attribute or something similar. I've seen Tim Place's example file but I'm wondering what else, if anything, is available. Thanks!

    • Jan 09 2015 | 6:38 pm
      Hi Sadguitarius,
      buf.framecount() should do what you want. Check out the buffer~ help patcher tab 'JS' for more info and examples.
      -Ben
    • Jan 10 2015 | 6:00 pm
      Thanks Ben. I'm looking for a way to set the size of the buffer in samples from Javascript. Is it possible? buf.framecount() doesn't do this for me.
    • Jan 10 2015 | 6:30 pm
      Ah, sorry, I read your post wrong. You can send a message to the object itself, if you give it a varname. Something like:
      function setsize(x)
      {
      	this.patcher.getnamed("jsbufhelp").message("sizeinsamps", x);
      }
      
    • Jan 11 2015 | 2:07 am
      I see... I need to get over my ignorance/fear of the object scripting syntax. Thanks!