How to interpret max of 0 when using sv_get_module_ctl_max with scaled=1?

Multi-platform modular music creation studio
Post Reply
User avatar
queries
Posts: 316
Joined: Tue May 10, 2016 9:51 pm

How to interpret max of 0 when using sv_get_module_ctl_max with scaled=1?

Post by queries »

I've updated sunvox-dll-python to the latest SunVox library 2.1b and I am happy to see the new introspection functions! I am going to use them to improve the accuracy of radiant-voices code.

One question though, I noticed that when you use scaled=1 when calling sv_get_module_ctl_max, it returns 0 instead of the expected 32768 when calling it for a controller that is of scaled type.

Is it safe to assume that anywhere 0 is returned in that situation, 32768 should be used instead?

Code: Select all

                                           Velocity2Ctl                                           
┏━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ # ┃ Name           ┃ Type   ┃ Group ┃ Range (Real) ┃ Range (Scaled) ┃ Range (Display) ┃ Offset ┃
┡━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ 0 │ On NoteOFF     │ ENUM   │ 0     │ [0, 2]       │ [0, 2]         │ [0, 2]          │ 0      │
│ 1 │ OUT min        │ SCALED │ 1     │ [0, 32768]   │ [0, 0]         │ [0, 32768]      │ 0      │
│ 2 │ OUT max        │ SCALED │ 1     │ [0, 32768]   │ [0, 0]         │ [0, 32768]      │ 0      │
│ 3 │ OUT offset     │ SCALED │ 1     │ [0, 32768]   │ [0, 0]         │ [-16384, 16384] │ -16384 │
│ 4 │ OUT controller │ ENUM   │ 1     │ [0, 255]     │ [0, 255]       │ [0, 255]        │ 0      │
└───┴────────────────┴────────┴───────┴──────────────┴────────────────┴─────────────────┴────────┘
User avatar
NightRadio
Site Admin
Posts: 3941
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: How to interpret max of 0 when using sv_get_module_ctl_max with scaled=1?

Post by NightRadio »

I noticed that when you use scaled=1 when calling sv_get_module_ctl_max, it returns 0 instead of the expected 32768
It's a bug :(
Of course it should return 32768.
Will be fixed in the next minor update
Post Reply