muscript.ps


NAME

      muscript.ps - Some procedures for drawing musical symbols in PostScript


SYNOPSIS

 (/home/wherever/ps/lib/muscript.ps) run
 % to send it to a printer see include_run . . .

 140 400 600 20 stave    % xleft xright ytop staveheight
 140 600 580 20 bracket  % x ytop ybottom staveheight
 150 600 20 bassclef     % x ytop staveheight
 170 585 20 whiteblob    % x y staveheight
 220 595 20 blackblob    % x y staveheight
 216 595 575 20 quaverstemdown % x ytop ybottom staveheight
 235 600 20 blackblob
 231 600 580 20 quaverstemdown
 216 605 236 610 +1 20 slur % xl yl xr yr upordown staveheight
 245 590 20 crochetrest  % x y staveheight
 250 589 20 dot          % x y staveheight

 270 600 580 20 barline  % x ytop ybottom staveheight
 280 600 20 trebleclef   % x ytop staveheight
 300 595 20 whiteblob
 296 595 575 20 notestem % x ytop ybottom staveheight
 300 610 20 fermata      % x y staveheight
 350 590 20 crochetrest
 375 590 20 quaverrest
 387 590 20 semiquaverrest
 400 600 580 20 barline

 showpage

DESCRIPTION

This module offers, as a PostScript library, the procedures for drawing musical symbols as used by muscript
They are here made more robust for general use, by protecting each local variable with a local dictionary.


PROCEDURES

None of these procedures leave anything on the stack; they only paint.

 blackblob      usage: x y staveheight blackblob
 whiteblob      usage: x y staveheight whiteblob
 breve          usage: x y staveheight breve
 dot            usage: x y staveheight dot
 doubledot      usage: x y staveheight doubledot
 stave          usage: x_left x_right y_topline staveheight stave
 ledger         usage: x y staveheight ledger
 barline        usage: x y_top y_bot staveheight barline
 notestem       usage: x y_top y_bot staveheight notestem
 quaverstemup   usage: x y_top y_bot staveheight quaverstemup
 quaverstemdown usage: x y_top y_bot staveheight quaverstemdown
 beam           usage: x_mid_l y_mid_l x_mid_r y_mid_r staveheight beam
 tremolando     usage: n x_mid y_mid staveheight tremolando
 bracket        usage: x y_top y_bot staveheight bracket
 repeatmark     usage: x y_top staveheight repeatmark
 bassclef       usage: x y_top staveheight bassclef
 bass8vaclef    usage: x y_top staveheight bass8vaclef
 bass8vabclef   usage: x y_top staveheight bass8vabclef
 f_clef         usage: x y_f staveheight f_clef
 tenorclef      usage: x y_top staveheight tenorclef
 altoclef       usage: x y_top staveheight altoclef
 c_clef         usage: x y_middle_c staveheight c_clef
 trebleclef     usage: x y_top staveheight trebleclef
 treble8vaclef  usage: x y_top staveheight treble8vaclef
 treble8vabclef usage: x y_top staveheight treble8vabclef
 g_clef         usage: x y_g staveheight g_clef
 timesig        usage (eg. for 6/8): x y_top staveheight (6) (8) timesig
 sharp          usage: x y staveheight sharp
 natural        usage: x y staveheight natural
 flat           usage: x y staveheight flat
 doublesharp    usage: x y staveheight doublesharp
 hemidemisemiquaverrest usage: x y staveheight hemidemisemiquaverrest
 demisemiquaverrest     usage: x y staveheight demisemiquaverrest
 semiquaverrest usage: x y staveheight semiquaverrest
 quaverrest     usage: x y staveheight quaverrest
 crochetrest    usage: x y staveheight crochetrest
 minimrest      usage: x y staveheight minimrest
 smbrest        usage: x y staveheight smbrest
 breverest      usage: x y staveheight breverest
 barnumber      usage: x y staveheight (string) barnumber
 crescendo      usage: x_left y_left x_right y_right staveheight crescendo
 diminuendo     usage: x_left y_left x_right y_right staveheight diminuendo
 slur           usage (updown=+1 or -1): x_l y_l x_r y_r updown staveheight slur
 fermata        usage: x y staveheight fermata
 mordent        usage: x y staveheight mordent
 trill          usage: x y staveheight trill
 trsharp        usage: x y staveheight trsharp
 trflat         usage: x y staveheight trflat
 trnat          usage: x y staveheight trnat
 turn           usage: x y staveheight turn
 tenuto         usage: x y staveheight tenuto
 emphasis       usage: x y staveheight emphasis
 segno          usage: x y staveheight segno
 upbow          usage: x y staveheight upbow
 downbow        usage: x y staveheight downbow
 guitar_string  usage: n x y staveheight guitar_string

Also defined are the following procedures also available in text.ps :

 rightshow      usage: x y font fontsize (string) rightshow
 leftshow       usage: x y font fontsize (string) leftshow
 centreshow     usage: x y font fontsize (string) centreshow
 centrexshow    usage: x y font fontsize (string) centrexshow

Also defined are the following fonts with ISOLatin1Encoding. They are also available in fonts.ps :

 /Times-Roman-ISO
 /Times-Bold-ISO
 /Times-Italic-ISO
 /Times-BoldItalic-ISO

INSTALL

To install: go to www.pjb.com.au/comp/free/muscript.ps.txt and save the file to your local disc.
Rename it to muscript.ps and move it into some appropriate directory such as ~/ps/lib . . .
Or, first change directory to where you keep your PostScript libraries:
    cd /home/wherever/ps/lib/
(or wherever)   and then either:
    wget -O muscript.ps http://www.pjb.com.au/comp/free/muscript.ps.txt
or:
    curl http://www.pjb.com.au/comp/free/muscript.ps.txt -o muscript.ps

Or, get it from github:
    git clone https://github.com/peterbillam/postscriptlib


AUTHOR

Peter J Billam www.pjb.com.au/comp/contact.html


CHANGES

 20160627 130830 musical signs, developed from muscript

SEE ALSO


Back to P J B Computing or to www.pjb.com.au . . .