Music and mathematics go hand in hand... and being an engineer just makes this relation clearer.
Having a strong background in mathematics makes some of the problems you find in music a little easier... like, wanna try me at intervals?
Then, I quit music (at least active playing to perform in public) some years ago but my brother is heavy on studying percussion at Maracaibo's Conservatory.
Yesterday he asked me to help him understand how to play a section of a two-voice piece for Marimba that had mixed measures.
In general, things like playing a binary measure along with a ternary measure (like eighths and eighths triplets) is not much of a problem.... but then you can get to face more complicated situations like the one he has facing. It was something like this:
Now, let me explain how you can mathematically (and reliably) go against this problem.
First, you have to study the voices separately and find the biggest measure that can break up all the notes of each voice and how many of each there are in the section you are trying to study.
For the upper voice, the biggest measure would be the half-note-in-a-tripplet and there are 3 of them in the section of our interest. That was easy.
For the lower voice, the biggest measure that can break up both eighths and quarters would be one eighth and there are 8 of them in the section of interest.
Continue doing this for as many voices as necessary but that's enough for our example.
Next step would be to find the Least Common Multiple of 3 and 8*. It's 24. This number will be the number of microbeats** you have to use at the same time for all voices involved in order to be able to fit all the notes in those two voices in one exact unequivocal fashion. Now you go back to study each voice separately based on the 24 microbeats for the whole section.
Upper voice has 3 half notes in a triplet so if you divide the 24 microbeats between the 3 notes this means each half-note will take up 8 microbeats so they will start on the 1st, 9th (1+8) and 17th (9+8) microbeats.
Lower voice length is made up of 8 eighths, remember? If the section we are studying will be measured with the same 24 microbeats, that means that each eighth in the lower voice will take up 3 microbeats (there are 8 eights in the section and so 24 / 8 = 3). Then that means that the first hit (remember it's a marimba) will be on the 1st microbeat, next on the 4th (1+3), quarter note starts on the 7th (4+3) microbeat and lasts for 6 microbeats, next eighths will start on the 13th (7+6) and 16th (13+3) microbeats and the final quarter note will start on the 19th (16+3) microbeat and will take up 6 microbeats which will complete the length we are studying.
So, having the upper voice written as an M and the lower voice as a B, the voices are played together like this:
M M M
B B B B B B
I bolfaced the bar's quarter beats to make it clearer. That will do.
Another example, in the Biguine Caline from Klaynjans' Suite Antillaise for Guitar (a suite that I definitely love) you get to see something like this (voices separated for clarity):
First voice, the biggest measure that can break it all up would the the eighth in a triplet and there are 6 of them in the section.
Second voice, the biggest measure that can break it all up would be the sixteenth and there are 8 of them in the section.
Now, the LCM for 6 and 8 would be 24 (again). So 24 microbeats it will be. Now, separate analysis again.
First voice has 6 notes the same length each in 24 microbeats. That's 4 microbeats for each one.
Second voice is 8 sixteenths in 24 microbeats, that means that it's 3 microbeats per each sixteenth and that means that the final resolution is like this:
M M M M M M
B B B B
That will do.
Hope it was clear enough.
If you think you've got it, try to break this problem:
M M M M
B B B
And if you nailed that one, then add another voice like this:
* as a matter of fact, you could use any other common multiple so you could just multiply them all but that will lead to higher numbers than necessary, like if you are working with 6 and 9 (too easy one example to try this method but the way to solve it still works this way) which will lead to 54 if you just multiply them but then 18 (their LCM) would have sufficed.
** microbeats will have a relation to a certain length for the section you are studying but that could be a little difficult to write on sheet paper (for example, here each microbeat will correspond to a tripleted sixteenth) so I'd recommend not to try to write it down in real music notation but keep it for your studying time.