Second-guessing tuning divisors

This commit is contained in:
Luke Hubmayer-Werner 2023-09-23 16:04:51 +09:30
parent 80cbfa7ab8
commit 6b72875f08
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ func unsigned16_to_signed(unsigned):
func get_reference_pitch_samplerate(tuning1: int, tuning2: int = 0) -> int:
# 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:
pitch_scale += 1.0
return int(pitch_scale * 36000)