Doremi is a music playing system for Unity games that makes it easy to include seamlessly-looped music with multiple variations. You will need to download DOTween in order to use Doremi (which you should have anyways, it's great!)
Doremi is very much a work in progress. It may well have some bugs and issues. If you find any, please report them so we can fix them (or fix them and make a pull request)!
- Attach a
DoremiPlayercomponent to a Game Object in your scene. - In your Project view, create a new
DoremiMusicasset via "Doremi Audio Engine > Multichannel Loop". - Place the
AudioClips of the variations for your track in theAudioarray. - Set
Loop Start Samplesto the sample point in your music where the loop should start, and setLoop End Samplesto the sample point in your music where it should return to the loop start point. - Call
DoremiPlayer.Play(DoremiMusic)with yourDoremiMusicasset to make your music play!
Begins playback of the DoremiMusic asset track, defaulting to variation 0.
Stops playback, losing the music's position. In order to resume playback, you must call Play(), which will start the music from the beginning.
Pauses playback. The music's position is not lost, so you can call Resume() to resume playback from this point.
Resumes playback from the point where it was paused.
Sets the song variation channel to volume over the course of duration seconds.
Fades the music to a volume of 0 over the course of duration seconds.
Returns the current position, in samples, of the music. Note: While it is possible to modify this value in order to "seek" through the music, this is not stable and should not be used.
Returns the normalized current position (where 0 is the beginning of the music, and 1 is the loop end point).
Returns true if the music is currently in the loop portion, and false otherwise.
Setting this property will set all variations to a volume of 0 except for the variation specified, which will be set to a volume of 1.
Contains the AudioClips for each variation of the music track.
The point in the music, in samples, where the music should loop back to the loop start point.
The point in the music, in samples, where the music should loop back to, when the loop end point is hit.
