! scales.pcm ! comparison of the tunings of different temperaments clear defaults set font triumf.2 label\x `Semitone index, from C ("do")' label\y `Mismatch from ET12, Hz' legend on legend frame 18 65 75 95 legend frame off legend nsymbols 3 set %yuaxis 95 scales -1 13 12 -6 10 3 set yvmin -5 set xvmin 0 set xvmax 12 set nsyinc 5 set lintyp 9 set %charsz 1.5 w0=440*16/27 ! for A=440=27/16 * C ! 12-tone equal temperament is simply 2**(j/12), j=[0:11], per octave ! Pythagorean temperament, where "fifths" are 3:2 ratio, instead of 2**(7/12) !!xp=[1;2187/2048;9/8;19683/16384;81/64;177147/131072;729/512;3/2;6561/4096;27/16;59049/32768;243/128] j=[0:12] xx=mod(7*j,12) xx[13]=12 xp=(3/2)**j / 2**int(7*j/12) xp[13]=xp[13]+1 sort xx,xp set pchar 9 graph `Pythagorean 3:2 fifths' j,w0*(xp-2**(j/12)) ! Pythagorean circle of fifths does not close, "hide" the gap between Ab and G# ! repeat the j=8 value, showing both ends of the "Pythagorean comma" j1=[0;1;2;3;4;5;6;7;8;8;9;10;11;12] x1=[0;7;2;9;4;11;6;1;8;8;3;10;5;12] xpc=[1/1;3/2;9/8;27/16;81/64;243/128;729/512;2187/2048;6561/4096;128/81;32/27;16/9;4/3;2/1] sort x1,xpc set colour 5 5 set pchar 5 graph `Pythagorean comma between Ab and G#' j1,w0*(xpc-2**(j1/12)) ! Meantone (thirds are 5:4 ratio) jmt=[0;2;4;5;7;9;11] xmt=[1/1;sqrt(5)/2;5/4;2/5**(1/4);5**(1/4)/1;5**(3/4)/2;5**(5/4)/4] set pchar 11 set colour 2 2 graph `Meantone 5:4 thirds' jmt,w0*(xmt-2**(jmt/12)) ! Just intonation xj=[1;9/8;5/4;4/3;3/2;5/3;15/8] set pchar 13 set colour 3 3 graph `Just intonation' jmt,w0*(xj-2**(jmt/12)) ! Brokaert's "PBP" reconstruction of the Bach's Well-Tempered Clavier temperament jb=[0:11] xw=[1;1.0535;1.1194;1.1852;1.2504;1.3333;1.4047;1.4978;1.5802;1.6731;1.7778;1.8729] set pchar 15 set colour 4 4 graph `Well-tempered (Brokaert)' jb,w0*(xw-2**(jb/12)) replot