SECRET
DigiMastered Works LLC
Office of Development
DMW107IB7003
Date 09/13/2021 10:47PM
To: The People
From: Tanner Fry
Subject: Into the Sound
Sound Production
To spice up solo development, I've steered towards adding some sounds and music into AIA. This allows for skill diversification, a change of pace/workload, and the ability to give the game some life. It can get boring and tedious listening to your own music (especially if it's poorly made) or to not hear any sounds at all when testing, thus, taking this avenue conquers many different issues/concerns at the same time.
Tools Used
Some of the important tools that are being used to create music are Logic Pro, FL Studio, and Audacity. They have been cornerstones to the creation of AIA's music as well as providing extensive soundbites, samples, synths, and more. FL Studio is used the most since I had some experience from high school. With quite a few digital audio workstations, also known as DAWs, plugins are important to enhance audio, make effects, and more in order to mix up sound and bring it to life. For example, Harmless is a synthesizer VST plugin in FL Studio that is used in creating some inspirations and testing pieces for our menu music. You'll be able to hear it in our samples section below. The menu music is simple in most aspects but the production process brought much needed experience for later creations.
Unity Integration
Like most game engines, Unity provides an avenue for incorporating sound or music into the project. Adding audio into Unity is not that difficult and I'll show why. All we need in our Unity scene is a GameObject to hold our audio clip and a GameObject to act as our music manager. Create both of these as your first step. Note, there are many ways of incorporating audio into Unity. This is just my preference for management.
To add audio we need to select our arbitrary GameObject, look in our inspector for "Add Component", click the button, and then search for "Audio Source". Click "Audio Source" in the drop-down to add it to our GameObject. It should now appear in our inspector with quite a few properties. All we want to do is drag and drop our audio file onto the AudioClip property.
With that done, we can now move onto adding it in our code but before we do I want to make it clear how it works. We will have a GameObject for our audio source and a C# script that will be attached to our music manager GameObject. In our script, we will setup the audio to get ready to play and then fire it off whenever we want our audio to play.
So we will click our music manager GameObject and add a component. This time the component will be C# Script. Make sure to name your script "MusicManager" if you want your code to look exactly like mine. Note, the code public class <name> class name will be dependent on the naming of your script. Once added, double click on the script name in the inspector, or under our "scripts" folder we can double click on the file to open it in our editor. In the editor, your code should look like the following:
using UnityEngine;
public class MusicManager : MonoBehavior {
public Gameobject mainLoopMusicObject;
private AudioSource sourceMain;
private void Awake() {
sourceMain = mainLoopObject.GetComponent<AudioSource>();
sourceMain.Play();
}
}
This will allow your music to play immediately when the GameObject is initialized. In AIA, we currently have it a little different to support an intro sound once the main menu is loaded. See below:
using UnityEngine;
public class MusicManager : MonoBehavior {
public GameObject introObject;
public GameObject mainLoopObject;
private AudioSource sourceIntro;
private AudioSource sourceMain;
private void Awake() {
sourceIntro = introObject.GetComponent<AudioSource>();
sourceMain = mainLoopObject.GetComponent<AudioSource>();
sourceIntro.Play();
Invoke("PlayMainSong", sourceIntro.clip.length + 0.5f);
}
private void PlayMainSong() {
sourceMain.Play();
// This invoke method wouldn't be needed if Unity's "Loop" property for the Audio
// Source worked. However, at the time of posting this it did not work on Unity
// 2020.3.18f1.
Invoke("PlayMainSong", sourceMain.clip.length + 0.5f);
}
That's it! You should be good to go. We've created GameObjects to hold the audio, scripts to collect said audio, and told the audio to play when the GameObject is created. Nothing more to it!
Current Samples
Below I have a few samples of sounds and music for you to listen to. They're simple, but the process of creating the music has taught me a lot so I figured I'd share them.
Note: Some of these samples will need to be turned up to maximum volume to hear them properly (speaking to you Thunder samples). I've set them to 20% volume to safeguard ear blasting.
Synthesizer Fun
When toying around with synthesizers, I wanted to use a decent beat with unpredictability for the menu music. It could still use a lot of work but this is currently what we have.
Rudimentary Sythesizer Music
Fake Thunder
Real thunder will be recorded if I ever receive any storms in the area but after recording some cicada sounds, I found that wind rustling against the mic sounded quite familiar to thunder in the distance.
Fake loud thunder rumble
Fake thunder rumble
More fake thunder rumble
Cicadas at Night
I've been meaning to go to the park and grab some sounds of birds, frogs, and other bugs. It's semi difficult since the current mic is relatively low quality but cicadas will do for now.
Cicadas at night
AC Unit
The AC unit could have potential for "transformer" sounds later down the road. Good for if you zoom in really close to any kind of electrical zones.
Loud AC unit:
AC unit turning to low power:
Low power AC unit:
AC unit turning off:
The Future Of Our Sound
These are only a handful of sounds I've gathered or created and I'll showcase more as I develop my foley skills. I hope you enjoyed it all. Until next time!
Roadmap
Milestones To Do:
Milestones Completed:
SECRET
Approved for release: 09/13/2021 ID: IB7003
1