This process is similar in principle to Audacity’s Sliding Scale Effect, except we’re doing it in two discrete steps (and much faster!)Ĭreating the Pitch Shift MetaSounds node isn’t a trivial task, especially if you’re like me and your experience with raw, unfiltered C++ is limited. Through the use of a custom MetaSounds Pitch Shift node we can ‘correct’ pitch alterations made earlier in the process to end up with a change in tempo without a detectable change in pitch. Unfortunately this step needs access to MetaSounds so this solution is for Unreal Engine 5 developers only. Special thanks to friend of the site Hollister Starrett for this layman’s explanation. Just like in the real world, the faster a sound waveform oscillates, the ‘higher’ our brain will perceive that sound to be. This is because they’re quite literally the same thing. In Unreal Engine tempo and pitch are intrinsically linked. If you’re looking to change the tempo of your audio without altering its pitch we have a little more work to do. If this kind of behaviour is what you’re looking for (as I was for the Record Player interactable) then you’ve got what you need. This operation can be done at runtime, as in this example from our demo project where I am using the rotation rate of my record player to dictate both the speed and pitch (volume as well, but that’s not super relevant) of the Audio Component. This can be done in the Sound Cue, or by changing the settings of your Audio Component. The simplest and easiest way to change the speed of your audio in any iteration of the Unreal Engine is to modify its pitch. Changing audio speed by altering the pitch We may have to tackle this problem in a bit of a roundabout way. I am not an audio engineer, so I’ll leave more technical breakdowns of the problem to those who’re feel more confident in the space, but I hope this explains why changing the speed of your audio in Unreal may not be as simple as pressing the ‘change speed’ button. For this tutorial I used the latter of these methods because I found it created better results, but I recommend trying out both for yourself. Case in point: Using Audacity to change the speed of the 2 minute clip I used for this tutorial took almost a minute to finish processing.Ĭhanging the speed of an audio file in Audacity can be achieved via either the Change Tempo or Sliding Scale operations found in the Effects menu. Most audio editing software packages like Audacity may be able to achieve this relatively quickly, but to do so dynamically and at the speed you’d need to hit your target framerate is an altogether different and larger challenge. Feel free to use the assets and Blueprints within for your own projects should they prove useful! Changing audio speed in real timeīeing able to dynamically change the playback speed of your audio might seem like a pretty basic and fundamental part of any audio engine, but actually it can be a relatively expensive operation. If you’re interested in further unpacking the techniques we cover in this article, you can access the Unreal project I used in the above video from my GitHub page.
0 Comments
Leave a Reply. |