Using Single Event for Multiple Instances of Music

Currently working with a team of student developers on a smaller project. The team member responsible for connecting Fmod to Unreal is asking for all pieces of music (5 total) to be contained within a single 2D Event. Being that I am used to having isolated 2D Events for individual pieces of music, this seems strange to me. All of the pieces are using a vertical approach, so it is possible to have isolated sections with differing BPMs and markers. However, transitions are proving difficult to do smoothly due to everything being on the same event. What is the best solution to this problem? Thanks in advance.

It isn’t really a technical problem, nor an FMOD problem, it’s an musical and artistic problem: how do you want to transition between different music tracks. We can’t answer that question for you.
If you tell more about the style of the different music tracks and their purpose in game, we could at least give some hints on how we would approch this.

Many music tracks on the same event can be fun if you’re creating clever transitions between them as you might with an individual track. But something tells me your programmer might have different expectations of the most efficient ways to do things simply due to a lack of understanding of FMOD. What is their experience with game audio?

If you absolutely need to have them all playable from one event, there’s no need to rig them all up in one event. Nest them. You can still set up each track individually and not worry about their complexity, then transition among them in a new event by by nesting them in the new event. It will pass-through all your individual tracks’ parameters to the new event.

That’s why I said it’s a musical problem, not a technical one. Inside an unique event, you can nest whatever you want. The real question which will eventually remain is how you decide to transition between the musical tracks, which we can’t answer for you. But I maybe assumed erroneously your question was about that aspect.

I completely understand. We had originally structured the pieces so that they would fade in/out at transition points within the game (functioning as separate areas/levels). Since the style is entirely ambient and the music blends in with other background sounds, this was working fine. The issue is that we had up to this point been implementing the pieces on separate events for the engine to call for, which the dev was fine with. Only recently has he requested to have everything on one event, which would mean rewrites to every piece we have done in order to make these transitions work in a single 2D event. We are trying to avoid this if possible, or at least understand why he wants everything on one event. The dev has a little experience with Fmod, but I don’t believe he has a great deal. But, I am still learning as well. So I am wondering if there is a solution which I am simply not seeing. Our problem happens when using a switch parameter to move between markers set to different tempos for their respective pieces (vertically we have layers for each piece, horizontally we have separate pieces). We are using a parameter for intensity (number of vertical layers) and the switch parameter (for which piece in the event is selected horizontally). So, we need a way to control for the switch parameter changing horizontally while the intensity simultaneously changes back to 0 on the vertical. Otherwise we get a jerk when the switch changes the piece and the intensity remains at the previous level. Thanks for the tips.

So the behavior you want is that the current music ends at its current intensity, with a fade out, and the new track starts with a fade in at the lowest intensity. Am I correct? How is triggered this intensity parameter? Is it discrete or continuous? Do you use the seek speed? Would it be problematic that the parameter goes progressively back to 0 during the cross-fade?

But you’re right, using a common intensity parameter in one unique event may be tricky and not totally satisfying for what you want.

A not very elegant solution would be to use different intensity parameters for each music piece. But it would require the programmer to always know which piece is playing, to trigger the right parameter at the right time. So when finishing piece 1, “intensity1” will stay high when fading out, while “intensity2” will be set at 0 before fading into piece 2.

By the way, did you nested your different pieces into different nested events? If not, I think you should, it will be way easier to implement the vertical layering.

That’s correct. Intensity is continuous. And so far we have not nested, but we will do that next.

I think the idea of using separate intensity parameters is helpful, so we will give that a try. But you mentioned my exact point: it seems that placing everything in a single event either offers no help to the dev or actually makes things more difficult for them.

Yes, I think so indeed. It’s not complicated to stop an event and start another one. At the other hand, I personally like to keep things compacted in a very few parent events, because if gives me the control on how transitions are made, timings, etc… But that may be specific to our current project and this may not always be a good workflow in every case.

Agreed. We will try your recommendations and see if we can simplify the flow. If not, we will have to have a conversation with the dev (who is already aware that what they are asking is somewhat awkward in Fmod). Thanks again for the tips.

In fact, it isn’t awkward to have all the music on one unique event, if the music should play continuously. It’s the need for a unique parameter to have two different values at the same that makes it tricky.

By the way, instead of loops and transition regions, you should have a look to magnet regions, it would be perfect for your case.

Could you tell us why your developer needs the music to all be in one event? If we know what problem they’re trying to solve, we’ll be better able to suggest solutions.

That’s part of the issue as well. My partner and I have asked them several times to explain the reasons why so that we could better understand how to fix the situation, and the dev keeps being evasive and will not tell us why. At this point, both of us believe that this might be because the dev isn’t entirely sure themselves and thinks that having everything in one event will make it easier to program. In many cases, this could be true, but in our case it would probably be more difficult in the end for the programer.

Maybe they don’t want to manually program the cross-fades. Which they would probably have to do, since using AHDSR on those events would get an unwanted fade-in at the very first music, which you probably don’t want.

The way we were programing the music in separated events allowed for the XFs in Fmod itself, so I don’t think this was the issue. For example, the Intro is automatically a fade-in and the outdo is simply a switch parameter to move from the layers.

At this point, I don’t think there’s much more help we can give you. Alcibiade and magomusica have suggested some ways in which you could put all your music in one event - but we can’t tell you which way would be best suited to your project’s needs without more information about what those needs are.

Perhaps you should explain to your developer that if you don’t know the intended goal of putting all the music in one event, you may not be able to do so in a way that achieves that goal? Each of the possible methods suggested in this thread has its own strengths and weaknesses, after all.