RNBO: how to process relative MIDI CC messages

Steven Kruyswijk's icon

in Max for this I first did [sel 127 1], so I get bangs for decrement 1 and increment 1
then after those 'dec' and 'inc' messages into an [incdec] object cross-connected to a dial

there's no [incdec] in RNBO though, so perhaps feed an [accum] with '-1' and '1' messages would be cleanest
but how can I reset this [accum] to a specific value other than 0 though? I can't seem to get it to work even after playing with (and being kinda confused by) the @hot and @resetmode attributes

maybe I need to resort to doing this in a codebox? seems like there should be a simpler and cleaner method...

Alex Norman's icon

it looks like we have a bug in accum, I've created a ticket around that.

Here is a simple accumulator that should work in its place though:

Max Patch
Copy patch and select New From Clipboard in Max.

Steven Kruyswijk's icon

...is that example supposed to work out of the box? clicking those messages does nothing here, perhaps the [rnbo~] needs some more config?

I was wondering about a bug in [accum] myself, but it seems that it wasn't designed in the first place to be able to be (re)set to a particular value; only simply: nonzero value resets to zero. the former might be nice though

Steven Kruyswijk's icon

hmm seems my Max instance was running rough, after quitting and reopening the example does work. thanks!

Alex Norman's icon

There is a bug in accum in that setting a non zero argument "accum 2" just disables its operation.. or at least i'm seeing that on my end. either way, a simple adder like i've provided should do the trick.

Steven Kruyswijk's icon

it does yes, thanks again.