Change log for TemplateGen program:

01/17/2009 Made version 1.00 available. Baerwald only.

01/18/2009 Version 1.01
           Added this change log / readme file
           Reduced line width.
           Redesigned targets for both body and cantilever alignment.
           Forgot to update displayed rev- correct version posted 1/19/09
01/20/2009 Version 1.02
           Redesigned grid based on user comments
           Deleted or moved text
           Added umlauts to Lfgren
01/20/2009 Version 1.03
           Added Lfgren math and enabled selection
           Added Stevenson math and enabled selection
           Added a result display and cancel dialog
           Added some notes here
01/23/2009 Version 1.04
           Added command line override of plot x position for longer tonearms
01/25/2009 Version 1.05
           Added 45 RPM bar pattern to 50 Hz strobe disk
           Fixed text error on percentages on strobe disks
           Added more notes
01/26/2009 Version 1.06
           Renamed Baerwald to Lfgren A since he was first to publish
           Minor edits
02/02/2009 Version 1.07
           Improved math routines- no visible change to user
           Added automatic positioning to accomodate any arm length
           Extended arc line to accomodate compact 45rpm turntables
02/07/2009 Version 1.08
           Added spindle to pivot line and a few more notes
09/07/2009 Version 1.10
           Added offset angle to confirm box and printout
           Moved 200mm calibration lines in by 1mm to be sure they print on all printers
           Added 180mm mark on Y line for smaller paper sizes where 200mm gets cut off
09/08/2009 Version 1.11
           Made calibration lines start from the same point to reduce confusion
           Clairified description of measuring P2S distance
03/24/2010 Version 1.12
           Corrected small calculation error in Stevenson Offset Angle (doesn't affect template)
01/28/2012 Version 1.15 
           Added custom strobe, turntable ID and DIN/IEC suffixes to template printout
           Remaining issues to clean up include better text centering on custom strobe printouts
           and some error checking on text length
           More scale notes added on 2/5/2012
02/02/2014 Version 1.16
           Added target lines for front edge alignment and more notes.
08/06/2016 Version 1.18beta (1.17 was a special)
           Added linear offset data and sight line to arm pivot
08/06/2019 Version 1.19
           Removed sight line, added tic marks, let lines cross at 0,0
01/10/2021 Version 1.21beta
           Added command line background and line color selection- see note 14
01/13/2021 Version 1.22beta
           Added the color selection to the strobe disc routine

-----------------------------------------------------------------------------------------------

Note: The results from Lfgren A (Baerwald) and Lfgren B agree with John Elison's Excel
spreadsheet. They should, as the formulas are equivalent. The spreadsheet is extremely useful
in conjunction with this program and I strongly recommend you download a copy. The Stevenson A
formulas and results are consistent with the excellent Graeme Dennes paper, but I have few
worked examples and little experience with Stevenson alignments, so caveat emptor! This program
is limited to the specific alignments listed, however you can vary the results greatly by your
choice of inner and outer groove radii. Again, John's spreadsheet will prove invaluable for
determining the best choice of setup.
-----------------------------------------------------------------------------------------------

Notes (in no particular order):

1) The Prime Directive states that arc templates are best. Why? Because for a given tonearm,
   pivot-to-spindle distance (P2S), plus a choice of groove radii and optimization method
   (Lfgren A, Lfgren B or Stevenson A), there is only one effective length (EL) that will
   satisfy the equations and yield the distortion and tracking error they predict. Tracing an
   arc is the easiest and most certain way of insuring that the tone arm length/overhang is
   correctly set.

   The goal of this program is to allow anyone with a good printer and an accurate pivot-to-
   spindle measurement to make a customized arc template for their specific tonearm
   and table. If you disagree with the initial premise that arc templates are the only way to
   go, that's fine, but this program may not be your first choice of alignment tools. You are
   probably doomed to suffer with the back-and-forth trial and error methods of 2-point templates.

   The weak point of a 2-point template is that you're trying to establish a distance, the tone
   arm effective length (pivot to spindle, plus overhang) by exactly matching two angles. This
   method works great for surveyors with very precise transits, but fails miserably with short
   baseline (cartridge body or stylus) eyeball comparisons.

2) I measure my P2S distance using a block having known square sides (a machinist's "1-2-3 block"),
   and a thin 12" machinists steel rule. The block is placed up against the spindle, opposite the
   arm pivot. Because the top bearing circle of my arm is visible, I just measure from the face of
   the block, to the center of the bearing circle. I then subtract 1/2 the spindle diameter
   because the scale is measuring from the far side of the spindle, not the center. To restate,
   the P2S distance is measured from the rotating axis of the spindle, to the rotating axis of the arm
   pivot, the center to center distance.

   Sometimes you can't see where the bearing is. A cute way around this is to stick a
   piece of easily removable tape to the area over the bearing. Hold a fine tipped marker on the
   tape and move the tone arm over its arc. You may have to brace your hand so as not to move the
   marker while you do this. The bearing center will be in the center of the arc drawn by the marker.
   You should quickly find the location where the marker just makes a dot. Obviously this technique
   only works if the area above the bearing turns with the arm. Now use the block method and measure
   to the dot. When measuring P2S, be sure to keep the ruler level or you'll introduce an additional
   error.

3) The accuracy of the spindle hole is critical to maximize the accuracy of the template. It is
   recommended that you cut a square hole on, or a hair inside, the lines provided. Use a straight-
   edge and sharp hobby knife. You can reinforce the hole with tape prior to cutting, if desired.
   I prefer to put the tape on the bottom. The best paper to use is photo paper. There's less risk
   of the stylus catching on the smooth surface, and the paper is much heavier and more stable.
   You can also print on transparency material if desired and if your printer is capable of it.
   Though expensive, Mylar should have better dimensional stability than acetate.

4) Printout Accuracy: People obsess over this, and the hi-end (read expensive) template makers
   will tell you that paper templates simply aren't accurate enough. Obviously you do want the
   template to be as accurate as possible, but understand that there are many variables to
   aligning a cartridge and that template accuracy typically will NOT be the limiting factor.
  
   To the first order it makes sense to measure the longest X and Y distances possible, and then
   set the printer correction factors to make those distances as close as you can. This is far
   from the whole story, and in fact is NOT the best way. Paper changes size somewhat unpredictably
   as it passes through the printer, not to mention with temperature and humidity. Note that
   commercial printers (the people, not the machines) will condition their paper under controlled
   temperature and humidity for several days before running a job. If they didn't, all manner of
   alignment issues would arise.

   With our home printers there are usually feed issues, so the "mapping" of the image to the paper
   may not even be linear in both directions. All this sounds unmanagable, but these errors are
   actually far less of an issue than they might seem.

   Consider that the only part of the template that you actually use is a small part of the
   page, a rectangle of about 1.5" by 5.5". There is no giant compass inside the printer drawing an
   arc from the pivot point; the printer is purely a mapping device. Thus, the only area you care
   about is that 1.5" by 5.5" rectangle. As a thought experiment, imagine that the printer had some
   terrible non-linearity that divided the printout in half and moved the arm pivot mark three feet
   to the right. You'd cut out your (accurate) template on the left and it would still work perfectly.

   Since there will be second order non-linearities due to paper and feed issues, my current advice
   is to adjust the X correction factor using the new 100 mm tic mark at the top of the page, and
   the Y correction factor using the 180 mm tic mark at bottom left. That will insure that the area
   you care about is extremely accurate. If more distant points are off a bit, ignore them. There
   is also a new 100,100 crosshair you can check, but don't obsess over it or any points beyond
   that. It's much more important that your INR, ONR and overhang distances are correct. If they're
   correct, the radius arc will also be correct. Remember, optimizing the whole page, rather than
   the area you're going to use, will generally REDUCE accuracy, not increase it!

   Based on overlaying some CAD produced templates having known scale errors, a couple "rules" can
   be suggested. First, try to get the scale within 1%, 99 to 101 mm on the 100 mm marks. This
   should be very easy with most printers, often without touching the printer correction factors
   at all. Second, use the inner target. The inner target will be less affected by errors of scale
   than the outer one. With 1% error, you will still be within 0.15 degrees of the correct offset
   angle, and obviously within 1% of the correct overhang. It should be reasonably easy to do better
   than this, at which point your ability to align the cartridge to trace the arc and align to the
   target will be the limiting factor, if not the construction and alignment of the stylus tip and
   cartridge components themselves. 

5) The first goal is to adjust the cartridge position such that the stylus traces the arc on the
   template. (Just set the stylus down gently at several points. Never slide the stylus on the
   paper!)

   Do not attempt to point the spindle-to-pivot line at the pivot. This will happen naturally as
   you trace the arc and with far more accuracy than any visual attempt to do so. Use it as a
   starting point if you like.
   
   If the stylus is placed on the arc near the edge of the platter, but is then short of the arc
   near the spindle, move the cartridge out. If it's placed on the arc near the edge, but is then
   over the arc near the spindle, move the cartridge in towards the arm pivot. (somebody check
   this- I'm never sure) At any rate, by moving the cartridge in and out you should quickly reach a
   point where the stylus falls almost exactly on the arc at any position.

   Finally, use a piece of tape or small rubber wedge to keep the platter from rotating. Fine tune
   the cartridge position as perfectly as you can get it. A few tenths of a mm is the maximum error
   you should allow. ***Be sure to disable your anti-skating mechanism or set it to zero.***

6) When the stylus traces the arc exactly, align the cartridge to the inner grid. The grids as of
   version 1.02 have close double lines for those who like to align the cantilever, rather than
   the cartridge body. There is a center line plus a perpendicular line is provided so the eye
   isn't fooled by the angle of the arc within the small circle. Note that the eye is very
   good at placing a line (or cantilever) at the exact center and parallel between two lines,
   much more so than if a single line is used. Please read my comments on cantilever vs.
   cartridge body alignment at the end of these notes.

   Sometimes visibility is limited and you just can't tell where the cartridge is. There are
   additional lines on the target to align the front edge of the cartridge. If you can stick
   something to the front edge of the cartridge to increase the sight line it will improve the
   accuracy. I've seen mechanical pencil lead suggested, with a piece of double stick tape. It's
   small, light weight and generally very straight.

   Tapered body cartridges like my Ortofon are difficult. I add small vertical pieces of paper
   to the target at the rear of the cartridge so I have a small channel or window to center the
   body against.

7) Lfgren and others provided a philosophy for the best way to reduce errors. Their methods do
   *not* generally give you specific null points (or anything else). The null points will be
   determined by the inner and outer groove radius chosen, along with the P2S distance. It's
   strongly recommended that you research cartridge alignment on-line, as there's a huge amount
   of information (and mis-information) that would be impractical to cover here. This programs
   claim to fame, aside from being free, is the rearrangment of the formulas to use inputs that
   can be physically measured, and to produce a suitable template without having to resort to
   CAD or a drawing board.

8) Remember that this program writes to the printer driver. That means you can create various
   types of files, as long as a Windows printer driver exists for them, or as long as a
   conversion utility exists to get from an available file type, to the desired file type. This
   may be useful if you want to have the pattern etched or otherwise reproduced on a more stable,
   mirrored or otherwise different substrate.

9) The printer correction factors can be adjusted to give egg shaped strobe targets, but no
   practical use for them has yet been discovered. The printer correction factors are just that-
   factors, i.e., multipliers. If you set them to 0.5, the printout will be half size. If you
   measure a 200 mm reference line at 198 mm, set the correction factor for that axis to 1.0101
   (200/198). It may take several iterations to get a perfect printout, as sheets of paper tend
   to react slightly differently on their way through most printers.

10) This program contains essentially no error checking. If you enter numbers giving impossible
    geometry, it could crash. Don't do that. Actually, no reports of crashes have been received.
    The custom strobe text is limited to 35 charactors- don't exceed that. The template ID is
    limited to 39.

11) Manual shifting of the printout is no longer included. The program will now automatically
    place the grids regardless of arm length. Arm lengths that kiss the edge of a 45rpm record,
    about 88mm, to the 1 mile long very low error arms built by Loof Lirpa, about 1609344mm, will
    give correctly printed templates and can be aligned to perfection.
 
12) Cartridge alignment is always risky. Use extreme care not to bump the template with the
    stylus in contact, lest it be bent or broken. The stylus, not the template. You can always
    print another template. Until 3D printing improves, you can't print another stylus. Use
    caution not to snag or pull fragile wires. Only attempt alignment in a distraction free
    setting and with a clear understanding of what you are trying to accomplish. Again, no
    liability of any type is assumed from use of this program.

13) Version 1.18 includes the linear offset and a sight line at the top of the page. If you have
    a way to do it accurately, thread around pivot perhaps, you can use the template in the same way
    as the Geodisc(TM) and similar devices do. This is useful if the pivot to spindle distance isn't
    known accurately, or for arms where the distance varies like an SME. If you enter the pivot to
    spindle distance accurately, using the arc will give the best results. Since the grids are always
    located at the null points, you can always use the template as a 2-point type. As with all 2-point
    types, you'll have to rotate the platter as you go between grids, though less than most if the
    pivot to spindle distance is anywhere near close. If you want the template to look like a standard
    2-point type just enter a very large pivot to spindle distance, say 200000.

    A quick summary-
    
    a) If you can measure the arm pivot to spindle distance, enter that and use the arc as the template
       was intended. Align the cartridge to the inner grid only. This is the most accurate method.
    b) If you're a glutton for punishment, the grids are always at the null points and you can use the
       template as a 2-point template, ignoring the arc and regardless of what pivot to spindle distance
       was entered. This is as good as any 2-point template. If you want the grids in line, like most
       2-point templates, enter a very long pivot to spindle distance, say 200000.
    c) If you like the way the Geodisc(tm) does it, you can use the angled sight line at the top of the
       template to point to the arm pivot. Align to the inner grid only. Like the 2-point method, the
       pivot to spindle distance is not important, though it makes sense to enter something close.
    d) If you entered an accurate pivot to spindle distance, all three methods will agree!
	
14) You can change the line color and background color on the command line. We'll assume you've created
    a program shortcut. Right click on it and edit the program line. Put one space after the final quote and
    then the six RGB numbers, separated by commas. "C:\blah\blah\TemplateGen_1P22.EXE" 255,255,0,0,0,255
    for yellow lines on a blue background. First three numbers are RGB for the lines, second three are RGB
	for the background. Plain paper will have poor contrast with colored backgrounds though lines may be
	OK if you only color those. Hint- use the color picker in Excel or other programs to find RGB values
	you like. Use glossy photo paper for brighter colors. Hey, go to town; it's your expensive ink. This
	is new so it might have some bugs- please let me know.	

15) This is a work in progress. I tend to upload small changes frequently so it always pays to
    check the website for the latest version. http://conradhoffman.com



                            Cantilever vs. Cartridge Body Alignment

Advanced practitioners of the art will invariably align the cantilever to the grid, not the
cartridge body. In a perfect world the diamond would be perfectly aligned to the cantilever, and
the cantilever would be perfectly aligned with the body of the cartridge. Further, the internal
coils would be electrically aligned to produce the correct signals when the physical alignment
was correct. Friction and compliance wouldn't be issues. The two methods would give equivalent
results. Unfortunately the situation is complicated and neither method is without problems.

Remember, the goal is to have the cantilever correctly aligned while playing a record, not sitting
on an alignment template. Read that again- it's important!

If you align the cartridge body, you have to accept whatever manufacturing tolerances exist in the
alignment of both the diamond and cantilever. In addition, you have to accept whatever deflection
occurs during actual playback due to forces from the anti-skate mechanism and groove friction,
that differ from the static situation during alignment.

If you align the cantilever, the above mentioned deflection during actual playback must be
considered, along with an additional error source. As the arm is lowered to the template, the
angle between the cantilever and arm becomes smaller. That increases the effective length of the
arm. Not a lot, and not worth measuring, but enough to place an unrelieved axial force on the
cantilever. Because the arm pivot isn't in line with the cantilever, the cantilever will likely
be pushed sideways in relation to the cartridge body, typically towards the spindle side of the
body. This occurs every time the stylus is brought down on an alignment template.

If the template is smooth enough to allow this without stylus damage, the platter can be rotated
by a fraction of a degree to examine the effect under magnification. Typically you'll see the
cantilever moving from side to side as small forces are applied to the platter. The lower the
friction of the template, the better the situation should be. Because the cantilever is short,
seemingly small error sources can result in surprisingly large angular alignment errors.

It makes a certain amount of sense to align high compliance cartridges by the cartridge body, if
it has parallel sides or especially if it has a short or hard to view stylus. Tapered bodies are
more difficult, and it may be easier to align using the stylus if it can be kept at the same
angle/location that it occupies during actual record play.

Low compliance cartridges can be aligned using the stylus rather than the body, but one
shouldn't be deceived that far greater accuracy is being obtained.

The bottom line is that every system is different. It's up to you to evaluate the error sources and
choose the method having the least uncertainty.

What alignment to choose? Unless you want to make a research project out of it, or unless your arm
won't physically allow it, go with Lfgren A and the DIN groove dimensions. That's probably worked
successfully for more people than any other. If the slots aren't long enough, get a different head
shell or settle for Stevenson.

Stevenson is often suggested to cure inner groove distortion problems but in my opinion inner groove
distortion is more likely the result of physical arm problems (stiff bearings, binding/pulling wires
or other alignment plane issues) rather than an alignment strategy issue.

*******************************************************************************************

           