From those exotic sound effects that improve game fun and playability to that dark musical score that sets the entire atmosphere of a scene or game audio is essential to any great game. Yet it is perhaps one of the most often overlooked assets in the development of a game by new or indie developers. Instead, they dedicate the bulk of their effort to graphics and other visuals, often deferring the audio portion until the later stages of production. They do this not because good audio is not a critical aspect to any good game, but as a single or indie developer they feel AAA game quality audio is out of reach. Of course, that is far from the truth, especially with the great audio system built into Unity and the many freely available commercials plugins and tools.
This book was written to introduce the reader to the extensive audio framework built within Unity and other freely available commercials tools and plugins. Often, audio development tools expect a certain level of knowledge in sound, mixing and music. By following through the books material and exercises a reader should be able to master all the essentials of audio development. From the basics of implementing an audio source; to spatial sound, mixing, effects and dynamic and adaptive audio system. As well there will be time spent learning professionals like FMOD Studio for game audio and Reaper for music composition. While the book assumes no prior knowledge of working with Unity or audio, there will be enough new and interesting content that even the more advanced developer will find useful.
This book starts from the fundamentals of starting game audio development with Unity and progresses to using advanced commercial tools for professional game audio and music composition. It is assumed the reader will follow the chapters in sequential order as many chapters build from previous exercises. Each of the chapters is listed below with a quick summary:
Chapter 1, Introducing Game Audio in Unity, Unity is introduced and the reader is guided through installation of the software and setup of the first project. Which includes importing audio assets, audio source essentials and setting up spatial sounds.
Chapter 2, Scripting Audio, the basics of scripting in Unity is introduced with the writing of a simple musical keyboard. Followed by; scripting weapons, sound effects, physics and implementing ambient sounds and music.
Chapter 3, Introduction to the Unity Audio Mixer, introduces the basics of the Audio Mixer, mixing audio sources and effects, with further coverage on mixer signal routing and using the Duck Volume effect.
Chapter 4, Advanced Audio Mixing, covers using advanced capabilities of the Audio Mixer. From mixer parameter scripting, snapshots, snapshot transitions, and developing audio transition zones.
Chapter 5, Using the Audio Mixer for Adaptive Audio, introduces adaptive audio and covers techniques for mixing adaptive music.The rest of the chapter is spent implementing adaptive audio in sound and music.
Chapter 6, Introduction to FMOD, starts with the installation and setup of FMOD Studio. Then, it goes over the similarities and differences between the Unity Audio Mixer and FMOD.
Chapter 7, FMOD for Dynamic and Adaptive Audio, builds upon previous advanced examples and converts or adapts them to use FMOD. The chapter covers several advanced techniques of working with FMOD Studio.
Chapter 8, Visualizing Audio in Games, starts with a background of how sound can be broken down by frequency with mathematical techniques know as FFT Windowing. Those techniques are then used to create stunning audio-visual dancing lights and graphics.
Chapter 9, Character Lip Syncing and Vocals, builds upon previous work and builds a real-time character lip syncing demo. By covering character bone and vertex animation, lip-sync animation with phonemes, and recording with Unity.
Chapter 10, Composing Music, introduces the basics of music composition with Reaper using some simple music theory. It covers the installation and setup of Reaper, MIDI basics, virtual instruments, audio rendering and recording.
Chapter 11, Audio Performance and Troubleshooting, covers the fundamentals of audio performance with Unity and FMOD. From performance profiling to the tips and tricks of optimizing and troubleshooting performance issues.
In order to be successful with this book you will need to have an eagerness to learn the basics and master game audio development. No previous game or audio development knowledge is required. Although, it may be helpful to have some knowledge of scripting with a C language like C#, JavaScript or C++, but it is not essential. Covering some of the material may be easier if you know how to play an instrument or understand sound or music theory, but again this is not required. You should have a desktop or laptop computer running Windows XP+, Mac OS, or Linux to complete the book's essential exercises.
This book is for anyone who wants to learn how to create better sound for their games or just have a better understanding of how audio works in games. While this book is directed at the individual or indie development team, it certainly could be put to good use by sound designers or audio enthusiasts.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, and user input are shown as follows: "As the scene is running, be sure to select the VirtualKeyboard
object in the Hierarchy
window."
A block of code is set as follows:
public int transpose = 0; //after this line private List<int> notes = new List<int>(); private int index = 0; public bool record; public bool playback;
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on the checkbox next to the Record
setting on the Keyboard
component. Click on the mouse in the Game
view and then type some keys to play the virtual instrument."
Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.
To send us general feedback, simply e-mail [email protected]
, and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
You can download the code files by following these steps:
- Log in or register to our website using your e-mail address and password.
- Hover the mouse pointer on the
SUPPORT
tab at the top. - Click on
Code Downloads & Errata
.
- Enter the name of the book in the
Search
box. - Select the book for which you're looking to download the code files.
- Choose from the drop-down menu where you purchased this book from.
- Click on
Code Download
.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR / 7-Zip for Windows
- Zipeg / iZip / UnRarX for Mac
- 7-Zip / PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Game-Audio-Development-with-Unity-5X. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/GameAudioDevelopmentwithUnity5X_ColorImages.pdf.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form
link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata
section.
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at [email protected]
with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
If you have a problem with any aspect of this book, you can contact us at [email protected]
, and we will do our best to address the problem.