< Back


Last update: 2025-08-03

201: Interactive Music

Lesson 5: Interactive Re-orchestration

In this lesson we're going to use a different guitar track depending on the player health.

  1. Select and delete the current guitar track (Audio 3 in this example).

    Sample Image

  2. Add 3 new audio tracks add the bottom.

    Sample Image

  3. Import the Combat-A tracks again dragging them one by one into the tracks.

    Sample Image

  4. Same for guitar-B tracks.

    Sample Image

  5. Finally add the bridge tracks. They should overlap 1 beat as we did in the previous lesson to respect their pre-entry time. Undo the automatic crossfades.

    Sample Image

  6. We'll use an Automation to react to the player health state. Right-click the track volume knob and select Add Automation.

    Sample Image

  7. Now we'll create the parameter we want to connect. Go to the menu and select Create > Add Parameter... or press Ctrl+P

    Sample Image

  8. The parameter name must be PlayerHealth, which is the name given in the code. The range goes from 0 to 100 and the Parameter scope is Global.

    Sample Image

  9. Now we'll create a curve for the volume automation. In the Automation: Volume panel, click Add Curve and choose PlayerHealth.

    Sample Image

  10. Now you'll see the curve editor. You can create nodes by clicking over the line and drag them wherever you want. We'll adjust the values so that volume for this track is up between 50 and 80 PlayerHealth units and is -oo for the rest of the range.

    Sample Image

  11. On the right panel you'll see the game parameter. This will allow you to change it and preview the sound for any possible value. At the same time, you'll now find a foldable subtrack below this guitar tracks that shows the track volume according to the PlayerHealth value.

    Sample Image

  12. Repeat the previous steps for the other 2 guitar tracks. Track 2 will have full volume for values between 20 and 50 in this case.

    Sample Image

  13. Track 3 will have full volume for values below 20.

    Sample Image

  14. Now you should be able to play the event and use PlayerHealth to listen how tracks changes for the different PlayerHealth ranges. The change is immediate in this case.

    Sample Image

You can test it into the game by rebuilding the bank and letting hoverbots fire you until your health decreases. Can you notice the increasing tension as you health goes down?