I will try to keep this as math related as possible, though I intend to use this from a computer science standpoint. Hopefully you can forgive some of my annotations. Consider an ordered list of numbers D that represents audio recording data. That is to say that the only properties of this data are that it ranges from [-1,1] and it may be periodic (though there may be enough noise that this is not relevant).
Consider now a second ordered list P that represents a pattern that is searched for within the audio data. I believe this list has similar properties [-1,1] and it may be periodic.
In an effort to score how well the pattern matches at a particular point, let us create a third list, S. S will be a score used to determine both if there is a section of the audio data that matches the patten sufficiently and also which section matches most closely.
To calculate how closely one pair of data points matches up, we will use a simple scoring technique.
$$x = P(a) * D(b)$$
where a and b are arbitrary values.
To see how closely a section matches, we sum the scores for each corresponding pair of data points. That is, a section of length 5's score (z) could be written as:
$$z = \sum_{n=0}^4 P(a+n) * D(b+n)$$
where again a and b are arbitrary values. So moving on to the final definition. I will define the length of P as p and note that The entirety of the pattern list will be used in an effort to correctly match the desired pattern. Using this knowledge we can calculate scores for every position that the pattern window could be in. That is to say S(n) is equal to the score of the pattern window matched against the data starting at index n. More formally:
$$S(x) = \sum_{n=0}^{p-1} P(n) * D(x+n)$$
This generates my final list and arrives me to my final question. What is the most simple relation between $S(x)$ and $S(x+1)$ ?
EDIT:
Also, I understand it is a possibility that $S(x)$ and $S(x+1)$ are not related. If that is the case and you are sure of it, could you maybe provide a (very very informal) proof? Even if it just appeals to simple reason? I suspect the two are not related, but I have no way to prove it.
Thanks in advance! Any comments on how to improve the clarity of my question is very welcome.
They're generally not related. Consider the pattern $P = (1)$ and the data $D = (a, b)$. By picking arbitrary values for $a$ and $b$, I can make $S(1)$ and $S(2)$ as different as you like.
You may say "But that's a trivial example! I want something with LOTS of data!" Then consider $P = (1,0,1,0,1,0,1,0,...,1, 0)$ (total length $2k$) and $D = (a,b,a,b,a,b,\ldots, a,b)$. Now $S(x)$ is either $ka$ or $kb$, depending on the odd/evenness of $x$.
If you put some constraints on the data, like that it's amplitude- and band-limited in some way, as is the pattern, then there's probably some inequality limiting $|S(x+1) - S(x)|$, but it's hard to imagine it being very useful in what you're doing.
As a CS student, you might find Matlab's "conv" function useful here; there's also custom hardware that's been built to perform rapid convolutions (which is what you're doing with $P$ and $D$, up to a missing minus-sign).