Add FM synthesis
This commit is contained in:
parent
e19c20e90e
commit
2b2a373b13
1 changed files with 6 additions and 2 deletions
|
|
@ -757,11 +757,15 @@ void sfz::Voice::fillWithGenerator(AudioSpan<float> buffer) noexcept
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // PM synthesis
|
case 1: // PM synthesis
|
||||||
return; // Note(jpc): not yet implemented
|
// Note(jpc): not implemented, just do FM instead
|
||||||
|
goto fm_synthesis;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // FM synthesis
|
case 2: // FM synthesis
|
||||||
return; // Note(jpc): not yet implemented
|
fm_synthesis:
|
||||||
|
fill(*detuneSpan, 1.0f);
|
||||||
|
multiplyAdd<float>(*modulatorSpan, *frequencies, *frequencies);
|
||||||
|
oscCar.processModulated(frequencies->data(), detuneSpan->data(), tempSpan->data(), buffer.getNumFrames());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue