%% scale_length_2.txt
%% Created by Laurence D. Finston (LDF) Wed 13 Jul 2022 12:15:42 PM CEST
%% * (1) Copyright and License.
%%%% Copyright (C) 2022 Laurence Finston
%%%% You can redistribute this file and/or modify
%%%% it under the terms of the GNU General Public License as published by
%%%% the Free Software Foundation; either version 3 of the License, or
%%%% (at your option) any later version.
%%%% This file is distributed in the hope that it will be useful,
%%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%%%% GNU General Public License for more details.
%%%% You should have received a copy of the GNU General Public License
%%%% along with this file; if not, write to the Free Software
%%%% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
%%%% The author can be contacted at:
%%%% Laurence Finston
%%%% Laurence.Finston@gmx.de
\input eplain
\input epsf
\input colordvi
%% * (1)
\special{papersize=297mm, 420mm} %% DIN A3 Portrait
\hsize=297mm
\vsize=420mm
\advance\voffset by -1in
\advance\hoffset by -1in
\advance\voffset by 1cm
\advance\hoffset by 1cm
\advance\hsize by -1cm
\advance\vsize by -1cm
\parindent=0pt
\parskip=0pt
\headline={\hfil {\tt \timestamp}\hskip2cm}
\font\large=cmr12 scaled \magstephalf
\font\largebx=cmbx12 scaled \magstephalf
\font\small=cmr9
\font\smalltt=cmtt9
\pageno=-1
\begingroup
\advance\hsize by -3cm
\advance\hoffset by .25cm
\parskip=.5\baselineskip
\centerline{{\largebx Scale Length Generator 2}}
\vskip\baselineskip
\small
Copyright (C) 2022 Laurence Finston
\setbox0=\hbox{Last updated:\quad}
\leavevmode\hbox to \wd0{Created:\hfil}July 13, 2022
\leavevmode\box0 July 14, 2022 %% Updated
You can redistribute this file and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with This file; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
See the GNU Free Documentation License for the copying conditions
that apply to this document.
You should have received a copy of the GNU Free Documentation License
along with this file; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
The author can be contacted at:
Laurence Finston\hfil\break
{\smalltt Laurence.Finston@gmx.de}
\endgroup
\vskip2\baselineskip
\centerline{{\bf SEE FOLLOWING PAGE.}}
\vfil\eject
\skip0=10cm
\centerline{{\largebx Scale Layout Generator 2}}
\vskip1.5\baselineskip
\centerline{{\large Scale Length 66cm, 19 Frets}}
\vskip.75\baselineskip
\hbox to 0pt{%
%%
\vbox to 0pt{\vskip.5cm
\hbox to 0pt{\epsffile{scale_length_2_001.eps}\hss}\vss}\hskip\skip0
%%
\vbox to 0pt{\vskip.75cm
\hbox to 0pt{\epsffile{scale_length_2_002.eps}\hss}\vss}\hskip\skip0
\hss}
\vfil\eject
%% %% * (1) Quarter-tone scales
%% \centerline{{\bf Quarter-Tone Scale Layouts}}
%% \vskip.25\baselineskip
%% \hbox to 0pt{\hskip.5cm
%% %%
%% \vbox to 0pt{\hbox to 0pt{Scale Length 30\thinspace cm, 38 Frets\hss}
%% \vskip.5cm
%% \hbox to 0pt{\epsffile{scale_length_2_021.eps}\hss}\vss}\hskip\skip0
%% %%
%% \vbox to 0pt{\hbox to 0pt{Scale Length 35\thinspace cm, 50 Frets\hss}
%% \vskip.5cm
%% \hbox to 0pt{\epsffile{scale_length_2_022.eps}\hss}\vss}\hskip\skip0
%% %%
%% \vbox to 0pt{\hbox to 0pt{Scale Length 38\thinspace cm, 47 Frets\hss}
%% \vskip.5cm
%% \hbox to 0pt{\epsffile{scale_length_2_023.eps}\hss}\vss}\hskip\skip0
%% %%
%% %% \vbox to 0pt{\hbox to 0pt{Scale Length 30\thinspace cm, 21 Frets\hss}
%% %% \vskip.5cm
%% %% \hbox to 0pt{\epsffile{scale_length_2_024.eps}\hss}\vss}\hskip\skip0
%% %%
%% \hss}
\bye
%% using namespace std;
%% int
%% main(int argc, char *arv[])
%% {
%% printf("Entering `main'.\n");
%% float f = powf(2.0F, 1.0F/12.0F);
%% double d = pow(2.0D, 1.0D/12.0D);
%% long double ld = powl(2.0L, 1.0L/12.0L);
%% cout << setprecision(128)
%% << "f == " << f << endl
%% << "d == " << d << endl
%% << "ld == " << ld << endl;
%% // f == 1.05946314334869384765625
%% // d == 1.0594630943592953098431053149397484958171844482421875
%% // (length "1.0594630943592953098431053149397484958171844482421875") == 54
%% // ld == 1.05946309435929526452345450504566315430565737187862396240234375
%% // (length "1.05946309435929526452345450504566315430565737187862396240234375") == 64
%% // Emacs-Lisp 1.0594630943592953
%% return 0;
%% }
%% (length "0594630943592953")16
%% %% This is a bit more technical, in case anyone is interested in the
%% details (and doesn't know this already). %% The reason for using the
%% 12th root of 2 is in order to lay out a scale using equal temperament.
%% The reason for using the proportion 18/17 was because of the
%% impracticality of doing it using direct calculation or a better
%% approximation using the ratio of larger whole numbers before there
%% were pocket calculators and computers. Nowadays, of course, we can
%% let the computer do the calculations for us.
%% So, why did I use
%% 1.0595? Well, just in order to be able to use the values in the book
%% by Benade. It would have been just as easy to let the computer use a
%% better approximation. %% So, what would these approximations be? If
%% I evaluate the Emacs-Lisp expression (expt 2 (/ 1 12.0)) in an Emacs
%% buffer, I get the value 1.0594630943592953 with 16 places after the
%% decimal point. It might be possible to get more decimal places, but I
%% haven't bothered to look them up because Emacs-Lisp isn't really
%% letting me get "close to the machine". One way to do this is to use
%% the programming language C. %% In C, corresponding to the
%% possibilites the hardware has of performing arithmetic, there are
%% three kinds of "floating point" numbers for representing numbers with
%% places to the right of the decimal point. They are called "float",
%% "double" and "long double" and they have increasing degrees of
%% precision.
%% float f = powf(2.0F, 1.0F/12.0F);
%% double d = pow(2.0D, 1.0D/12.0D);
%% long double ld = powl(2.0L, 1.0L/12.0L);
%% cout << setprecision(128)
%% << "f == " << f << endl
%% << "d == " << d << endl
%% << "ld == " << ld << endl;
%% // f == 1.05946314334869384765625
%% // d == 1.0594630943592953098431053149397484958171844482421875
%% // (length "1.0594630943592953098431053149397484958171844482421875") == 54
%% // ld == 1.05946309435929526452345450504566315430565737187862396240234375
%% // (length "1.05946309435929526452345450504566315430565737187862396240234375") == 64
%% // Emacs-Lisp 1.0594630943592953
%% Laurence Finston Posts: 215 Joined: Sunday 22 May 2022, 14:05 pm
%% Location: Germany Contact: Contact Laurence Finston
%% Scale Layout Generator 2
%% Post by Laurence Finston » Sunday 10 July 2022, 13:21 pm After a
%% discussion about scale layouts on another thread, I had the idea of
%% programming a little scale layout generator, which I have now
%% done. This is a PDF file with examples of the results:
%% https://laurence-finston.de/graphics/scale_length_1.pdf This file,
%% along with the source code, is on this page:
%% https://laurence-finston.de/#Scale_Length_Generator
%% The basic idea is as follows: To generate a scale layout, you need the
%% length of the fretboard and the number of frets you want. For x >= 1,
%% if d_x is the distance from the previous fret (or from the nut for x =
%% 1), to fret f_x and d_x+1 is the distance from fret f_x to fret f_x+1,
%% then d_x / d_x+1 is equal to the 12th root of 2. This number is
%% irrational, so that an approximation must be used. This program uses
%% the value 1.05946314334869384765625, which has 23 places to the right
%% of the decimal point. It's the value of a 32 bit floating point number
%% with 24 bits for the mantissa, 7 for the exponent and 1 for the sign
%% (positive or negative). It is therefore quite a good approximation.
%% Apart from calculating the positions of the frets, the rest of the
%% program consists of drawing and labelling commands and some
%% housekeeping.
%% I plan on adding some more code to make it possible to do a complete
%% layout conveniently, and also to break up the layout so that the parts
%% fit on separate pages that can be printed out. Please note that it
%% could be used without any trouble for layouts with fan frets and/or
%% strings with different lengths.
%% This may not be of any interest to professional luthiers, but it might
%% be to amateurs or people who like to experiment.
%% Edit: After fixing a few errors, I think this is correct now.
%% Re: Quarter-tone scale layouts
%% Post by Laurence Finston » Wednesday 13 July 2022, 06:05 am
%% Laurence Finston wrote: ↑Monday 11 July 2022, 08:25 am The next
%% thing I'd like to try to do is to generate scale layouts for
%% meantone temperament.
%% I've looked into this and decided to put it off for the present, as it
%% opens up a whole new can of worms. Instead, I've made new versions of
%% the program and document, where I've added green dots and labels for
%% the positions of the pure intervals of the diatonic scale. Here are
%% the links again (they haven't changed):
%% https://laurence-finston.de/graphics/scale_length_1.pdf
%% https://laurence-finston.de/#Scale_Length_Generator
%% The labels are adjusted for the second scale on page 2. It would be
%% tricky to try to write a general solution for placing the labels in
%% good positions.
%% The figures now show clearly the relationship of the tempered
%% intervals to the corresponding pure ones. It's easy to see how far off
%% the thirds are, especially with increasing scale length. In addition,
%% these are positions of harmonics, not all of them necessarily
%% playable.
%% The proportions indicated in the labels, e.g., "3/2", "15/8", etc.,
%% refer to the ratio of the frequencies of the notes to the fundamental
%% tone. It was a bit tricky getting this to work in the program: While
%% the frequencies have these relationships, the distances from the frets
%% is different. It follows this pattern: For 3/2 (the fifth), it's 1/3
%% of the way from the nut to the saddle. For the 3rd (5/4), it's 1/5 of
%% the way and for the maj. 7th (15/8), it's 7/15. So, if the proportion
%% is a/b, the distance is (a - b)/a. For example, 15/8 --> ((15-8) = 7)
%% / 15 = 7/15. It took me awhile to figure this out.
%% Edit: I've added the percent change (delta x % = percent
%% change). Apart from rounding errors, they are the same for each
%% interval for all scale lengths.
%% Incidentally, this shows that the rounding errors that are the
%% consequence of limited precision floating point arithmetic are
%% significant. Multiplications and divisions will introduce them, as
%% will rotating points (which uses multiplication). These operations are
%% much more costly in computer time than addition or
%% subtraction. Multiplications can sometimes be implemented as several
%% additions. Nowadays, such optimizations may not be necessary, except
%% in special cases; no one will notice if they have to wait a nanosecond
%% longer for something. (I don't actually know if the difference lies in
%% the nanosecond range, but it's surely very, very small.)
%% Benade doesn't give any proportions for the chromatic
%% notes. Presumably, they don't have simple proportions using small
%% whole numbers.
\bye
%% ** (2)
%% * (1) Local variables for Emacs.
%% Local Variables:
%% mode:TeX
%% eval:(outline-minor-mode t)
%% eval:(read-abbrev-file abbrev-file-name)
%% abbrev-mode:t
%% outline-regexp:"%% [*\f]+"
%% auto-fill-function:nil
%% End: