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

Ring Modultor Unison not modulatable #6714

Closed
baconpaul opened this issue Nov 29, 2022 · 1 comment · Fixed by #6715
Closed

Ring Modultor Unison not modulatable #6714

baconpaul opened this issue Nov 29, 2022 · 1 comment · Fixed by #6715
Labels
Bug Report Item submitted using the Bug Report template Effects

Comments

@baconpaul
Copy link
Collaborator

the RM FX detune isn't modulatable

The reason for this is

if (fxdata->p[rm_unison_detune].absolute)
        {
            dphase[u] = (storage->note_to_pitch(*f[rm_carrier_freq]) * Tunings::MIDI_0_FREQ +
                         fxdata->p[rm_unison_detune].get_extended(
                             fxdata->p[rm_unison_detune].val.f * detune_offset[u])) *
                        sri;
        }
        else
        {
            dphase[u] =
                storage->note_to_pitch(*f[rm_carrier_freq] +
                                       fxdata->p[rm_unison_detune].get_extended(
                                           fxdata->p[rm_unison_detune].val.f * detune_offset[u])) *
                Tunings::MIDI_0_FREQ * sri;
        }

We use fxdata->p[].get_extended which is fine but use it in fxdata->p[].val.f which is the value, not the modulated value.

Replace that with

 storage->note_to_pitch(*f[rm_carrier_freq] +
                                       fxdata->p[rm_unison_detune].get_extended(
                                           *f[rm_unison_detune] * detune_offset[u]))

in both places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Item submitted using the Bug Report template Effects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants