surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.11k stars 395 forks source link

Correct WT and Window handling og 16 full range wt files #7703

Closed baconpaul closed 2 months ago

baconpaul commented 2 months ago

wt files with full-range 16 bit ints (so 16-is-16 or flag 0x8 + 0x4 = 0xC) was broken in a couple of ways, but most importnatly, didn't survive a save/restore roundtrip.

This fixes it in three ways

  1. When converting 16-as-16 to float scale accordingly with a different function and leave the ints untouched
  2. Modify the window oscillator so if it gets a 16-as-16 it reduces the height of the ints to be consistent with a 15 with an extra shift, making I15 WT vs Window and I16 WT vs Window consistent
  3. Make sure it streams properly. No change required but tested.

Update wt-tool to allow int16 and int15 options both

Closes #7694

abique commented 2 months ago

I left some comments, but I don't have so much knowledge about surge either.

For the python part, python is a foreign language to me :innocent:

baconpaul commented 2 months ago

I left some comments, but I don't have so much knowledge about surge either.

For the python part, python is a foreign language to me 😇

Thanks!