# Tempo Change JND

## Craig Stuart Sapp <craig@ccrma.stanford.edu>21-27 Nov 2005

### Raw evaluation data

Data for 20 clicks starting at tempo 60 MM (1000 milliseconds between first two clicks):

Data for 10 clicks starting at tempo 60 MM (1000 milliseconds between first two clicks):

Data for  5 clicks starting at tempo 60 MM (1000 milliseconds between first two clicks):

Data for  4 clicks starting at tempo 60 MM (1000 milliseconds between first two clicks):

Data for  5 clicks starting at tempo 60 MM (1000 milliseconds between first two clicks):

### Examining the function of JND rate versus click count

Direct plotting of the data yeilds the following curve:

Taking the log of the JND fractions (on the vertical axis):

Taking the logarithm of both axes:

Since the number of clicks is greater than the number of tempo regions, subtract an offset before taking the log of the click counts.  An offset
of one converts the clicks into tempo regions (3 clicks = 2 tempo regions):

An offset of two removes the first click, and also removes the second click which describes the starting tempo, so an -2 removes the initial tempo from the display, and only counts the changing tempo regions.

Now examine the offset of -2 and compare to a straight line, since it is fairly close to a line:

All the points except for the 3-click point fall fairly well onto a line. Now find the click count offset value which gives the closest shape to a straight line:

### Calculating the absolute time difference at final click between constant tempo and changed tempo at the JND points.

Now calculate the difference between a steady tempo and a tempo increasing or decreasing at the measured JND rate:

Plot the slower tempo offset data versus the click count:

A parabolic cuve fits the data well with slight flattening at the bottom (cannot have a negative data point as the curve predicts on the far right). Anyway, it is not possible to go below 3 clicks for this type of test.

### Plotting final tempo for JND rate versus click count

If the number of clicks in the test data is 1000, then the predicted final tempo at the JND would be about 120 MM.  Since the starting tempo was 60 MM, it is probable that this estimate is too large.

Here is an extra line through the 10 and 20 click points just for reference:

### Calculating the ending tempos for various gains

Calculate the ending tempo at various gains for the 20 click sound example:

 0.006` 1.` 53.55371668398597` 67.26822169869433` 0.005` 1.` 54.5752931272792` 65.99525575016169` 0.004` 0.875` 55.617403123617265` 64.74762165935162` 0.003` 0.775` 56.680480466122475` 63.52479064745334` 0.0024` 0.85` 57.32857524721823` 62.802781879165856` 0.002` 0.625` 57.764968558307125` 62.32624548752664` 0.0015` 0.7` 58.315382881691285` 61.735921562354996` 0.001` 0.55` 58.87132063688926` 61.151480240927036` 0.0005` 0.575` 59.43284005236831` 60.57286000249439` 0.00025` 0.525` 59.71571125483737` 60.28571374859143` 0.000125` 0.475` 59.85767796924783` 60.142678280966656` 0.0000625` 0.5` 59.9287945117742` 60.0712945507391`

Calculate the ending tempo at various gains for the 10 click sound example:

 0.01` 0.95` 54.86038945439478` 65.68020490611973` 0.008` 1.` 55.84785036729118` 64.49799302960095` 0.006` 0.925` 56.85509949903696` 63.33937750017859` 0.005` 0.8` 57.36628082397302` 62.76875630665828` 0.004` 0.7` 57.88257392485845` 62.20384128301767` 0.003` 0.725` 58.40403508706613` 61.644569724596664` 0.002` 0.675` 58.93072127274045` 61.090879677682615` 0.001` 0.625` 59.46269012962301` 60.542709929777395` 0.0005` 0.525` 59.73067376435386` 60.270676239358636`

Calculate the ending tempo at various gains for the 5 click sound example:

 0.016` 0.975` 56.308818985050706` 63.99865643534871` 0.014` 0.95` 56.754386103715575` 63.48097531941137` 0.01` 0.8` 57.65882066896897` 62.461221341113` 0.008` 0.75` 58.11779409280578` 61.95902311303696` 0.006` 0.625` 58.58134349570579` 61.46186194796453` 0.004` 0.575` 59.04952373417988` 60.9696773410614`

Calculate the ending tempo at various gains for the 4 click sound example:

 0.025` 0.95` 55.71596465518493` 64.73473929095232` 0.02` 0.9` 56.539340072822675` 63.74894814235566` 0.015` 0.7868852459016393` 57.37901962446151` 62.78307153882485` 0.012` 0.8` 57.89082155381188` 62.21289578102335` 0.01` 0.725` 58.23540887565867` 61.836609127701884` 0.008` 0.875` 58.582736445548235` 61.46335092813266` 0.006` 0.675` 58.932831556680036` 61.093090776276746`

Calculate the ending tempo at various gains for the 3 click sound example:

 0.002` 0.575` 59.760718084788515` 60.24072192481154` 0.004` 0.6` 59.52286471643307` 60.48289543717038` 0.006` 0.6` 59.286428546020105` 60.72653223161909` 0.008` 0.7` 59.05139833711262` 60.9716441207076` 0.01` 0.6` 58.81776296441525` 61.21824303642485` 0.015` 0.65` 58.23970491882843` 61.84132546574248` 0.02` 0.625` 57.67012687427912` 62.47396917950855` 0.025` 0.775` 57.10886377156454` 63.11637080867851` 0.03` 0.75` 56.55575454802527` 63.768732065044105` 0.035` 0.8` 56.01064202198418` 64.43125989959461` 0.04` 0.775` 55.47337278106508` 65.10416666666667` 0.045` 0.95` 54.94379707424281` 65.7876702941257` 0.05` 0.975` 54.421768707483` 66.4819944598338`