Short version, I need to find a regression to this: a &#x2261;<!-- ≡ --> t <mspace widt

Paul Webster

Paul Webster

Answered question

2022-06-04

Short version, I need to find a regression to this: a t ( mod Δ ), a and Δ are the unknowns constants.
Any idea where I should start looking?
Some context, because I may be wording it in a confusing way: I am trying to find the tempo of time-stamped events t i for some real time musical analysis. They have a typical interval of Δ, but there isn't an event at every "tick", so no linear regression, and there may be more than one event for a given "tick". In other words, t n + 1 t n may be 0 or any m Δ.

Answer & Explanation

Morisio64moc

Morisio64moc

Beginner2022-06-05Added 7 answers

It sounds like your problem would benefit from Fourier analysis more than any sort of regression model.
Given that the events are discrete, you could use j = 1 n e 2 π i t j p to get the "Fourier transform" F ( p ) of your samples, where p is the period, or "tick interval", you're testing for. Even with some random dispersion, if your points are more or less regularly spaced at integer multiples of an interval Δ, you'd see a spike in magnitude at p = Δ, with smaller spikes at p = Δ 2 , Δ 3 , Δ 4 , etc.
As an added bonus, since F ( p ) will be a complex number, the argument of F ( Δ ) at the peak magnitude would also give you an estimate of the value of a.
One thing to watch out for is that you shouldn't try to test values of p greater than the total length of the music itself, because then the values will tend toward a maximum just due to the angles of the samples being squished close to 0, and that's not the kind of spike you're looking for.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Inferential Statistics

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?