Change sound pitch
tracked
Journey Bunny
Straightforward gaming feature, common to things like engine sounds--but also anything that "changes speed or intensity over time".
I'd like to propose llAudioSoundPitch(float pitch_multiplier)
This function would affect playback for the currently attached sound in the following way:
final_pitch = sound_asset_pitch x emitter_pitch x sound_instance_pitch x pitch_multiplier
Where final_pitch is the sound played by the viewer, sound_asset_pitch is the pitch sampled from the audio asset, emitter_pitch is any distortion up or down currently applied by the viewer due to motion, and sound_instance_pitch is the current multiplier already in place (if there is one).
Defaults are 1 for everything except the original asset.
Eg, subsequent calls of llAudioSoundPitch(0.5) at timed intervals will successively cut the pitch in half, altering the sound.
In this way, a single sound file can be made to serve many uses, decreasing the need for "speed up", "slow down", "idle", "full speed" sound assets.
Log In
Nelson Jenkins
I've been sitting on a JIRA feature request for this for over a decade. Vehicles in SL with actual engine dynamics - especially necessary once game_control hits main grid - will never make sense until this happens. I've also got a ton of other projects where this could be useful, especially a MIDI sequencer.
Also - this only needs to be pitch shifting in the sense of adjusting the sample playback speed. That is, playback time doesn't need to remain constant. So that should be a pretty simple addition. The FMOD API specifically refers to pitch shifting as a constant-time operation that just adjusts pitch - I don't know if that's computationally wise in real time en masse, and the distortion would be unhelpful. Resampling alone would be enough and would make more sense for virtually all SL applications. I'm not sure how that's done in FMOD at first glance but should be a trivial operation.
Spidey Linden
tracked
Issue tracked. We have no estimate when it may be implemented. Please see future updates here.
Jabadahut50 Resident
We've needed this for a very long time. I'd like to see more than just pitch, but pitch alone would dramatically increase the utility of sounds in SL.
Extrude Ragu
This feature will become more important when
game_control
reaches the grid and people start driving vehicles with gamepad.That's because for things like vehicles being controlled with a gamepad, players are going to really notice the disconnect between the sound being heard and the input on their controller, and make the game appear to be broken.
Vincent Nacon
Yup, need this so badly. It would also save us from having to upload and preload so many different variations of one sound wave.