Starting to really get into Lich programming now.
but have a question
if i put:
adsr.SetAttackTime(getParameterValue(PARAMETER_A));
in processAudio it updates my parameter correctly.
(I implemented a class for adsr, this all works right, and I can change attack time on my envelope which is on CV out2)
so that’s basically “Lich can do it”, but I looked into the API and thought I could take this out of the audio thread, where it doesn’t want to be.
the following is from Martin’s Midi Modular patch, I didn’t test but presume it works.
void buttonChanged(PatchButtonId bid, uint16_t value, uint16_t samples){
switch(bid){
case BUTTON_A:
out.velocity = value ? 80 : 0;
sendMidi(MidiMessage::note(out.channel, out.note, out.velocity));
break;
case BUTTON_B:
break;
}
}
however I expected the following to do similar for the knobs, and it doesn’t.
void encoderChanged (PatchParameterId pid, int16_t delta, uint16_t samples){
switch(pid){
case PARAMETER_A:
adsr.SetAttackTime(getParameterValue(PARAMETER_A));
break;
case PARAMETER_B:
adsr.SetDecayTime(getParameterValue(PARAMETER_B));
break;
case PARAMETER_C:
adsr.SetSustainLevel(getParameterValue(PARAMETER_C));
break;
case PARAMETER_D:
adsr.SetReleaseTime(getParameterValue(PARAMETER_D));
break;
}
}
So what did I miss? (it’s bound to be valuable info ).