Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AudioEffectPitchShift has audible effect when pitch = 1 #96510

Open
JUSTCAMH opened this issue Sep 3, 2024 · 1 comment
Open

AudioEffectPitchShift has audible effect when pitch = 1 #96510

JUSTCAMH opened this issue Sep 3, 2024 · 1 comment

Comments

@JUSTCAMH
Copy link

JUSTCAMH commented Sep 3, 2024

Tested versions

  • Reproducible in 4.3.stable

System information

Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.15.6094) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)

Issue description

The documentation for AudioEffectPitchShift claims that "1.0 is the default pitch and plays sounds unaffected", which matches expectations, however this is not the case. If you first set the pitch to something other than 1 then back to 1 via scripting, the sound will be noticeably distorted compared to how it initially was. When starting the effect at a pitch of 1 the audio is indeed unaffected, however changing it to something else then back to 1 continues to distort the sound.

In the video below, the pitch starts at a default 1.0, then I quickly press buttons to set the pitch to something else then back to 1.0, check the console to see the values. The sound is initially undistorted, but after changing its pitch to something else then back, there's an audible difference in the sound.

Pitch.Bug.mp4

I was hoping to fade the pitch effect in and out as you open a menu, however this won't be possible without noticeable audio weirdness. I tried turning off the effect which works but has a noticeable snap to it as the effect instantly turns off.

Steps to reproduce

  • In the MRP below, you can press left / right arrows to set the pitch to 0.5 or 1.5. Pressing space returns the pitch to the default value of 1.0
  • Enter play mode, listen to the sound
  • Quickly press right arrow then space, the sound is noticeably not the same as how it started, despite the pitch being returned to the starting value of 1.0

Minimal reproduction project (MRP)

pitch-shift-bug.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@JUSTCAMH @AThousandShips and others