Compose Music in Unity — Free Tutorial 🥁🎸🎹
Tags: tutorial, unity3d, csharp, gamedev
Published: 2022-06-22 00:07:32

![](https://miro.medium.com/max/1400/1*6M_MQ4zDjwX7P9YEWxsFJw.png)

Unity can do more than just create games! You can also create a music-composing experience while using [echo3D](http://www.echo3d.co) as the backend for your visual assets. Click on each instrument to 
start or stop the beat and see what you come up with! Be a rockstar for a day!

Register
========

Don’t have an echo3D account? Register for FREE at [echo3D](https://console.echo3d.co/#/auth/register).

Setup
=====

*   Clone this [repo](https://github.com/echo3Dco/Unity-echo3D-Demo-MusicMaker).
*   [Install the echo3D Unity SDK](https://docs.echo3D.co/unity/installation).
*   Open the _MusicScene_ scene.
*   [Set the API key](https://docs.echo3D.co/unity/using-the-sdk) in the Inspector of the echo3D game object.
*   [Add the 3 instrument image](https://docs.echo3D.co/quickstart/add-a-3d-model)s from the _Models_ folder to the echo3D console.
*   [Add the metadata for each instrument to match](https://docs.echo3D.co/web-console/manage-pages/data-page/how-to-add-data#adding-metadata).
    Drum: xAngle: 90, yAngle: 180, scale: .06, x: -2
    Guitar: xAngle: 90, yAngle: 180, scale: .06, x: -11
    Piano: xAngle: 90, yAngle: 180, scale: .06, x: -7
*   Add API keys and entry IDs to each echo3D prefab in the Hierarchy.

![](https://miro.medium.com/max/1400/1*0Z_JDVXFCJNPaE9CkL18BA.png)![](https://miro.medium.com/max/1400/1*kOJv2muEpYN9A69wfbJH1w.png)

Run
===

Simply press the _Play_ button in Unity and click on each instrument to play and stop music.

Learn More
==========

Refer to our [documentation](https://docs.echo3D.co/unity/) to learn more about how to use Unity and echo3D.

Support
=======

Feel free to reach out at [support@echo3D.co](mailto:support@echo3D.co)or join our [support channel on Slack](https://go.echo3D.co/join).

Sources
=======

*   [Guitar audio](https://www.bensound.com/royalty-free-music/track/acoustic-breeze)
*   [Drum audio](https://www.bensound.com/royalty-free-music/track/downtown)
*   P[iano audio](https://www.bensound.com/royalty-free-music/track/once-again)
*   [Frame graphic](https://www.canva.com/design/play?locale=en&layoutQuery=square+frame&analyticsCorrelationId=f7ba0eb9-bdd8-41e5-8578-e99b67b21209)
*   [Instruments — macrovector / freepik](https://www.freepik.com/free-vector/colored-flat-musical-icons-isolated-black-background_10600517.htm#query=instruments&position=49&from_view=search)
*   [‘Squealer’ rock and roll font](https://www.dafont.com/squealer.font)

Support
=======

Feel free to reach out at [support@echo3D.co](mailto:support@echo3D.co) or join our [support channel on Slack](https://go.echo3d.co/join). For additional troubleshooting, debug [here](https://docs.echo3d.co/unity/troubleshooting).

More Tutorials
==============

For more easy tutorials, check these out:

*   [Build a 3D Balloon Pop game in Unity](https://medium.com/echo3d/build-a-balloon-pop-game-unity-free-eed9fe7d8be9)
*   [Get a Quarantine Dog in AR](https://medium.com/echo3d/get-a-quarantine-dog-in-ar-8383ea55376b)
*   [How to Create 3D Content and See It In AR](https://medium.com/echo3d/how-to-create-3d-content-and-see-it-in-ar-free-no-coding-required-369e5b4a4b3e)

***

>_**echo3D** ([www.echo3D.co](http://www.echo3d.co/); Techstars 19’) is a cloud platform for 3D/AR/VR that provides tools and network infrastructure to help developers & companies quickly build and deploy 3D apps, games, and content._

![](https://miro.medium.com/max/1400/1*cNrRDT0JEpkcy-zG6KBNgw.png)