stops
This commit is contained in:
parent
5cda4f0132
commit
e1be8eb404
|
@ -70,8 +70,10 @@ void Generator::run(float *output, uint32_t frames) {
|
||||||
for (k = 0; k < NUM_VOICES; k++) {
|
for (k = 0; k < NUM_VOICES; k++) {
|
||||||
v = &voices[k];
|
v = &voices[k];
|
||||||
|
|
||||||
|
// you'd loop over all the stops in the register here
|
||||||
// 8' stop
|
// 8' stop
|
||||||
d = (phase[v->semi] >> (24 - v->oct)) & 0xff;
|
d = (phase[v->semi] >> (24 - v->oct)) & 0xff;
|
||||||
|
// convert to a sine and scale it by 0.25, which would want to be your drawbar amount
|
||||||
output[i] += .25 * (sine[d] * v->gate);
|
output[i] += .25 * (sine[d] * v->gate);
|
||||||
|
|
||||||
// mutation stops are a fifth up
|
// mutation stops are a fifth up
|
||||||
|
|
Loading…
Reference in New Issue