Page cover image

🎼ReSound Module

Overview

The ReSound Module provides a clean and intuitive interface for music that interacts with the COZY ecosystem. Let your creativity flow with cleverly designed features. Easily tailor your soundtrack to your player's experience.

  • Play somber music during a midday rain shower

  • Switch to desert music when entering your desert biome

  • Play songs with soaring strings as your players look up to see a meteor shower overhead

  • Transition to tranquil music as the sun sets

  • Wake your players with happy music as the sun rises in the morning

Key Features

  • Extensive API functions for playhead management.

  • Play localized music based on biome, weather, temperature, time, and more.

  • Swap out setlists for a "streamer mode" that is DMCA proof

Profiles

ReSound DJ

Holds the global settings for ReSound. Place all of the available tracks here along with the settings that you want to use for transitions.

ReSound Setlist

References a local set of songs to be played by a ReSound instance (weather sphere or biome)

ReSound Track

Define an actual track to be played by ReSound. Can be linked with a single audio clip or a playlist of audio clips. Uses Chance Effectors and likelihood to determine how often and when tracks can be played.

API Reference

In order to use the ReSound Module in your C# scripts, first setup a module reference using this snippet:

ReSoundModule reSoundModule = CozyWeather.instance.GetModule<ReSoundModule>()

Play Track

Plays a specific ReSound track.

reSoundModule.PlayTrack(yourTrack);

Stop Track

Stops a specific ReSound track.

reSoundModule.StopTrack(yourTrack);

Skip

Skips to the next track.

reSoundModule.Skip();

Pause

Pauses the current simulation.

reSoundModule.Pause();

Play

Unpauses your ReSound module

reSoundModule.Play();

Shuffle

Plays and selects a random track

reSoundModule.Shuffle();

Play From Beginning

Plays the initial track. Good for restarting a zone's music after a cutscene.

reSoundModule.PlayFromBeginning();

Freeze for Time

Pauses and then plays after a determined amount of time.

StartCoroutine(reSoundModule.FreezeForTime(freezeTime));

Fade to Volume

Fades the master volume to a target over time.

StartCoroutine(reSoundModule.FadeToVolume(fadeTime, targetVolume));

Fade Out & Fade In

Fades the master volume to 0, waits for a determined amount of time, and then fades the volume back. Useful for jingles, and gameplay noises.

StartCoroutine(reSoundModule.FadeOutFadeIn(fadeTime, waitTime));

Last updated

Was this helpful?