WAVY Music is a music tool for Unity which takes advantage of the fact that WAV files store audio markers. Using this technology, WAVY Music can read directly from your WAV file and pinpoint exactly where you placed you marker so you can execute events at the markers position and even create seamless loops for your songs. Please note that WAVY Music also works for other audio formats such as MP3, FLAC and OGG. WAV is just recommended for it's usage of markers (which are also called audio cues).
- Download the repository.
- Place the unzipped folder anywhere in your Unity Assets folder.
- You're now done and ready to use WAVY Music. Yep it's that simple.
WAVY Music uses scriptable objects to store it's song information. So to get started, you create a new WAVY Song scriptable object by right clicking in your projects tab and go to "Create/WAVY Song", you can then name your song to anything that fits.
The WAVY Songs inspector is quite simple to work with. Everything is divided into 4 different foldable categories:
Song Data, Song Markers, Song List & WAVY Music Settings.
This section contains fields for... Well, Song Data! This can be things such as which audio files to use and what name the song should have.
This section contains fields for viewing the markers in your song, as well as using the markers to set loop points, start points and even set song events.
This section contains a toggle field for whether your song should be in the WAVY Song List and it also contains a global array for the WAVY Song List.
This entire section is simply the same inspector as a WAVY Settings object. In here you can change some settings like which audio mixer your WAVY Songs get sent to and how much time beforehand a song should schedule their loop.
Now that you've setup your WAVY Songs, it's now time to actually hear your songs in your games. Here is a little step by step process of how to do so:
Step 1: Create a new C# script.
Step 2: Use the namespace: "WAVYMusic".
Step 3: Get a reference to your WAVYSong in some way. This can be via a public field, serialized private field or even us the WAVYSongList and get it from just the name alone.
Step 4: Play the song using "WAVYSong.Play()".
And that is the basics of WAVYMusic!