Excellent, Thank you! Moving the Math.PI to the different part of the expression did indeed fix the problem I was having with the periods of the two expressions not lining up. However, I have noticed a new problem that I was unable to observe beforehand.
The part of the expression that counts the number of times the ball has bounced (this part:)
layer = effect("Control Layer")("Layer");
freq = layer.effect("Bounce Freq")("Slider");
numBounces = Math.floor(freq*(time-.5))+Math.ceil(freq/2);
doesn’t count correctly except when the Bounce Frequency slider is set to an odd whole number (3, 5, 7, etc). When set to an even number, the count goes up when the ball is at the highest point in its arc, instead of when it contacts the ground. Having a decimal value causes the same effect (ie, if the frequency is set to 3.25, the count will increment when the ball is 1/4 completed in its arc).
I’m again at a bit of a loss, so could someone help point me in the right direction? Thanks!