Smoke Show - Live Music Visualization in Unity
Developing Beginner level skills in Unity is encouraged before using Smoke Show!
How to Get Started with Smoke Show
- Download and install Unity - unity3d.com
- Download and unzip the repository - here
- Open the project in Unity by double-clicking the main.scene file in /Assets/Scenes - ignore or skip any warnings about Unity versions.
- Watch this tutorial.
- Press Play in Unity to see Smoke Show in action - by default the application uses the bundled Busy Beds - Kangaroo Court mp3 file as the source audio.
- When you are ready to build an executable of your customized SmokeShow - refer to Unity’s build documentation.
How Smoke Show Works
Check out this tutorial.
While playing, elements in Smoke Show can be swapped/switched by pressing keys on your keyboard. All elements are mapped to keyboard keys via KeyToIndexDictionary.
All elements in Smoke Show appear in the Hierarchy view in Unity.
They are divided into 2 categories:
- Backgrounds - backgrounds are a collection of images that are animated statically.
- Music Reactive - music reactive elements are collections of images that react to the music via the AudioPeer.
As you swap between elements live, if the last selected element is Music Reactive, you can change the sensitivity of how it reacts, turn on and off its buffer, or switch if the element reacts to Bass, Mids, or Treble. Default keys for these operations are available in the Unity Input Manager https://docs.unity3d.com/Manual/class-InputManager.html and functionality is defined in TriggerElements.
All elements use the AnimateTiledTexture file to animate an array of images. Video is not currently supported.
Create a new element by duplicating an existing element in the Unity Hierarchy. Select an element and press Control+D.
All elements are mapped to keyboard keys via KeyToIndexDictionary. Music Reactive elements are mapped to keys 1-T from left to right on your keyboard. Backgrounds are mapped to Y-; Refer to the Triggerable Element component/script in the Unity inspector.
When making a new element - set State to INACTIVE and increment Index Of Element by 1.
After using the Lock on the Unity inspector for an element, select your array of images for an animation and drag them on to the AnimateTiledTexture component. Make sure you first change the Size to 0, and set your Frames Per Second to your desired animation speed.
If you wish to use live audio vs. an mp3 or audio file, click the Live Audio checkbox on the AudioPeer component in the inspector.
This will use the first available microphone on your device as your audio source. You may need to edit Frequency to match your microphone’s sample rate frequency.