Expression tweaks?

Any ideas for how a complete coding noob might go about making some tweaks to the expression patches currently stored - specifically I’d like to try aftertouch to volume and/or drive, so I can vary volume on touch.

No idea where to begin on this - any ideas gratefully received!

Hi,

You’ll have to start with getting some understanding of C++ to tweak current patches. Other than that, they’re in Martin’s repo here: https://github.com/marsus/MyPatches/tree/master/WitchPatches .

Thanks - I’m hoping I can piece some kind of understanding together in the coming weeks… I do have a friend who knows his way around c++ so if all else fails I can ask him to take a look!

Specifically, the abstract method AbstractSynth::setPressure() is called to handle aftertouch changes.
In e.g. the PolySub synth engine this simply sets a member variable called mod2:

mod2 is later used in the process() method to set the oscillator waveshape.

By changing that line you can use mod2 for something else, e.g. on line 128 add it to the gain calculation to control volume. mod2 will have a value between 0 and 1.0, and to prevent clipping the output you should make sure that your final gain is <= 1 also.

Oh that’s brilliant - you sir are a gent, thank you!