Muscript is a language for typesetting music, and a Perl script and a Lua script which translate this language either into PostScript, or into Encapsulated PostScript, or into MIDI, or into MusicXML, and there is a script muscriptps2svg to translate muscript into SVG. Muscript was written by Peter Billam to typeset his own compositions and arrangements. This page describes its History of Recent Changes.

3.2r, 17aug2016, muscript_lua, fixed midi global transpose
3.2q, 11jul2016, muscript_lua, when setting multi-line variables, now handles empty lines
3.2p, 16apr2016, fixed ps_beam with stemup beams over accidentals
3.2o, 13apr2016, only raise the dot if its note is on a line
3.2n, 12apr2016, neater dotted bre and smb rests
3.2m, 09apr2016, handles 64 rest and septuplets in english rhythm-syntax
3.2k, 07mar2016, helpful error message for missing newbar ( | )
3.2j, 23jan2016, clefs within a bar are not left-spaced as far
3.2i, 11jan2016, fix a bug in large -cre90-dim90 options
3.2h, 09jan2016, a Lua translation introduced, and in consequence: much tidying of the code, consistent GlobalVariable and local_variable spelling adopted
3.2g, 19dec2015, various bug-fixes; scoping error fixed for $accidental in ps_note()
3.2f, 24aug2015, in-bar barlines introduced
3.2e, 27may2015, play command introduced to play wav files
3.2d, 07may2015, clefspace now takes the same space as clef if ibar>1
3.2c, 03dec2014, the -pp pre-processor now preserves and expands #P and #M lines, and preserves # comments
3.2b, 27nov2014, ties with   cha1+2   (see 3.1v) now work with midi
3.2a, 21nov2014, introduce the midi-in-stave bend option
3.1z, 21jul2014, introduce septuplets eg. 167 [G A G A G A G]
3.1y, 16jul2014, workaround: ignore -gs options in xml
3.1w, 29jun2014, bug fixed: cc64=127 was incorrectly seen as "not a note"
3.1v, 16may2014, Sos pedal fixed; stave2channel => stave2channels, allowing cha3+7+11
3.1u, 14may2014, bugs fixed in midi cents which can now be more than a semitone; and the transpose option allows transposition of all notes in a channel
3.1t, 06jul2014, StartedSlurs{istave} not {istave,stemup}
3.1s, 05jul2013, round the starttime in sub midi_event
3.1r, 04jul2013, the title scales with the average maxstaveheight
3.1q, 01jun2013, midi-relevant options work in midi on rests even when the rest is moved up or down with ' or ,
3.1p, 31may2013, Una prints Una Corda, Tre prints Tre Corde
3.1o, 20mar2013, smq-s rests are printed small
3.1n, 19mar2013, introduced Sos, *Sos, Una and Tre pedal-options
3.1m, 13mar2013, try to adapt to perl 5.14
3.1k, 04mar2013, introduced patterns random and aaba
3.1j, 24jan2013, bug fixed in the height2cross mechanism (see 2.8p)
3.1i, 11dec2012, midi-options are respected on rest and blank, e.g. "blank-P", and a bug-fix: variable-substitution in generators no longer gets forced.
3.1h, 20oct2012, #M (if Midi) and #P (if PS or Xml)
3.1g, 13sep2012, check midi bank msb,lsb command for syntax, and make lsb optional
3.1f, 08mar2012, midi barlines on command, for use by midi2muscript
3.1e, 11feb2012, fix bug in rabbit; missing my @list
3.1d, 09oct2011, 64th-notes are correctly spaced in Postscript output, and the piano Pedal is always printed beneath the note.
3.1c, 04sep2011, no substitution is attempted in comment-lines
3.1b, 03sep2011, back to the $VAR= syntax for variable definition
3.1a, 02sep2011, variables, including recursively defined variables and generator functions
3.0i, 23apr2011, command-line option -pp to do pre-processor only, with variable-setting and substitution, and producing muscript output
3.0h, 20apr2011, can invoke a generator with a new argument-list
3.0g, 18apr2011, basic variable-setting, including simple generator-functions
3.0f, 22oct2010, the ben55 midi-in-a-stave option allows setting of pitch-bend
3.0e, 22jul2010, the cc73=108 midi-in-a-stave option allows setting of arbitrary MIDI Contollers
3.0d, 14jun2010, warning if there seems to be a slur or tie inside a text-option
3.0c, 13jun2010, comments within midi-global commands are introduced
3.0b, 02apr2010, the -P and -* midi-note-options are introduced
3.0a, 05feb2010, rests can be shifted up or down more than three steps
2.9z, 28dec2009, handles unfinished beams more gracefully, and allows more space for fat timesigs
2.9y, 23nov2009, fix spacing of the lower voices with multiple voices with 0 keysigs on the same stave
2.9x, 9nov2009, at last, perldoc is introduced
2.9w, 17sep2009, bug in stem-down beam-stubs fixed
2.9v, 15sep2009, 64th-notes (hemidemisemiquavers) introduced, and 32nd- and 64th-note beams keep clear also of their initial and final blobs
2.9u, 7sep2009, use ps_tails_or_beams to tidy 2.7v code keeping beams on-staff and clear of ledger-lines
2.9t, 6sep2009, smq and dsq beams avoid their note-blobs more carefully
2.9s, 1aug2009, midi gm, midi temperament and midi cents introduced; also the in-a-stave 'pan' command
2.9r, 28jul2009, midi bank msb,lsb command introduced
2.9p, 3jul2009, multiple vertical-shift of ties and slurs
2.9o, 5jun2009, accidentals before small notes (-s) now get moved proportionately closer to their note
2.9n, 20may2009, 16-s gets correctly mapped to smq-s, not to smb6-s
2.9m, 7may2009, topmargin is no longer ignored if there's just one system
2.9l, 4may2009, global midi commands are now ignored if $Midi_off
2.9k, 6apr2009, the tremolando code rewritten; now does brille-bass minims
2.9j, 29mar2009, warns about unrecognised syntax, and handles | =1... in midi and xml as well as in PS
2.9i, 10mar2009, handles utf8 OE and oe-ligatures (fr)
2.9h, 28jan2009, bug fixed in total_chord_options
2.9g, 12jan2009, when running off the end of the first page. the title gets prepended to the innerheader
2.9f, 8jan2009, new commands: midi off and midi on
2.9e, 6jan2009, leftfoot remembered correctly page-to-page
2.9d, 5jan2009, ps_note_options on beams gets correct $X argument
2.9c, 10nov2008, -blank- note-option can be written -- again (see 2.7d)
2.9b, 2nov2008, handles utf8 encodings of the latin1 chars in titles and headers, words and text-options
2.9a, 1nov2008, international rhythm notation introduced
2.8z, 30oct2008, moved note-options at the end of a stem, to being horizontally centered half-way between the stem and the centre of the blob
2.8y, 23sep2008, bug fixed; removed redundant barline calls
2.8x, 6sep2008, bug fixed in the code keeping beams within the stave-lines
2.8w, 19jul2008, fixed the -p option
2.8v, 18feb2008, subroutine xml_transpose introduced, and DOCYTPE specifies MusicXML version 1.1
2.8u, 13feb2008, xml transpose uses <transpose> not <alter>
2.8t, 12feb2008, beam rendered more correctly in xml output
2.8s, 3feb2008, unfinished ties overhang the right margin
2.8r, 25jan2008, subroutine ps_is_stemless introduced
2.8q, 23jan2008, subroutine old_parse_note removed
2.8p, 22jan2008, much neater leftward shifting of accidentals on neighbouring notes
2.8o, 21jan2008, the "0" keysig now works after a clef
2.8n, 27nov2007, omit SpaceRightOfClef after a clef at the end of a bar
2.8m, 19nov2007, brackets escaped in PostScript titles, headers and footers
2.8l, 18nov2007, eval eliminated from persistent headers to cure a bug with single-quotes
2.8k, 7nov2007, the boundarybox command generates EPS
2.8i, 27oct2007, unite the PS tieabove and tiebelow routines into tie, and tidy the code
2.8h, 26oct2007, remove the useless PostScript stroke from fill stroke in the quaver rest routines, and regularise the argument order in the stave routine.
2.8g, 6oct2007, midi volume never falls below 1, and consistent indication of line-numbers in error-messages
2.8f, 22sep2007, in midi, append a "final_barline" marker to express any terminating rest
2.8e, 20sep2007, correct line-number displayed in error messages
2.8d, 14sep2007, removed spurious "reset 0" debug message
2.8c, 12sep2007, introduce the keysig "0", to return to Cmaj
2.8b, 10sep2007, double-bars and repeat-marks scale properly with staveheight
2.8a, 27aug2007, new stricter note-format; e.g. allows brackets in text-note-options
2.7y, 10aug2007, bug fixed in persistence of headers and footers
2.7x, 9aug2007, bug fixed in smq and dsq beams in stem-down notes; and in beam gradients when beams are moved clear of ledger-lines
2.7w, 2aug2007, vertical spacing of rests (e.g. rest'' and rest,,) is respected within chords
2.7v, 29jul2007, beams stay on the staff and clear of ledger-lines for better clarity
2.7u, 26jul2007, stem-down smq-s and dsq-s beams spaced correctly
2.7t, 21jul2007, smb and min rests get ledger lines when they're outside their stave
2.7s, 7jul2007, bracket thickness fixed, double-bar neater
2.7r, 6jul2007, barline thickness reduced slightly
2.7q, 3jul2007, barline thickness non-zero in page 1 system 1
2.7p, 30jun2007, dim and cre note-options take no space
2.7o, 21jun2007, barline notestem and bracket scale with staveheight; and cut out a superfluous zero-length beam.
2.7n, 19jun2007, duplets, quadruplets, quintuplets and sextuplets
2.7m, 1jun2007, naming of subs xml*timesig improved, -i"s" note-options handled correctly, and -i"s  " note-options placed correctly.
2.7k, 26may2007, dsq rest at last! and a bug fixed: &ps_pagenum not &pagenum
2.7j, 21may2007, sub ps_finish_ties finishes slurs also
2.7i, 18may2007, subroutines all renamed midi_* or xml_* or ps_*, and &round used instead of int(0.5+
2.7h, 16may2007, subroutines grouped by Midi/Xml/PostScript, and several renamed midi_* or xml_* or ps_*
2.7g, 15may2007, the final barline can be absent, eg bars |16|16|8
2.7f, 12may2007, Helvetica-Bold not HelveticaBold in the PostScript of the -gs note-option
2.7e, 10may2007, fix missing newpath in the PostScript of the -gs note-option
2.7d, 8may2007, -blank- note-option can be written --
2.7c, 29apr2007, fixed bugs in linenum after \, and in midi rendering of ties changing from above to below, e.g. )1(2
2.7b, 23apr2007, -gs note-option for printing the guitar-string number in a circle
2.7a, 16apr2007, -cre and -dim note-options allow crescendo and diminuendo within a note
2.6v, 15apr2007, fixed bug in midi note-options
2.6u, 10apr2007, fixed cache-clobber bug in note-options
2.6t, 3mar2007, fixed spurious-warning bug in xml midi-new-bar
2.6s, 23feb2007, the tra midi-in-stave command is expressed in the xml <alter> element
2.6r, 18feb2007, blanks are expressed by xml <forward>, and a bug fixed in the multiple-tempi-within-a-bar handling
2.6q, 17feb2007, xml handles multiple tempi within a bar
2.6p, 16feb2007, newsys cmd "/" doesn't need a following bars cmd
2.6o, 15feb2007, xml release note-attribute rounded to integer
2.6n, 15feb2007, xml dynamics note-attribute expresses the emphasis option
2.6m, 15feb2007, xml transpose attribute expresses the midi-in-stave transpose command
2.6k, 15feb2007, xml dynamics note-attribute expresses the midi-in-stave volume command
2.6j, 15feb2007, xml tie element (for sound) as well as tied (for notation), and the release note-attribute expresses the staccato option
2.6i, 14feb2007, xml release note-attribute expresses the midi-in-stave legato command
2.6h, 11feb2007, xml title and credit (= leftfoot)
2.6g, 10feb2007, xml font-style adds italic to sub xml_text
2.6f, 9feb2007, xml tempo, and channels using <instrument>
2.6e, 6feb2007, xml midi channels, patches and pan
2.6d, 4feb2007, xml triplets, and beam number attribute, and vertical positioning of rests with rest' and rest,
2.6c, 2feb2007, xml_text specifies default-y
2.6b, 1feb2007, xml_text uses @xml_cache, not just print, and <staves> output only once unless it changes
2.6a, 1feb2007, xml{voice} re-zeroed every bar
2.5z, 31jan2007, xml barlines and repeats
2.5y, 30jan2007, xml timesig and keysig only specified once per stave
2.5x, 30jan2007, xml attributes output in correct DTD order
2.5w, 19jan2007, xml null keysig only output once per stave, and display-step and display-octave for rest''
2.5v, 18jan2007, xml accidental introduced
2.5u, 18jan2007, xml spurious null keysig bug fixed, tautologous clefs and keysigs suppressed at new-system time, and display-step and display-octave for rest''
2.5t, 17jan2007, xml <clef> specifies sign, for alto & tenor clefs
2.5s, 16jan2007, for musicxml2ly's sake, xml <voice> specified for every note, and a <key> specified even when there isn't one.
2.5r, 16jan2007, bad bug fixed in %xpart in PostScript output
2.5q, 16jan2007, xml text
2.5p, 13jan2007, xml note-options, clefs, timesigs, keysigs
2.5n, 12jan2007, first working MusicXML output
2.5m, 24dec2006, in PostScript, the note kept as a hashref after its 1st parse; 10% speed improvement
2.5k, 22dec2006, sophisticated vertical slur-and-tie-spacing
2.5j, 21dec2006, subs start_thing and end_thing allow a slur and a tie to begin (or end) at the same note
2.5i, 18dec2006, sub parse_note now returns an assocary_ref
2.5h, 27nov2006, bug fixed with -s0 option
2.5g, 11oct2006, useless regexps removed from dypitch, ypitch
2.5f, 11oct2006, cacheing parse_line on option strings saves several percent execution time
2.5e, 10oct2006, regexps involving \/ changed to m{}
2.5d, 7oct2006, fixed bug with a comma at the end of a text-option
2.5c, 17sep2006, more PerlBestPractices-conformant
2.5b, 17sep2006, fixed bug in the -blank option
2.5a, 12sep2006, vertical slur-and-tie-spacing with {'1 etc, and more sophisticated vertical spacing of multiple options on a single note.
2.4p, sep2006, -up and -down note-options for up-bow, down-bow
2.4n, sep2006, adjustable chorus effect on MIDI channels
2.4m, sep2006, adjustable vibrato on MIDI channels and in stave
2.4k, sep2006, adjustable reverb on MIDI channels
2.4j, aug2006, fixed bug to really allow spurious MIDI timesig events to be suppressed
2.4i, aug2006, comment appears as "marker" in MIDI mode
2.4h, jul2006, fixed spurious MIDI timesig events every newline, and a bug with "midi channel 0" or "patch 0"
2.4g, jul2006, stereo panning of MIDI channels
2.4f, jun2006, fix longstanding PS stack leak in f_clef and g_clef
2.4e, apr2006, fix midi bug in multiply-tied notes e.g. A(2 A)2(2 A)2
2.4d, apr2006, fix midi Segno bug
2.4c, mar2006, horizontal proportions take account of SpaceAtBeginningOfBar
2.4b, jan2006, fix bug with ' in later-than-1st chord notes
2.4a, jan2006, new ".." syntax for text options, and new {1 }1 syntax for slurs, with the previous (1 )1 now being used only for ties.
2.3i, jan2006, fix midi startedslurs bug
2.3h, nov2005, more sophisticated beam gradient algorithm
2.3g, may2005, midi handles endslur and starttieorslur on the same note
2.3f, may2005, midi handles minim beat in alla breve timesigs, and accidentals persist if tied over from previous bar
2.3e, may2005, explicit clef with no keysig nulls the keysig, and %ytable is needed in Midi to keep track of slurs
2.3d, may2005, fix div/0 bugs on empty stave (=1) lines
2.3c, apr2005, index.html not manual.html
2.3b, apr2005, leg & vol abbreviations; vol+ and vol- increments
2.3a, apr2005, -midi uses MIDI::Score to generate MIDI output
2.2g, mar2005, small notes handle 'x' and dot positioning
2.2f, mar2004, un-ended slurs end at nearest :|| , else EOL
2.2e, aug2003, bug fix in clef placement at BOL with a repeat mark
2.2d, aug2003, clef at start of bar respects repeat-mark and double-bar
2.2c, aug2003, doubleflat bug fixed, and doublesharp introduced
2.2b, aug2003, un-begun slurs start at nearest double-bar, else BOL
2.2a, jul2003, segno now supported
2.1k, may2003, clefspace 'not a note' bug fixed
2.1j, mar2003, compromise & auto PageSizes introduced; default now a4 again
2.1h, feb2003, bug fixed with spaceatstart{1} being double-counted
2.1g, feb2003, by default will autodetect US Letter pagesize
2.1f, jan2003, barline spacing respects timesigs and keysigs
2.1e, dec2002, horiz spacing above first stave in system now fixed
2.1d, nov2002, smb-s supported; smb can be small
2.1c, sep2002, breve rests are now supported
2.1b, sep2002, "bre" breves are now supported
2.1a, jul2002, "r0.4 gloop .75 gleep" horizontal spacing of text
2.0p, jul2002, rest,,, and rest''' and min-s; 8va rewritten
2.0n, may2002, infinite loop bug fixed if a < bracket is left open, and "x" in a text option is now handled correctly
2.0m, apr2002, -I{some text} option introduced
2.0k, mar2002, clefspace at BOL, & keysig memory bug fixed, options work on rest and blank which now use print_event like notes do
2.0j, sep2001, retain previous clef and keysig on new systems, regenerates bars, systems and headers, add mordent option, centreshow adjusts y as well (needed for options)
2.0g, sep2001, expand also 6 bars |8|
2.0f, sep2001, autoincrement pagenums, and systems expansion
2.0e, sep2001, ties at eol improved, text options added, x and r on smbs consistent with other notes
2.0d, aug2001, bugs fixed with smb//, with &y_below_note, with tremolando on stemup chords, and with ( or ) first char in a string
2.0c, aug2001, smb <ar g> works
2.0b, aug2001, fermata printed upside down if beneath stave
2.0a, aug2001, top gaps can be reserved above the first system; ties go to midline of notes by default, have a maximum gradient and are neater when squeezed; small notes have small stems and beams; the blank option is available.
1.8n, 3aug2001, bugs fixed in dsq beams and small stems
1.8m, 1aug2001, refine spacing of keysig
1.8l, 3jul2001, attach stems to small crochets
1.8j, 6apr2001, options below staff seem to work, fix bug with smq. [d dsq c qua B] beams, first try at -s small notes, -s makes accidentals small too, fix keysig spacing in midline
1.8i, 4apr2001, highestsmb calculated correctly, first try at options beneath note, try to get options below beams working
1.8h, 5mar2001, does -emph note option, fix hangover repeat at BOL bug
1.8g, 4jan2001, allows f~~ .. A__ pitches, add -ten tenuto option, fix bug with barcount if || doublebar
1.8f, 20aug2000, x shifts accidental, multiple r rightshifts
1.8e, 2may2000, does -p and -s, beginning of sub words, beginning of tremolandi, eg smb//, tremolandi seem to be working
1.8d, 1mar2000, does start-repeat marks at BOL
1.8c, 7feb2000, trn, [< can intermingle, ties can be at end
1.8b, 15jan2000, add tr# and trb options
1.8, 16nov1999, spaces multiple options vertically, options printed correctly over stemup beams, "r" correctly shifts blob as well as stem

Back to the top . . .

Peter Billam, GPO Box 669, Hobart TAS 7001, Australia http://www.pjb.com.au