GameSynth Adventure UI – Part3: Sliders
Part 1 & Part 2 investigated creating and implementing one-shot sounds. The end of this adventure UI series covers crafting some continuous sounds which are used to accompany sliders and other continuous user controls.
A Granular Approach
For sliders which snap to stepped (discrete) values, we can use a granular playback approach. This helps give the slider a pleasant tactile feel, and also represents what is happening visually.
To create this sound, we can granularis the sound of a plastic gear using the Particles model. GameSynth did quick work of this, achieving excellent results with just a few steps:
- 1. Drop the sample into the Samples box
- 2. Randomise the Start time
- 3. Adjust the amount of Fading
- 4. Draw a single dot on the sketch pad
- 5. Render out a few variations
- 6. Commit some final vetting in Reaper
Getting this to work in UE4 is as simple as playing the sound whenever the slider’s value changes and using a Sound Concurrency asset to limit the max playback count to 2. The slider then adjusts the volume of the Sound Cue dynamically. The Math Expression is used to scale the slider value exponentially, which creates a natural loudness transition.
A Looping Approach
We can opt for a more traditional start/stop approach using a seamless loop. This will start playback while the slider is being moved and stop playback when the slider has been released. We can also throw in a release sample so that the sound doesn’t fade out unnaturally.
For this sound, the Picture Metal preset in the Impact model is perfect, since it allows drawing loop and
Finally, to make sure that the loop plays back seamlessly, we can jump into Reaper (or any other DAW) to create a seamless loop using some crossfades.
Starting and stopping playback is controlled by Fade In and Fade Out actions, to allow the loop and release samples to transition smoothly between one another.
Since changing the Pitch and Volume values of the Spawn Sound 2D action only affects the sound as it is spawned, we need a different method to update our sounds in real-time. To do this, we can set up a real-time parameter control in UE4 using a Continuous Modulator, by setting the Parameter Name under the Volume Modulation Params.
We can then pipe values in during gameplay via the Set Float Parameter action and typing in the name of the modulator (in this case, I’ve named it “ScrapeSpeed”). This value should also be sent to the Fade In volume level input of the release sample so that it plays back at the correct level.
And that’s all for this series! I hope you’ve learned a few tips for using GameSynth and UE4.