Custom CHOP Buffers

I’ve been doing some deep dive work with a crazy project lately that involves a lot of custom attributes for instances. How to handle these are an interesting question. It’s not uncommon to write these values to DATs or storage, but you sometimes want these vals in CHOPs to do some other op based operations.

I’ve also been thinking about @lucasm’s post here:

Specifically that we often end up wanting a CHOP buffer - or a better way to write changes to a sample in a CHOP channel.

I’ve been playing around with dependencies and have a fun technique to share here.

So big idea is that your base COMP holds a list of python objects - those objects can have any number of attributes you’d like, and what we’re after is a way to end up with dependable vals in those attributes so something like a script CHOP will auto update when that object changes.

In this little example our extension has two classes - one for the objects proper, and one to mange those objects:

There’s a script CHOP that loops through the list of objects, and writes their values into channels and samples:

If you run the text1 DAT you should see our batch of initial vals written into the CHOP:

write-to-buffer

The next bit of magic here is that running either text2 or text3 will update a dependency value that should in turn cause a cook in your script CHOP and update the values:

write-to-buffer-02

Anyhoo - that’s another interesting python approach that I thought otheres might find helpful. Attached is an example tox to see how this works.

base_script_chop_and_dependencies.tox (1.7 KB)

6 Likes