So my patching has grown by leaps and bounds in the last few months and I've gotten some amazing stuff working. Where I often fall short on things is with audio rate stuff. Specifically audiorate triggering/enveloping/etc... Things that I'm used to doing with control objects, but haven't quite wrapped my head around how to do the equivalent in MSP objects.
Here are three problems I've run into (several times, but specifically with the patch I'm currently working on (a virtual CD skipping machine)).
1. I've defined a small loop within a buffer using position([+~]) and window([%~]) controls (rather than min/max in groove~) so it can wrap around 'zero'. That's fine and dandy, but I get clicks when it repeats. I've cobbled together an envelope but it's half max objects and half msp objects. I'm using msp objects to figure out where to do it, but then I'm using edge~, a message box, and line~ at the end. I can kind of 'tune' it so it's declicking, but it's sloppy. So trying to figure out how to declick a loop in the middle of a phasor~ (from 0.15 to 0.3 for example).
2. When moving the position/window I'm crossfading to a granular synth so I don't get that gritty/zippery stuff that comes with moving a live play~ head. I'm using line~ and slide~ being triggered by a message box. It works but it still lets through little clicks sometimes. It could be because my tuning numbers are off, but again, I suspect it's because I'm trying to do MSP things with Max objects.
3. So I'm using a master phasor~ that represents the whole buffer, which is followed by [%~] & [+~] to define a window, and playback position. This is pretty easy and works perfectly, EXCEPT every time the master phasor resets to 0, it breaks the wrapping of [%~] and jumps it back to 0., and I get an hiccup in the audio (as well as a click).
Here is these three bits isolated and annotated.
Can someone have mercy on my audiorate fuckery?