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

Move int voiceCount out of SurgeStorage and use polydisp directly from SurgeSynthesizer class #7742

Closed
nuoun opened this issue Aug 7, 2024 · 1 comment · Fixed by #7870
Closed
Labels
Feature Request New feature request

Comments

@nuoun
Copy link
Contributor

nuoun commented Aug 7, 2024

#7727 added voice parameters to the Formula modulator and for this reason the active voice counter is stored as an int in SurgeStorage here from which the voice count is updated inside the valueAt() function in FormulaModulationHelper.cpp here.

Ideally, this value should be retrieved directly from the atomic int polydisplay in the SurgeSynthesizer class similar to how it's being used by SurgeGUIEditor.cpp here, either also as an atomic int or some other type, if the same polydisp is used it should probably also be renamed as it would no longer be used to only display a value on the GUI.

@nuoun nuoun added the Feature Request New feature request label Aug 7, 2024
@baconpaul baconpaul added this to the Surge XT 1.4.0 milestone Aug 9, 2024
@baconpaul
Copy link
Collaborator

Probably the thing to do is

  1. make voiceCount in storage atomic
  2. remove polydisp all together and fix the code to use storage->voiceCount
  3. problem solved

its a bit gross. the voice count is really part of the synth not the storage. but the lfos don't have synth access so this cheat is the more practical thing I think.

baconpaul added a commit to baconpaul/surge that referenced this issue Nov 28, 2024
Make the vcoice=0->1 swap for display only in formula modulator
Add a comment to why we did this micro-cheat

Closes surge-synthesizer#7742
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants