back to list

(no subject)

🔗Mckyyy@xxx.xxx

4/26/1999 7:34:53 PM

The tuning list has discussed various types of temperaments, and complex JI.
Euclid's algorithm and the multiplication inverse might be helpful in
understanding these systems of tuning.

When two tones are sounded simultaneously, they heterodyne. It is possible
to present what happens in a heterodyne chart. Below is a heterodyne chart
for 11/17. The heterodyne chart will be as long as the LCM of the two
numbers.

0 11
5 16
10
4 15
9
3 14
8
2 13
7
1 12
6

The chart describes the phase relationship between the period 11 signal and
the period 17 signal. Each line describes the start of new period 11 cycles
within a period 17 cycle.

BTW, I "invented" the heterodyne chart. Usually this subject is described as
the theory of rings. The principles are the same, of course, but I find the
heterodyne chart a little easier to understand. In this context, we will
assume that the two numbers used to make the chart are mutually prime.

Notice the following characteristics of the chart. Each of the numbers from
0 to 16 occurs in the chart only once. This means that the numbers one and
16 can only appear in the chart once. In this chart the one occurs at
location 14, and the 16 occurs at location 3. The location of the one is
called the positive multiplication inverse. 14*11=1 mod 17. The location of
the 16 is called the least negative multiplication inverse. In the context
of a 0-16 numbering, 16 can be viewed as -1. The positive and negative
multiplication inverses are complimentary with respect to the larger of the
two numbers used to make the chart. That is, 14+3=17.

The inverses can be used to find a best case approximation to the fraction
from which the chart was made. 11/17*14=9.058824 which tells us that 9/14 is
a pretty good approximation for 11/17.
The same can be done for the negative inverse telling us the 2/3 is also a
decent approximation for 11/17, but not quite as good as 9/14,

We can analyze musical intervals by iterating this procedure. Here are the
results for 12et done by starting with an approximation based on 5 decimal
digits. In each row, the first two numbers separated by a slash are the
interval. The third number is the LCM of the interval, and the third number
is a decimal representation of the interval. Subsequent lines are
successively less accurate approximations using smaller numbers.

B
18877/10000 188770000 1.887700
353/187 66011 1.887701
168/89 14952 1.887640
17/9 153 1.888889

A#
17818/10000 178180000 1.781800
3544/1989 7049016 1.781800
1723/967 1666141 1.781799
98/55 5390 1.781818
41/23 943 1.782609
16/9 144 1.777778
7/4 28 1.750000

A
16818/10000 168180000 1.681800
4186/2489 10418954 1.681800
37/22 814 1.681818
5/3 15 1.666667

G#
15874/10000 158740000 1.587400
1789/1127 2016203 1.587400
781/492 384252 1.587398
227/143 32461 1.587413
100/63 6300 1.587302
27/17 459 1.588235
8/5 40 1.600000

G
14983/10000 149830000 1.498300
3966/2647 10498002 1.498300
881/588 518028 1.498299
439/293 128627 1.498294
3/2 6 1.500000

F#
14142/10000 141420000 1.414200
239/169 40391 1.414201
99/70 6930 1.414286
41/29 1189 1.413793
17/12 204 1.416667
7/5 35 1.400000

F
13348/10000 133480000 1.334800
303/227 68781 1.334802
4/3 12 1.333333

E
12599/10000 125990000 1.259900
3277/2601 8523477 1.259900
509/404 205636 1.259901
223/177 39471 1.259887
63/50 3150 1.260000
29/23 667 1.260870
5/4 20 1.250000

D#
11892/10000 118920000 1.189200
44/37 1628 1.189189
19/16 304 1.187500
6/5 30 1.200000

D
11225/10000 112250000 1.122500
55/49 2695 1.122449
9/8 72 1.125000

C#
10595/10000 105950000 1.059500
552/521 287592 1.059501
89/84 7476 1.059524
18/17 306 1.058824

There are at least two possible versions of this series, the long version,
and the short version. I have shown the short version here. I believe that
is most appropriate, but I am not sure. I can change from the long version
to the short version by changing a > to a < in the line of code, where the
comment says, "make sure we have the smallest inverse" in the source given
below. Here is the long version for F#.

