问题
I am new to Audiokit and I try to build a synth where I can route an AD-Envelope to different parameters, like frequency of an oscillator etc. To me it seems that it only is possible to solve this on a DSP level. I found out that the AKxxxOscillatorBanks are ADSR'ing the volume and I might have to use this part of code to "apply this only to the pitch".
So it seems that I just have to script a "new bank type that does the ADSR over other kinds of parameters". As I want to have full controll over the frequency and only need a monophonic oscillator I would onyl need to implement the ADSR envelope into a new version of AKMorphingOscillator, but I don't know where to start.
I think I would have to edit the
void run(int frameCount, float* outL, float* outR)
from AKMorphingOscillatorBankDSPKernel.hpp and there it looks like the ADSR works in the for-loop like
sp_adsr_compute(kernel->sp, adsr, &internalGate, &);
sp_oscmorph_compute(kernel->sp, osc, nil, &x);
But thats where my knowledge stops. Any help would be appreciated. thnx!
edit: still on it. maybe the AKOperationGenerator could also be the right direction, like in this example.
回答1:
Seems that this would be too complicated or the complete wrong direction. I stopped this approch and went on with this one.
来源:https://stackoverflow.com/questions/49094157/how-to-build-an-oscillator-with-an-envelope-on-its-frequency-pitch-in-audiokit