Change Audio Pitch / Playback speed

Hi, I have objects in my scene that should play the same sound when hit. Depending on their size the sound should be higher or lower in pitch / faster or slower in playback speed. Is there a way to achieve this in Babylons Audio Engine? I checked the API and Forum but could not find anything related.Many thanks in advance,

Babylon.js is just wrapping WebAudio so you could easily inject any node or transform you need through: audioEngine.audioContext and masterGain which you could use as your output node.

about pitch and frequency this is a nice article explaining a bit the technique: Controlling Frequency and Pitch (Learn Web Audio from the Ground Up, Part 2)

1 Like