I’m familiar with setting the tempo of a piece of adaptive music inside of an event, and then having that jump to different sections based on parameters.
What I’m wondering about is best practices at a level above that, meaning:
- Assume we have a game where ALL the music is in the same tempo and key, like 120 BPM and D minor/F major. The music has already been composed in those keys, so it leaves the tempo as the overall “clock” element. For historical inspiration, see Red Dead Redemption where it sounds organic and natural, but everything is tempo + keymatched.
- Say throughout the game, we want the “stems” to mix and match, meaning we might have different music events playing in any possible combination.
- Assume any new music events would start on a bar — intervals of 1/2/4/8 bars.
- There would also be “Intros” and “Outros” for the music that would be composed in full-bar segments and lead into and out of music, to provide clear punctuation (i.e., NOT just fade out), as well as transitions — think of a “1-bar whoosh riser” or “2-bar drumroll”.
- The music itself might start at off-grid times, meaning that it is NOT always playing throughout. But when it is, it’d be a combination of various events all playing at once.
- Assume that Unity scripts will be firing off various events, and the intent is to make them start “on the beat”.
So in short, what I’m asking to learn more about… what are recommendations for keeping everything in sync when the music IS going?
The two ways to get tempo synced transitions between sections of music is with Transition Regions and Magnet Regions. Essentially a transition region allows you to assign conditions to exit the region, and a magnet region allows you to assign conditions to enter the region- both of these have Quantization settings to allow these exits/entrances to occur in sync with the event’s tempo. Transition regions have the handy feature of displaying the quantization interval as green lines over the tracks, here you can see an event with two transition regions. The “To Marker B” section is quantized to a half note, and “To Marker B” is quantized to 1 bar:
By changing the “Section” parameter at the top, I can select which section of music will play, and the transition to each section will only occur on a half note or one bar respectively.
1 Like
@jeff_fmod I hugely appreciate you confirming this. I am familiar with these concepts within an event and your explanation refreshes my memory.
Is there anything at an above-event level that would keep multiple events synchronized?
Like for example:
- Say I have Event A playing at 120 BPM and Event B playing at 130 BPM,
- I could set Event A to be the “master” and have it match time
- Or if Event A and Event C are at 120 BPM, then I could have both start 8 bars in — like this?
- (Might be a case for nesting Event B as a referenced event inside of A, if no other elegant way exists?)
I understand if there are many logical complications with this. I’m conceptually thinking of something like Ableton Live’s Tempo Leader/Follower.
Otherwise, at some basic level, it seems like having code trigger multiple music events at the same time should generally sync them from the start of playback? (Any potential issues with this, like needing time to be cached so they aren’t off-sync by a bit?)
I think I see what you mean now- so not just keeping sections of an individual song in sync, but also keeping the transition to the next song in sync, or playing an event over the top of another event in sync?
We don’t have anything like a tempo follower currently. You could potentially implement a beat callback on your events, and use that to trigger the start of a new event in time with the the previous event. This will also give you access to the event’s beat properties, which you can use to determine the playback speed of your newly playing event. That would change the pitch of your new event though, so if you kept playing your old event as well, it would probably be dissonant.
Otherwise, using a master event as you mentioned would be the best way to keep multiple nested events in sync with each other.
1 Like
@jeff_fmod Yes these are definitely use cases I have in mind:
also keeping the transition to the next song in sync, or playing an event over the top of another event in sync?
Thank you for the pointers to “beat callback” and “beat properties”. Again, I am appreciative of your insights in understand the possibilities!
1 Like