Our initially selected song: Pixelland, by Kevin Macleod, was our original inspiration for the tone of Triage. However, we wanted to apply our own take on his song (and add our own personal touch), so we elected to create our own music for the game instead.

Creating Audio in Garageband

Garageband is a music creation app for MacOS by Apple. Free with all Apple phones and computers, Garageband allows its users to play their own tracks, or combine samples to create songs.

screen-shot-2017-01-18-at-7-44-46-pm
GarageBand’s opening screen

To start, create a new Empty Project from the splash screen. Click “Choose” to open it.

screen-shot-2017-01-18-at-8-15-39-pm
GarageBand’s initial track window

 

Adding Samples and creating music

screen-shot-2017-01-18-at-7-46-15-pmFor this song, I want to combine a simple array of samples to make a nice loopable tune. Click on the loop symbol (left) in the top-right corner of the screen.

 

When selecting Samples, I set the mood to cheerful, and browsed through the suggestions. For percussion, I need a beat and a topper as well as some bass for the trunk of the song, and some extra instruments to spice it up. Just drag the samples into the timeline to add them, and position them where you like:

screen-shot-2017-01-18-at-8-15-52-pm
Ignoring the Classic Electric Piano window, just drag a sample onto the timeline to add it

Try to find ones with matching names (which tend to be made for each other). I used the Distorted Rumble Beat, combined with the Static Electricity Topper, as well as the Cuban Timba Bass and Above and Beyond Synth, but select whichever songs suit your taste and applications.

Conveniently, samples are designed to be loopable, so there’s no need to perform any changes before getting the song into Unity. Drag the top-right end of a track to loop it.

For this song, because I prefer something that’s a little punchier, I used the electronic modifier to select the beat, but kept everything else cheerful.

If a particular tune is too slow, you can adjust the speed in the top-middle menu bar. I sped up the BPM to 160 to add to the pace and upbeat feel to suit my design intent:

screen-shot-2017-01-18-at-8-29-36-pm

Add the four types of samples together until you have something you prefer. Don’t be afraid to mix things up to get something interesting!

screen-shot-2017-01-18-at-8-34-16-pm
What my song looked like towards the end

You may find that the default 8 bars of music isn’t enough for your needs, like it is for mine. Most songs are much longer with peaks and troughs in between, so feel free to make your songs as short or long as you prefer!

Exporting the song

screen-shot-2017-01-18-at-8-34-59-pm

Click on “Share”, and then “Export song to disk”, Give it a name, tag and location, and specify your export type and quality. Click export and your song will export to your destination.

Preparing the Audio For Use In a Scene

Creating an AudioSource

AudioSources provide virtual “speakers” for audio in a game. Add one in a scene by right-slicking on the Heirarchy and navigating Audio -> AudioSource. Position it around the origin, and as long as the AudioSource’s 3D Sound component is disabled, it won’t matter where you place it.

Screen Shot 2017-01-19 at 8.03.25 am.png

Adding an AudioClip, Looping and Playing on Start

AudioSource’s components come with an AudioClip input by default. By dragging an AudioClip onto it, it will be the only sound the clip will play by that object. Check “Play on Awake” and “Loop” to play the music when the scene begins, and loop it constantly while the scene is active

AudioSourceInspector.png

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s