Leanpub Header

Skip to main content

Game Audio and Music

A Complete Guide to Creation, Design, and Integration

Game Audio and Music

Learn how to create, design, and integrate game audio and music using Unity and FMOD, from sound effects and ambience to interactive audio systems and dynamic music. Includes a complete video game project to put your knowledge into practice.

Minimum price

$12.99

$19.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

EPUB
About

About

About the Book

Game Audio and Music: A Complete Guide to Creation, Design, and Integration is a practical guide to creating, designing, and integrating music, sound effects, ambience, and dialogue into video games using Unity and FMOD.

Through theoretical explanations and practical examples, the book covers everything from the fundamentals of sound design and music composition for video games to the implementation of interactive audio systems and dynamic music.

Is this the right book for me?

Yes. Its practical approach makes it particularly suitable for students, composers, musicians, sound designers, and developers who want to understand how to work with audio in video games and take their knowledge into a real-world implementation.

Rather than simply explaining concepts, the book takes a hands-on approach: you will learn how to identify real-world problems, develop solutions, design them, implement them, and integrate them into a complete video game project.

The book also includes The Wandering Terror, a complete video game developed specifically as a practical companion to the book. You can download and explore the game yourself, giving you the opportunity to see how the concepts and techniques discussed throughout the book are applied in a real project.

Author

About the Author

Antonio Villa

About the Author

Antonio Villa is a music and philosophy teacher, composer, sound designer and performer with over 20 years of professional experience in education, music composition and performance.

He holds degrees in Music, Music Education and Audio Engineering, as well as Master's degrees in Music Composition with New Technologies and Historical Musicology. He is currently pursuing a PhD in Music and its Science and Technology.

His work focuses on music composition, game audio and the development of practical learning methods that combine music, programming and interactive media.

🌐 www.antoniovillamusic.com ✉️ info@antoniovillamusic.com

Sobre el autor

Antonio Villa es profesor de música y filosofía, compositor, diseñador de audio e intérprete con más de veinte años de experiencia en los ámbitos de la docencia, la composición musical y la interpretación.

Es Graduado en Música, Diplomado en Educación Musical, Técnico Superior en Sonido para Audiovisuales y Espectáculos, Máster en Composición Musical con Nuevas Tecnologías y Máster en Musicología Histórica. Actualmente desarrolla su investigación como doctorando en Música y su Ciencia y Tecnología.

Su trabajo se centra en la composición musical, el diseño de audio para videojuegos y el desarrollo de metodologías de aprendizaje que combinan música, programación y tecnología.

🌐 www.antoniovillamusic.com ✉️ info@antoniovillamusic.com

Contents

Table of Contents

How This Book Came to Be

About the Author

Chapter 1. Fundamentals of Video Game Development: Game Engines, FMOD, and Unity

1.1 Fundamentals of Video Game Development: Game Engines 1.2 Unity 1.3 FMOD 1.4 Downloading the Project Assets 1.5 Microsoft Visual Studio

Chapter 2. Getting Started: Adding Sound to Gameplay Actions (Part I)

2.1 Events Task: Creating Your First FMOD Event 2.2 Instruments 2.3 Audio Assets Task: Configuring an Audio Asset 2.4 Programming: Variables 2.5 Creating GameObjects in Unity

Chapter 3. Adding Sound to Gameplay Actions (Part II): One-Shot Events and Audio Integration

3.1 Creating One-Shot Events in FMOD 3.2 Creating and Building Banks Task: Creating the Remaining One-Shot Events for The Wandering Terror and Assigning Them to the SFX Bank 3.3 Implementing Audio in The Wandering Terror with Unity Scripts Task: Creating the FMODEvents.cs Script and Attaching It to the FMODEvents GameObject 3.4 Programming: Namespaces, Classes, Access Modifiers, Comments, Properties, Event References, Field Variables, Headers, SerializeField, the PlayOneShot Method, and the Singleton Pattern Task: Removing Comments in the Overmind.cs and Dialog.cs Scripts 3.5 Connecting FMOD and Unity 3.6 Implementing One-Shot Sounds in Unity Task: Integrating the Remaining One-Shots in Unity

Chapter 4. Multi Instruments and Sequences

4.1 Multi Instruments 4.2 Creating a Multi Instrument 4.3 Programming: Unity Lifecycle Methods and Console Messages 4.4 Integrating and Playing the Multi Instrument in Unity Task: Adding Debug Messages to the Code

