CV gate to bang

lesespejo's icon

Ok. i made a search with no results, so i'm sorry if this has been already covered. I think this should be a very straight forward patch but i'd like to know if i'm going the right way.

I'm trying to convert control voltage (gate or trigger) from an analog synth (CV) to a bang in Max (i'm using an Expert Sleepers module to send CV to my Mac, so that part is solved). My question is which should be the best way to go, now i'm using the if~ object connected to number~ at the moment it works, but not as accurate as i would like.

This is the patch, do you guys think this is the way to go? any suggestion?

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

Thank you in advance.

Peter McCulloch's icon

The long-short is that you're downsampling to control-rate via number~ so you're missing a lot of data. Do the comparison at signal-rate via thresh~ (two-stage threshold which will debounce) and detect the transition via edge~.

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

Also, if you're working with a modular and Max, you might check out Stretta's BEAP Modular project. It has some builtin tools for working with CV.