💾 Archived View for runjimmyrunrunyoufuckerrun.com › src › foreign › pmw › contrib › TAB captured on 2021-12-17 at 13:26:06.
-=-=-=-=-=-=-
@ This set of macros shows one way of causing PMS to print guitar @ tablature. The example is for a 4-line bass guitar stave; a similar @ approach can also be used for a 6-line stave. This is a complete @ PMS input file that can be processed and printed, to show how the @ macros are used. PMS version 3.10 or greater is required. @ Philip Hazel, June 1994. @ Looks good at this size magnification 1.1 @ Define some additional fonts. Homerton.Bold is used for the numbers @ printed on the tab stave, and Homerton.Medium is used for the TAB logo. @ Also define the required font sizes. The numbering size, 5.5, seems @ small, but the whole stave is to be magnified (see stavesizes below). textfont extra 1 "Homerton.Bold" textfont extra 2 "Homerton.Medium" textsizes 10 5.5 17/0.8 11 @ This draws the "TAB" logo, consisting of overlapping T, A, and B @ characters. The T and the B are printed as characters, with a single @ stroke to complete the notional A. All dimensions are multiplied by @ the relative stave size, so that it should work for any size of @ 4-line stave. Note the use of s3 and s4 to obtain fonts of the right @ size for the T and the B. draw tab stavestart 2.0 stavesize mul add 0 moveto "\x2\T"/s3 show stavestart 4.7 stavesize mul add 0 moveto "\x2\B"/s4 show stavestart 6 stavesize mul add 12 stavesize mul moveto 6.5 stavesize mul -7.5 stavesize mul rlineto 1 setlinewidth stroke enddraw @ This set of macros is used to print numbers on the stave. Each macro's @ name starts with a letter identifying the note length, and a number @ identifying the stave line, counting from the bottom. The argument is @ the digit to be printed. Macros for crotchets, minims, and quavers are @ shown here - other note lengths can be handled similarly. The effect of @ each macro is to print its argument, centred on the appropriate line, @ and then move on, by way of an invisible note of the right length.