EPS for JI

Encapsulated PostScript programs to explore musical scales in Just Intonation

  • Introduction
  • the PostScript language
  • the EPS files

  • Introduction

    In the course of my music theoretical explorations, I have found certain graphical representations helpful in understanding scales and tunings in just intonation. And after I realized that PostScript was a general programming language capable of generating high-quality resolution-independent graphics on a wide variety of platforms, I taught myself enough to develop these Encapsulated PostScript graphics. Each one represents a particular graphical idea, and the file can be easily modified to change the scale and/or many style options (in the "USER SETUP" section; see the Variations for examples of the ease of editing). The resulting EPS graphic can not only be printed on any PostScript printer (or other printers using "Ghostscript"), but can also be imported (and resized if necessary) into many graphics, page-layout, and word-processing programs, for incorporation into other documents.

    My intention in making these EPS files available is that, if you are interested, you can download them and modify them to suit your needs. However, I make no guarantees as to suitability for any particular purpose, and assume no responsibility for any consequences of using these programs. But hey, they work for me...

    the PostScript language

    PostScript (a registered trademark of Adobe Systems Incorporated) is a "page description language" but it is also a programming language. PostScript files consist of ordinary (ASCII) text characters. You can edit these EPS files with any text editor or word processor, provided you save them as plain ASCII text and use the .EPS file extension. Then view the results, for example by using the free software "Ghostscript", available from the "Ghostscript, Ghostview and GSview" site. The Ghostscript site has many links to other resources, including tutorials on PostScript; one particularly good one is A First Guide to PostScript.

    You can use these examples without knowing much of the PostScript language, but you should at least know some of the syntax conventions. The following characters are special in PostScript:

    %
    means the rest of the line is a comment (not page description); useful to "comment out" unneeded code
    /
    names are preceded by a slash (to define them; no slash to use them)
    ( )
    character strings are surrounded by parens
    [ ]
    arrays are surrounded by square brackets
    { }
    executable modules are surrounded by curly braces
    < >
    hexadecimal strings are surrounded by angle brackets
    Spaces, tabs, and line returns are equivalent, and any extra ones are ignored, so you can add spaces or blank lines for legibility. Beware that all the built-in commands in PostScript are just words, and if you inadvertently redefine one, the file may not work. In particular, "scale" is a built-in operator, so don't use it as a name. Also, "true" & "false" are the logical constants, useful as on/off switches.

    What makes the graphic "Encapsulated" is a set of special comments that start with %%. One essential one is the "%%BoundingBox" line, which specifies the coordinates of the lower left and upper right corners of the graphic. In most of my EPS files there is a place in the "user setup" to specify the bounding box, and these same numbers must also go on the "%%BoundingBox" line at the top, so that the graphic can be correctly imported and sized in other applications. (The unit of length in PostScript is a "point", where there are 72 points per inch.)

    the EPS files

    For each, click on the thumbnail image to see a full-size image; click on the filename to download it. (For some, you can also see a "Variation" that shows the explicit changes to the file that give a completely different result.)

    sclmat sclmat.eps : Scale Matrix -- shows every interval in a scale in matrix form, where row m is the scale tones relative to tone m, and column n is tone n relative to all the other tones. (Also see Variation.)

    scale scale.eps : Scale Slide-Rule -- shows a scale as horizontal lines, acoustically spaced. This is intended to be printed as a full page, cut in two pieces, folded & interlocked, so that any two intervals in the scale can be compared visually (by sliding one by the other). Optionally includes an equal-tempered scale for comparison. (Also see Variation.)

    lattice lattice.eps : Harmonic Lattice Diagram -- shows the harmonic structure of a scale by links for each prime harmony. (Also see Variation.)

    lattica lattica.eps : Harmonic Lattice Diagram, Advanced -- shows the harmonic structure of a scale by links for intervals that you specify (so can handle triangular lattices, for example), with the option of showing each link in a specified line style; also can specify names for notes in scale. (Also see Variation.)

    harmel harmel.eps : Harmonic Melodic Diagram -- shows the harmonic structure of a scale by links for each prime harmony, oriented so the vertical axis is pitch. (See my article "Harmonic Melodic Diagrams" for more info.) (Also see Variation.)

    harmela harmela.eps : Harmonic Melodic Diagram, Advanced -- same idea as "harmel" above, but more general: scales need not repeat each octave; uses links for intervals that you specify (so can handle triangular lattices, for example), with the option of showing each link in a specified line style; also can specify names for notes in scale. (Also see Variation.)

    dofrets dofrets.eps : Fret Layout on Fingerboard, Basic -- this version takes a scale and a string tuning, and generates all the frets.

    frets frets.eps : Fret Layout on Fingerboard, General -- this version requires all the intervals for frets on each string, thus can handle more general situations than "dofrets" above.

    refrets refrets.eps : Fret Layout on Fingerboard, Retuned -- like "frets" above, but designed to see what happens when you retune the strings.


    NOTE: All software made available through this page and subsidiary pages is supplied on an "as is" basis, with no warrantees of any kind. The author bears no responsibility for any consequences of using this software.

    last updated 2000 Feb 6

    David Canright -- DCanright@NPS.edu