I am making an experience in UE5. It is basically a small ensemble of 4 musical instruments surrounding the player. The idea is that the player may click on the individual instruments to make them play sound (audio will also be localized (spatial), ambisonic). The issue is, as they will be playing a piece of music, they all need to play simultaneously.
I thought the easiest way to accomplish this would be to have all the instruments actually playing when the experience starts, though they will be muted. When the player clicks on the instruments, they unmute (fading in) and when they click on them again, they will mute. This way, I am assured the piece of music will continue to play appropriately in sync when the different instruments play (are un-muted).
Is this a viable way of tackling this problem? I’m sure there are other, more realistic and complicated ways of doing this, but as this is my first project in Unreal, I’d like to keep it very simple. Any insight would be greatly appreciated.
Hey there! That sound like a cool project! I think the implementation will be dependent on the goal for the player. Do you want them to feel like they’re performing that instrument or is it more of a mixing desk.
I have done a similar implementation of audio where everything is always playing and I just lerp the volumes to crossfade fairly dynamically in instances where players could change between BGM states unexpectedly. Your idea would definitely work in that sense. It may change the effect to be more of an ambient/vibe kind of mood since tracks might come in mid phrase and not feel like the start of a phrase.
The other option in my mind is to just fully utilize Quartz subscriptions to keep everything in time. You can then do checks based on what beat it is to start on the correct beats, or if you want it to play instantly, make a catch to correct the measure and line things up via a transition phrase or some math and various starting beat triggers.
I feel like my Quartz explanation was bad but I kept getting various ideas so sorry if that wasn’t clear haha! TLDR: Your muted idea will work and be fine but making a nice Quartz system will likely be more engaging and interesting.
Thank you so much for the response. Quartz idea sounds great but as this assignment is due in a few weeks and this is my first time making any sort of experience I think I need it to be as simple as possible. You are right in that it would be more like they are mixing rather than playing but I am ok with that. Do you have any links to tutorials or projects where this is done so ai could try to do it with my project?
I have a walkthrough of my system that is similar (3 parts always live), most the control ends up being triggering float parameters to change the output gain:
There are quite a few other resources, Quartz is honestly not super complicated to use if you’re not trying to dynamically change parameters, so I would suggest at least playing around with it afterwards! Brian Michael Fuller has a ton of great beginner guides and that’s what I followed to learn the initial set up process:
PS. I hope I’m allow to be posting links, sorry if I’m not! Good luck!