Holiday notice: Cycling '74 will be closed on Dec 25th, 26th, and Jan 1st. Manual authorization, support cases, and manual order processing will be delayed.
everything is in the title: I'd like to know how to create a buffer on the fly using the sdk, and how to change its size in a safe way. The two examples in the SDK related to buffers (index~ and simpwave~) teach how to read inside preexisting buffers, but not how to create buffers or change its size without requiring an extra buffer~ instance.
A nasty way would be to use patcher scripting, but I'd like to avoid that if possible.
Thanks for the tip: I indeed did not think about creating a embedded invisible patcher for this purpose. By "nasty" I was meaning creating a buffer in the parent patcher and dealing with it.
So I guess I have to get a closer look at the "scripto"' example to learn how to create a new jpatcher instance, something like this:
Thanks, that's quite helpful. Actually your last solution is the most straightforward equivalent in the new API of the old "newinstance" function. And then, no need for a patcher in my case since I have only one object (this buffer).