Skip to main content

Music Sync 🎶

Music Sync is similar to AudioLink in the way that music controls June, however, Music Sync creates a static .anim file that controls June to one specific audio and is not real-time. My friend surfknasen helped provide code for this effect, I suggest checking out his work as well!

Adding the Music Sync Script

When you add the script, it will attach to your material and not open a new window like other tools in June - so scroll up above the June material to find it. The script HAS to be attached to the material, not another object. Adding it through the June UI will also automatically set up your camera for you. If you want to do it manually, or to debug, for Music Sync to work you need three things attached to your Main Camera:

  • Audio Listener
  • Audio Source
  • June Listener 5

Setting the Song

Please put your audio file on your Main Camera's Audio Source. This is what will be used to create the animation.

Creating the Animation

You will find various settings in the Music Sync script (the one on your material, not the one on the camera above).

  • Mesh Renderer: This is the object you want to animate. This is usually the same object as the one with the June material, and should be set automatically.
  • Material Index: If your object has multiple materials, which one is June? For most people, this will be 0.
  • Beat Threshold: How intense does the desired waveform need to be?
  • Waveform Target: 12 steps of various audio spectrum portions, ranging from low bass (0) to high treble (11). Select the target area you want to control June with.

Adding Properties

When you add a property, you'll get a few options.

tip

In the script, you will also see a Search tab that can be used to find the properties you want and automatically copy them to the script.

  • Property Name: You can either type in the name manually or select it from the dropdown.
  • Range Min, Range Max: What the property's value should be at when the selected waveform is at its lowest and highest.
  • Duration: How long the property should take to animate when the waveform changes.
  • Power: How intense the effect should be.
  • Custom Threshold: If you want this effect to use a different Beat Threshold and Waveform Target than the global ones set in the script.

Creating the Animation

You will want to set up the values (name and file path) in Saving and enter play mode with it recording. Once it is done, you can stop it and you will get the file as a .anim that you can then reattach to the object with the June material.