Music System


LunosMusicComponent


LunosMusicComponent lives on the game mode, and is referenced by GetMusicSubsystem and interfaced via LunosMusicInterface

  • This component actually plays back requested music via LunosMusicInterface:RequestNewMusic. It takes in a SoundBase soft ref, which should probably be a metasound (so parameters can be driven)
    • This function handles async loading of the track, as well as fading out any currently playing tracks (currently hardcoded to 2 sec fade)
  • All music automatically get sent some audio parameters, namely a bool for “underwater”
  • You can manually send a parameter via LunosMusicInterface:ChangeMusicVariation or LunosMusicInterface:SetMusicBooleanParameter. I’ll probably add more, but that is the paradigm.

BP_LevelMusicPlayer


This guy handles the requests for music IE sends the soft ref to the music player.

Overworlds


  • A BP_LevelMusicPlayer child is created for each level that contains the array of music to be played. Any specific rules are coded there.
  • So far the design is they play back an array of metasounds that can have layers
  • The tracks do NOT loop.
  • No music at night.

Dungeons


  • BP_LevelMusicPlayer could work, though it is currently coded to need a flag to be set. Don’t need that for dungeon…
    • Do we want an intro dungeon track? Maybe, though it could be part of the metasound instead
    • Let’s go simple. Should just work with an empty flag.
  • Music loops
  • No array, one track per dungeon
  • Any variations should happen via audio parameters / within the metasound