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

AudioStreamPlayer pitch_scale docs could be clearer #29439

Open
Cheeseness opened this issue May 31, 2019 · 0 comments

Comments

@Cheeseness
Copy link
Contributor

@Cheeseness Cheeseness commented May 31, 2019

The current documentation for AudioStreamPlayer, AudioStreamPlayer2D, and AudioStreamPlayer3D's pitch_scale getter/setters describe the following:

Changes the pitch and the tempo of the audio.

The current wording does not make it immediately clear that the value is a multiplier rather than an offset, and also implies that the audio itself is manipulated rather than just the sample rate at playback. It's not covered in the documentation guidelines that I can see, but member getter/setter docs for other classes seem to describe the member rather than the action of the getter/setter.

I'd like to propose the following as a more clear alternative, though the notion of samples is not present elsewhere in these classes' API docs and might need changing.

The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. Default value: [code]1.0[/code].

It doesn't feel sufficient to use "the audio" or AudioStream to refer to this, as "the audio" is already used to refer to the mixed output of all samples being played by this AudioStreamPlayer, and while AudioStream more or less maps to an individual audio sample, setting the AudioStreamPlayer's pitch_scale property doesn't touch any of the AudioStream's properties, and is applied in addition to the AudioStream's mix_rate.

@bojidar-bg bojidar-bg transferred this issue from godotengine/godot-docs Jun 3, 2019
@Chaosus Chaosus added the enhancement label Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.