Chapter 5. Creating Ambient Sound in Video Games

5.1 Scatterer Instruments 5.2 Adding and Renaming Tracks in FMOD 5.3 Creating Soundscapes with Scatterer Instruments and Loop Regions: Building the Desert Soundscape 5.4 Programming: Instances, Conditional Statements, Logical Operators, IsValid, Lists, Switch, Enums, and the set3DAttributes Method 5.5 Implementing Ambient Audio in Unity Task: Write the Code to Start the Forest Instance and Stop the Desert Instance 5.6 Optimizing Game Performance: The release Method

Chapter 6. Area Music

6.1 Automation 6.2 Adding Area Music to Our Game Task: Create the Forest Music Event 6.3 Programming: Logical Operators 6.4 Integrating Area Music in Unity Task: Write the Code for the Forest Music 6.5 Integrating Menu Music 6.6 Music and Checkpoints

Chapter 7. Character Audio and User Parameters

7.1 User Parameters 7.2 Compression 7.3 Character Heartbeat Audio Event 7.4 Programming: setParameterByName 7.5 Implementing the Heartbeat Code

Chapter 8. Footstep Audio with Switches and User Parameters

8.1 Creating Switches in FMOD: Footsteps on Different Surfaces 8.2 Adding Footstep Sounds to the Game 8.3 Programming: The getPlaybackState Method 8.4 Integrating the Player's Footstep Sounds in Unity

Chapter 9. Sound Emitters and 3D Space

9.1 Sound Emitters 9.2 Creating an Emitter: The Music Box Task: Creating the Boss Emitter 9.3 The Panner 9.4 The Sound Field: Creating Events with Built-In Distance and Elevation Parameters 9.5 The Spatializer 9.6 Built-In Parameters 9.7 Trigger Conditions 9.8 Creating the Music Box Event 9.9 Programming: GameObject.Find, GameObject.GetComponent, Return, isActive, isPlaying, Play, and OnEnable 9.10 Integration of an Emitter in Unity: The Music Box

Chapter 10. Creating Musical Tension as We Approach the Boss

10.1 Track Customization 10.2 Built-In Direction Parameters 10.3 Adding Effects: Reverb 10.4 Modulations 10.5 Creating the Boss Approach Event 10.6 Programming: Implementation in Unity

Chapter 11. Dialogues and Languages

11.1 Implementing and Loading Different Languages: Audio Tables and Programmer Instruments 11.2 Creating the Dialogue System for The Wandering Terror: Programmer Instruments and Keys, Pointers, and Efficient Dynamic Memory Usage 11.3 Programming: Pointers. Methods: FindObjectOfType, Contains, Clear, EventReference.Find, RuntimeManager.PathToEventReference, getBank, and LoadBank 11.4 Dialogue Implementation in Unity 11.5 Changing the Language: Banks and Language 11.6 Playing the Dialogues

Chapter 12. Combat: The Boss Encounter. Additive Musical Composition. Transitioning Between States Using Music Tracks: Markers and Regions

12.1 Introduction: Additive Musical Composition 12.2 The Timeline Logic: Types of Regions and Markers in FMOD 12.3 Creating the Boss Encounter Event 12.4 Programming: Object and Class Instances, the Count Property, and the getParameterByName and setPaused Methods 12.5 Creating Timers: Time.deltaTime 12.6 Integration into Unity via Code: Final Boss Combat

Chapter 13. Creating Sound Menus: Audio Signal Flow and Mixing

13.1 Routing 13.2 The Mixing Desk 13.3 Creating the Sound Menu: Buses, Groups, and VCAs 13.4 Programming: Methods: getVCA, getBus, setVolume, setActive, and getPaused. Controlling Emitters from External Scripts 13.5 Integrating the Sound Menu into Unity 13.6 Playing the Menu Music and Switching Between Area / Event Music

Chapter 14. Optimizing the Game: Memory Usage, FMOD Profiler, and Platform Export

14.1 Introduction 14.2 Profiling and Performance Evaluation 14.3 Exporting Audio to Different Platforms 14.4 Exporting the FMOD Project to a Real Unity Build

Solutions

Chapter 3. Creating One-Shots and Removing Comments Chapter 4. Adding Debug Messages and Comments to the Frostbolt Event Chapter 5. Creating Ambiences Chapter 6. Adding Music to the Different Areas

Complete Code

Glossary

Downloadable Resources

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub