Making a Game - Creating Sound Effects - EP 31
by Damien
Video Tutorial
Aims of this Tutorial
- Create sound effects for our laser, engine and UI elements using Vitalium and Ardour.
- Use the exported audio of these to create seamless looping audio in Ardour.
Creating the Sound Effects
Firstly, we want to start up Ardour and create a new MIDI track with Vitalium. Then, using the draw tool, we can create a note anywhere in the track. We do not care about the note, because we will not be using note tracking. Now we can open the Vitalium UI by double clicking the plugin in the mixer.
How to use Vitalium
There are many features of Vitalium which make it extremely powerful but can also make it overwhelming to a new user. Luckily a lot of it is very intuitive when you know the basics. On the page you start on, you will see, in the centre, 3 synths and a sampler. This is where the audio is first created.
You can change the shape of the waveforms produced by the generators by clicking the pencil in the bottom left corner of the preview. This will open the wave in full. You can then either draw the wave by clicking and dragging on the wave itself, or you can specify the spectrum by clicking and dragging on the discrete spectrum below. Note that there are two of these on top of each other and they are multiplied element-wise before being applied to the wave. Hence, we can see that the default sawtooth wave is created with every other harmonic being added together at equal amounts. You may also want to play with wave modifiers to see how they affect the wave.
If we now look to the right of the oscillators, we have envelopes near the top. These are (almost) unlimited, since if you use them all up, another one will appear. Envelope 1 is special because it automatically applies to the total volume of everything. If you want an envelope to apply to anything else, simply drag the tab for that envelope onto the value you want it to affect. For example, if I wanted to change the pitch of an oscillator with an envelope, simply drag the envelope tab onto the pitch (right side is fine tuning, left side is coarse).
The way the envelope works is that as you start pressing the note, you build up during the attack, then move towards the sustain and then finally decay after you release the note. For these sounds we are going to mostly set envelope 1 to a square envelope with no attack or decay. In some cases we will set this to a note that decays rapidly during the note.
Below the envelopes are LFOs (Low Frequency Oscillators). These can be applied to values in the same way envelopes can. However, these, instead of only moving along the track when the note is played and pausing at points, will simply loop repeatedly. To add more nodes into the LFO, simply double click where you want to add one. You can also change the frequency of the LFO using the value below the visualisation.
Below this, we have the random generators. These will produce random values which many be desirable in many cases, however for these sound effects, we want consistency to make them loopable. We also see some other parameters nearby which can be dragged onto values and are affected by the MIDI notes played (eg velocity, pitch, etc). We wont be using these either, because we have only one note per instance of Vitalium.
Now, let's look at the filters below the oscillators. These allow you to further shape the audio by restricting certain frequencies and boosting others. Play around by selecting different filters, altering resonances and cut off frequencies and see what you like or don't like. You can also play with the mix to let some of the audio through the filter without being filtered. Note tracking moves the filter based on the note being played. We don't want this for sound effects, so leave it alone.
This is everything important for this page, so now we can switch over to the effects tab. Effects are applied after the generation on the previous tab. You will see a bunch of effects that can be toggled and reordered. When you turn them on, a more detailed block appears with a visualisation of the effect. Envelopes, LFOs and randomisers can all be applied to effect parameters too! Play around with the different effects to get a feel for how they affect the sound. It is best to start playing around with this with a pure sawtooth wave, so the effects will be more prominent.
The matrix tab will become useful once you have a lot of connections formed by dragging tabs from envelopes, LFOs and randomisers to values, since all of these connections are displayed here. You can alter the amount they affect the values, and the linearility of the effect in this view.
The advanced tab also has a few things useful to us, such as the ability to turn off note tracking for oscillators and change the unison spread (value on the oscillators that allow the oscillator to play multiple times simultaneously with slightly different pitches to simulate a choir) for other values such as the wave table.
Laser Sound
The laser sound can be created by starting off with the sawtooth and boosting the low harmonics in the wave table slightly as well as a few higher ones. Then we can add a filter and set the blend to the centre and increased the resonance to create a band pass filter. By reducing the mix, we allow some of the rest of the sound through. Then by applying a decaying envelope (not env 1) and an LFO that stays low and then suddenly rises to the cut off, we get a nice filter sweep at the start and end of the note.
We can also apply these envelopes and LFO to the level of the oscillator in order to boost or reduce volume from the oscillator. Then in the matrix, we can set the LFO to work in the negative direction (so when the LFO jumps up, the volume and cutoff lowers). Once you have played around with all the parameters, you can then export it ready to be made loopable.
UI Error Sound
This sound is quite easy to make. Simply increase the unison voices, reduce the spread and make envelope one decay quickly. Again, play around with the values until you get something you like.
UI Click Sound
This sound was made by modelling white noise. White noise is the default sample, so turn on the sample and turn off the oscillator. Sounds horrible, right? Well that is because we need to add some filters to it to shape the sound. First we turn on filter 1 and set it to accept input from the sample (SMP). We can then change the type to 'Band Spread Comb' under Comb and increase the resonance. This is better but it has too much 'twang' to it. So we can turn on filter 2 and set it accept input from filter 1. Changing the type to 'Formant: AOIE' worked well for me. Making the envelope decay quickly is the final step to creating the base for this sound.
Now, let's apply the finishing touches in the effects. I turned on the following effects and put them in the following order: Compressor, Flanger, Distortion, Eq, Filter. For the distortion, I put it in bit crusher mode and slightly reduces the drive. I used the EQ to reduce some of the highs. And finally, I used the filter in a 24 dB low pass filter to get rid of the clicking. However, this removes the initial bit crushing sound, which we want. Therefore, applying envelope 1 (which is low when the volume is low and thus we have undesirable clicking) to the cut off allows us to get the best of both worlds. Once again, play with the settings to get a sound that you like.
Engine Sound
To make the engine sound, we start by drawing a wave in the upper spectrogram of the wave table. We then add the frequency cut off modifier to the table and use a feature I have not yet talked about. The wavetable can actually have a third dimension! We can use the slider next to the wave in the main view to move along this third dimension. The wave is interpolated between key frames that we place. We can do this with the cut off frequency modifier to make one end have a cut off that barely affects the wave and the the other end cuts off all high frequencies.
Now, in the main view, we want this to sound like a rumbling sound, so we need to reduce the overall pitch. To do so, we can change the number to the left of the pitch to about -20 or so. Now, we want to use the variety we introduced in the third dimension of the wave table. To do so, we will increase the unison voices and the spread. Then we will head over to advanced and increase the unison table spread. This means that each voice will be in a different part of the third dimension of the table!
To tie this whole thing together, we can add some white noise put through a low pass filter with no resonance to simulate the jet of exhaust being ejected out of the engine. Together we have the rumbling of the inner workings and a wind like noise for the exhaust.
Looping Sounds
For each sound that needs to be looped, the first step is to export the whole sound first and reimport it, so we can work with the actual audio instead of the MIDI. Then we need to find a section that sounds fairly homogenous to loop. Zoom in to the maximum amount and then cut the section at a point as close as possible to where both channels are crossing the zero point in the same direction. Do the same on the other side and try duplicating it to see if it works. If you hear a click, there are a few steps to take to try and make it better:
- Find a better crossing/cut more accurately.
- Try disabling the automatically added cross-fades.
- Find a section that is more homogenous.
In the case of the laser, we require that the start of the laser is seamless with the loopable section, the loopable section is seamless with itself and is seamless with end of the laser. Therefore, you need to check all of these transitions.
Gitea Links
There are no commits this episode because none of this has been added to Godot yet.