14142/10000 141420000 1.414200
13903/9831 136680393 1.414200
7071/5000 35355000 1.414200
6832/4831 33005392 1.414200
6593/4662 30736566 1.414200
6354/4493 28548522 1.414200
6115/4324 26441260 1.414200
5876/4155 24414780 1.414200
5637/3986 22469082 1.414200
5398/3817 20604166 1.414200
5159/3648 18820032 1.414200
4920/3479 17116680 1.414199
4681/3310 15494110 1.414199
4442/3141 13952322 1.414199
4203/2972 12491316 1.414199
3964/2803 11111092 1.414199
3725/2634 9811650 1.414199
3486/2465 8592990 1.414199
3247/2296 7455112 1.414199
3008/2127 6398016 1.414198
2769/1958 5421702 1.414198
2530/1789 4526170 1.414198
2291/1620 3711420 1.414198
2052/1451 2977452 1.414197
1813/1282 2324266 1.414197
1574/1113 1751862 1.414196
1335/944 1260240 1.414195
1096/775 849400 1.414194
857/606 519342 1.414191
618/437 270066 1.414188
379/268 101572 1.414179
239/169 40391 1.414201
140/99 13860 1.414141
99/70 6930 1.414286
58/41 2378 1.414634
41/29 1189 1.413793
24/17 408 1.411765
17/12 204 1.416667
10/7 70 1.428571
7/5 35 1.400000

I am uncertain which is the best representation for tuning purposes. There
appears to be some interaction with the other arbitrary decision I had to
make when writing this code, the error limit. I chose to abandon the loop
when the error of approximation becomes too great. I chose an arbitrary
limit of 2.5%, the "unit of perception" from psychology, which is the amount
of difference in most physical quantities it takes for a human two be able to
tell a difference. Others might choose a different threshold, or a different
way of measuring the error. Anyway, when I used the long series for the 12et
G, the loop dropped out before it got to 3/2, meaning the long series
meanders a bit from the straight and narrow, in some sense.

Certainly the larger LCM components of this series are not relevant from a
harmonic point of view as any interval with an LMC of greater than 1,000,000
will take longer than 2000 seconds to repeat at 440hz.

Can we hear these hidden simpler intervals within the more complex intervals.
Certainly we can in some cases, as the example 30001/20001 shows. Do we
hear the long series, or the short series? How much does the error
difference between the actual frequency being played and the approximate
interval matter? Is this whole line of inquiry useful?

Below is the source for the program I used to get the numbers listed above.
It is a console app written in Microsoft C++ 6.0. To keep the program short
I left out bells and whistles. For example, it will probably crash if the
input numbers are not mutually prime.

Marion

#include <stdio.h>
#include <math.h>
#include <stdlib.h>

#define MAXERROR 0.025
#define MAXLCM 1000

//find multiplication inverse
//function expects mutually prime positive integer arguments
double inv(double arg1,double arg2){

double sav[40];
int pSav=0;
double tmp,acc,prev;

//euclid's algorithm, saving products
while(arg2){

tmp=fmod(arg1,arg2);
arg1-=tmp;
sav[pSav++]=arg1/arg2;
arg1=arg2;
arg2=tmp;
}
//use products to compute multiplication inverse
acc=1;prev=0;
for(pSav-=2;pSav>=0;pSav--){

tmp=acc;
acc=sav[pSav]*acc+prev;
prev=tmp;
}
return acc;
}

double fint(double dat){

_asm{

fld dat
frndint
}
#pragma warning(disable:4035;once:)
}

int main(int argc,char *argv[],char *envp[]){

double arg1,arg2,rat;
double tmp0;

if(argc>2){

arg1=atoi(argv[1]);
arg2=atoi(argv[2]);
if(arg1<arg2){

tmp0=arg1;
arg1=arg2;
arg2=tmp0;
}
rat=arg2/arg1;
while(arg2>1&&fabs(1-(rat/arg2*arg1))<MAXERROR){

printf("%.0f/%.0f %.0f
%f\n",arg1,arg2,arg1*arg2,arg1/arg2);
tmp0=inv(arg1,arg2);
//make sure we have the smallest inverse
if(tmp0>arg1/2)
tmp0=arg1-tmp0;
arg2=fint(tmp0*arg2/arg1);
arg1=tmp0;
}
printf("\n");
}
else
printf("Usage: aprx <number> <number>\n"
"Finds approximations to fractions\n"
"Marion McCoskey, http://www.mckyyy@aol.com\n");
return 0;
}