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

Wavetables > 1024 samples do not render correctly in Window oscillator #1170

Closed
theofficialajyoung opened this issue Sep 15, 2019 · 7 comments · Fixed by #1172
Closed

Wavetables > 1024 samples do not render correctly in Window oscillator #1170

theofficialajyoung opened this issue Sep 15, 2019 · 7 comments · Fixed by #1172
Labels
UI Issues related to UI look&feel
Milestone

Comments

@theofficialajyoung
Copy link

First, the basics out of the way:

Surge NIGHTLY-2019-09-12-08cde89
64-bit Windows VST2
Built Sep 12 2019 22:05:35

Testing on Reaper Windows 64-bit v5.982

While using Surge with some Serum-created Wavetables, I noticed that they do not load as expected when using the "Window" oscillator mode. It does not load a full cycle of the wave, but instead seems to load a quietly amplified version of the window shape.

Here is a gif demonstrating the issue:

Surge Window Serum Wavetables

@mortfell
Copy link

oh yeah woops I have noticed this before and forgot to report 😔
thanks @theofficialajyoung

Window oscillator also doesn't work correctly as the Carrier in an FM routing configuration, I'm assuming that is by design though.

@baconpaul
Copy link
Collaborator

Oh I bet it can’t extend the window to the size of the larger tables.

Do you have a test table around you can attach to this issue or does any 2048 wide serum table show the problem?

I’m not 100% sure I can resolve this for 1.6.2 but would sooner not ship with this bug so I’m going to optimisitically tag it for the upcoming release.

@baconpaul baconpaul added this to the 1.6.2 milestone Sep 15, 2019
@baconpaul baconpaul added the UI Issues related to UI look&feel label Sep 15, 2019
@baconpaul
Copy link
Collaborator

baconpaul commented Sep 15, 2019

Oh and yeah window totally ignores fm. We should make that a separate issue than this one. Which I did - it's #1171

@baconpaul baconpaul changed the title Serum Wavetables do not read correctly in Window Mode Wavetables > 1024 samples do not render correctly in Window oscillator Sep 15, 2019
@baconpaul
Copy link
Collaborator

OK so good news. This is nothing to do with the Serum importer. I made a set of .wt files with 512 -> 4096 samples and the window oscillator fails above 1024 whereas the wavetable oscillator does not.

The reason for this is the window oscillator is basically using the windows in "resources/data/windows.wt" to pick the co-table which is used for interpolation (that's the window parameter) and in the event that the interpolated table is longer than the window table, it blows up.

So the solution here is either

  1. stop it blowing up or
  2. make a version of the windows which are 4096 samples long and use those if the input is a long one (but keep the current version at and below 1024 to not change the sound)

The second is easy enough but tedious; the first I'm not sure but I would rather do it if I can. So I will investigate the first and then go from there.

I also changed the title of the issue just FYI, to reflect this update.

Thanks for the report!

@mortfell
Copy link

Awesome work !

@baconpaul
Copy link
Collaborator

Actually a super simple fix.

baconpaul added a commit to baconpaul/surge that referenced this issue Sep 15, 2019
The window oscillator had an assumption that tables <= 1024 size
and then intermixed with the 1024 interpolation tables. Now
tables can be 2048 or 4096 we have to assume that either is
bigger to get large tables working.

Closes surge-synthesizer#1170
baconpaul added a commit that referenced this issue Sep 15, 2019
The window oscillator had an assumption that tables <= 1024 size
and then intermixed with the 1024 interpolation tables. Now
tables can be 2048 or 4096 we have to assume that either is
bigger to get large tables working.

Closes #1170
@baconpaul
Copy link
Collaborator

Just pushed the fix to this. Should be in the nightly within the next 30-40 minutes.

Thanks for the excellent report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Issues related to UI look&feel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants