Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FM synthesis with 2 operators #436

Merged
merged 6 commits into from
Sep 23, 2020
Merged

Conversation

jpcima
Copy link
Collaborator

@jpcima jpcima commented Sep 22, 2020

FM example

<control>
set_cc21=100

<global>
volume=-3.0

<region>
sample=*sine
oscillator=on
oscillator_mode=2
oscillator_multi=2
oscillator_detune=5
oscillator_mod_depth=100
oscillator_mod_depth_oncc21=1000

@jpcima jpcima mentioned this pull request Sep 23, 2020
@@ -661,6 +661,8 @@ void sfz::Voice::fillWithGenerator(AudioSpan<float> buffer) noexcept
} else {
const auto numFrames = buffer.getNumFrames();

buffer.fill(0.0f);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's filled at the beginning of renderBlock?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voices are rendered into a temporary buffer. This could go, however this leads to another problem:
Synth.cpp tempSpan->fill(0.0f); -> called once per cycle
The tempSpan will have to be cleared each time before the voice rendering.

@jpcima jpcima merged commit 296080b into sfztools:develop Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants