Second-guessing tuning divisors
This commit is contained in:
parent
80cbfa7ab8
commit
6b72875f08
|
@ -47,7 +47,7 @@ func unsigned16_to_signed(unsigned):
|
||||||
|
|
||||||
func get_reference_pitch_samplerate(tuning1: int, tuning2: int = 0) -> int:
|
func get_reference_pitch_samplerate(tuning1: int, tuning2: int = 0) -> int:
|
||||||
# This is non-trivial and subject to change
|
# This is non-trivial and subject to change
|
||||||
var pitch_scale = tuning1/256.0 + tuning2/65536.0
|
var pitch_scale = tuning1/255.0 + tuning2/65535.0
|
||||||
if tuning1 < 0x80:
|
if tuning1 < 0x80:
|
||||||
pitch_scale += 1.0
|
pitch_scale += 1.0
|
||||||
return int(pitch_scale * 36000)
|
return int(pitch_scale * 36000)
|
||||||
|
|
Loading…
Reference in New Issue