SunVox 2.1, 2.0 - Delay module controllers not clamped

Found a bug? Post it here.
Post Reply
User avatar
Sotakebk
Posts: 16
Joined: Thu Nov 03, 2022 8:52 pm

SunVox 2.1, 2.0 - Delay module controllers not clamped

Post by Sotakebk »

While working on my lib, I tried analysing the min-max value range of controllers by sending 0x0 and 0x8000 to them, and found out this:
DelayUnit is not clamped to <0, 9>
Enum DelayUnit of module Delay doesn't fit value range of controller Delay unit (is: 0 to 9, but expected (0 to 32768))
Enum VibratoFrequencyUnit of module Vibrato doesn't fit value range of controller Frequency unit (is: 0 to 6, but expected (0 to 32768))

I was using the previous version of the library, but it seems to still be the case when checking with the newest SunVox release.
User avatar
NightRadio
Site Admin
Posts: 3941
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: SunVox 2.1, 2.0 - Delay module controllers not clamped

Post by NightRadio »

There are two types of controllers:
0 - normal (volume, frequency, resonance and other parameters with a continuous scale): clamped to 0...32768 in the pattern;
1 - selector (number of harmonics, waveform type etc.): 0,1,2,3,... in the pattern (not clamped)

Get controller type:
sv_get_module_ctl_type()

Send value with automatic scaling:
sv_set_module_ctl_value( slot, mod_num, ctl_num, real displayed value, 2 );
User avatar
Sotakebk
Posts: 16
Joined: Thu Nov 03, 2022 8:52 pm

Re: SunVox 2.1, 2.0 - Delay module controllers not clamped

Post by Sotakebk »

Yes, I am aware.
What I mean is, you can set whatever you want to these controllers, as you can see here:
image_2023-02-02_193440461.png
image_2023-02-02_193440461.png (9.78 KiB) Viewed 2977 times
User avatar
NightRadio
Site Admin
Posts: 3941
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: SunVox 2.1, 2.0 - Delay module controllers not clamped

Post by NightRadio »

Ah, yes, you're right. This is a minor oversight, which I hope will not cause the app to crash like in SpectraVoice :)
Post Reply