RCJ15 / WAVY-Music

A music tool for Unity which takes advantage of WAV markers, allowing you to create seamless music loops and perfectly timed music events.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What's The WAV All About?

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).

How To Install

  1. Download the repository.
  2. Place the unzipped folder anywhere in your Unity Assets folder.
  3. You're now done and ready to use WAVY Music. Yep it's that simple.

How To Use The WAV

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.

Creating a WAVY Song Asset and renaming it

The Inspector

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.

WAVY Song Inspector

Song Data

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.

The Song Data section as seen in the inspector

Song Markers

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.

The Song Markers section as seen in the inspector

Song List

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.

The Song List section as seen in the inspector

WAVY Music Settings

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.

The WAVY Music Settings section as seen in the inspector

Usage In Your Games

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.

Creating the C# script

Step 2: Use the namespace: "WAVYMusic".

Using 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.

Getting a reference to the WAVYSong in some way

Step 4: Play the song using "WAVYSong.Play()".

Playing the song using "WAVYSong.Play()"

And that is the basics of WAVYMusic!

About

A music tool for Unity which takes advantage of WAV markers, allowing you to create seamless music loops and perfectly timed music events.


Languages

Language:C# 100.0%