Period of repetition
Previous Top Next


Period of repetition


Period-of-repetition is somewhat similar to the concept of a song motif in that it is a repeated unit; it is an estimate of the typical interval duration between two consecutive renditions of similar sounds. A song motif, however, may contain repeating sounds, so the two measures may differ (SA+ does not calculate motif duration -- only period). Earlier we presented the similarity score as a mean of evaluated similarity between two different sounds base on the Euclidean distance between their features. The same idea can be applied for finding similar sections within a single interval of sound (typically, a long one): We start by choosing a frame of sound (insert point) at a random location within an interval of sound outlined by the user and observe the features in a 70ms window around it. A 'silence' is not allowed to be an insert point. We first need to depart from the insert point by moving the window forward in time until we encounter sound that is different enough from the original sound to meet a similarity rejection threshold. The default value is 75% similarity. We then keep sliding the window until we find a sound that is similar to the insert point to meet a similarity acceptance threshold. The default is 95% similarity. To obtain a stable estimate of the typical period, SA+ examines a random sample of 50 random insert points, and measures the interval between each insert point and the next rendition of a similar sound. The output is the median of those measurements; that is, it is an estimate of the typical period of sound repetition. To obtain a good estimate of the time interval between two similar renditions you will need to outline a relatively long sound interval. We cannot tell you exactly how long the interval should be - but it should contain several renditions of syllables, e.g., 10s is reasonable for most bird songs. You can combine several song bouts into one file and then calculate the period. The stability of the measurements should be validated experimentally (e.g., try it on different samples of sounds and make sure that the results are similar).
To sum up:
Period= a typical interval between two occurrences of 'the same' sound, starting from a random insert point (anywhere in the outlined interval).

Here is the algorithm:

1.    Period is calculated by implementing the similarity measurement (see next chapter) as follows: Starting from a randomly selected frame within a 10s epoch, the time frame is first moved forward from the point of origin until it encounters a frame that is less than 75% similar to the sound at the selected frame, so as to depart from the original sound. The time window is moved further forward, until it encounters a sound that is at least 90% similar to the original frame. This gives an instantiation of the time elapsed between two similar sounds. This procedure is repeated 50 times, each time starting from a different randomly selected frame within the 10sec epoch, and the median of the durations thus identified is a measure of periodic structure in the song. We call this the median period.

Median period is calculated as follows:
1.    Choose a random insert point in a sound interval outlined by the user, and make sure that the insert point contains sound signal. Define a reference window r of 50ms time window around the insert.
2.    Set a similarity rejection threshold probability, say PTH=0.75
3.    Define a second 50ms time window b=r.
4.     Move b one frame forward in time.
5.    For each feature, calculate the Euclidian distance across the sequence of that feature in r and b, frame by frame, starting from the first frame f1 until the last frame fn:graphic
6.    Transform Ds to the p value of achieving such similarity by chance alone (for detailed description of this transformation see Tchernichovski et al. Animal Behaviour (2000) 59, 1167-1176).
7.    While (Ds>PTH) repeat steps 4-6. // Keep moving the window b until it is not similar to the r any more.
8.    Set a similarity acceptance threshold probability, say PTH=0.92
9.    While (Ds<PTH) repeat steps 4-6. // Keep moving the window b until it is similar enough to r.
10.  Period is the time difference between r and b.
11.  Repeat steps 1-10 50 times and calculate the median period.

 


In addition to the period measure, SA+ also calculates 'random period' measure: here instead of progressing from the insert until we find a match, SA+ makes a random search in the outlined interval, until it finds a matching sound. In the ideal case of fully periodic syntax, e.g., 2,3,4,5,2,3,4,5,2,3,4,5… and given an insert of 5, the odds of obtaining 5 in each random draw is 25%, and the mean random period is 4, which is identical to the period. However, if the sound syntax is 2,2,2,3,3,3,4,4,4,5,5,5,… then the random period will remain 4, but the median estimate of period will be much shorter than the random period. 

Note: both Period and Random-period are based on random sampling of the data, and will never give you the same answer twice. You must compute them several times and make sure that the estimates give you a stable central tendency.  
  

Created using Helpmatic Pro HTML