Sample MetaSound to musically merge interrupted waves of different bar lengths

Here is a MetaSound for this use case:

Two wav files alternately play that are the same meter but different length, either may be interrupted by the other at any time. When interrupted (i.e., toggling the InCombat boolean), the one playing must finish to the nearest bar, and the one to be played must wait until the following bar without dropout or altering the meter of the song. The problem this solves is not having a song segment playing, stop on beat 2 and having the next start on beat 1. Trivial in procedural music, not as simple in composed music where tracks are varying lengths and using wave outputs and triggers can cause graph loops.

It shows a foundation method of building a non-procedural music manager for composers who still want targeted musical compositions for their characters and levels as we firmly do. I am showing it because I found no examples online that do this and it was a pain to visualize and make work without graph loops. A real theme manager would have 6 wave players and employ a trigger route (Int32,6) for measure counts, but that can’t be shown in a screen shot. The mentioned “6” comes from having idle intro and outro, combat intro and outro, then arrays of idle and combat themes. It’s far too messy to put in a screen shot. The sample version is already so messy it’s difficult to follow, the other is absolutely unreadable.

Just a method to think about if someone is thinking along the same composed music lines we are and concerned about the existing capabilities that support this being deprecated.

The Main MetaSoundSource

The Metronome MetaSound

Edit: In working with this, I realized that if someone does need this metasound, the metronome output trigger TrackCompleted does not work as expected. The track counter has to be driven by the Trigger Repeat instead of the trigger measure so it triggers prior to the end of the track. As this shows now, being driven from the measure reset, it will trigger too late and a track change based on reaching the end will not occur until the next measure. This is important working with an array of wavs that are to be looped which is why I noticed it. For a more musically oriented output, this Track Trigger counter should also start at 1 rather than 0 so any outputs would be in terms of music and not computerese.

1 Like