Change Log for Philip's Music Writer (Linux/Unix version) --------------------------------------------------------- Version 5.2x xx-xx-2024 ----------------------- 1. Revised the PMW-Music font to make it easier to generate the OTF version (and possibly work only on that in the future). The names of all the characters in the font are now prefixed with "PMW", and some minor reorganization has happened. One dictionary's size was too small, but this never caused any problems. Re-generated the PFA and OTF versions of the font. Version 5.22 21-December-2023 ----------------------------- 1. Added new draw operators for mathematical functions sin, cos, sqrt. 2. Implement [stems central] and [stems beside] for exotic notation. 3. Implement [noteheads circular] aka [c] and note option \nc\ for exotic notation, including adding two new noteheads to the PMW-Music font. 4. [barnumber] can now be used to force a bar number for bar 1. 5. More additions to the drawing facility: setdash provides for simple dashed lines; setcolor (or setcolour) provides for colour. There are also currentdash and currentcolor operators. An incompatible change is that text in drawings now takes note of the colour or grayscale setting. 6. Tidy colour/grayscale handling in ps.c; removes some redundant settings. Ensure colour is preserved over a drawing instead of forcing black afterwards. This is in preparation for the possible use of colour other than in drawings. 7. Add options for rounded corners on boxes: /rbox for strings and "roundboxed" for rehearsal marks and bar numbers. 8. Give a warning for string options on rehearsal marks that are ignored because the style and size are taken from the "rehearsalmarks" directive. Version 5.21 15-July-2023 ------------------------- 1. Fixed a sanitize runtime warning for a negative shift amount (which fortunately didn't affect anything). 2. Fixed a number of left shifts where "1" should be "1Lu" because the shift could be more than 31. 3. Using \C\ to turn off centring of whole bar rests was not working. 4. Upgraded the handling of font translation and re-encoding using .utr files. In particular: (1) Re-encoding and translation is supported for all fonts, both standardly-encoded and otherwise; (2) Re-encoding modifies the existing encoding rather than supplanting it. 5. The obsolete synonym "includefont" for "incPMWfont" was documented as removed in 5.00, but it never was. It now is. 6. Added some header directives that have the same effect as certain command line options: drawbarlines, drawstavelines, eps, incpmwfont, and nowidechars. 7. After [reset], underlay and overlay distribution is now disabled until the subsequent notes and rests reach the reset point. 8. Added [backup] to back up by one note, which is simpler and gives more flexibility than [reset] followed by invisible rests if that's all you want. 9. Re-arranged the code that handles note heads, putting its options in a different field in note structures because there was only one bit left in the note flags field (now there are four). This was done so that the options for individual notes could be extended to add \nd\, \nn\, \no\, and \nz\ for an individual note's head control. Version 5.20 15-July-2022 ------------------------- 1. In preparation for supporting an OpenType font, which does not allow for negative character advances, nor characters with vertical movements in a horizontal font, the PostScript output no longer outputs those characters in the PMW-Music font that (in the Type 1 font) have these characteristics. Instead, it terminates the string and computes the new output position for what follows. At the same time, the output is now optimized to remove any characters that just move the current position (up, down, or right) at the end of character strings in the music font. 2. An OpenType version of the PMW-Music font is now included in the distribution. PMW should now work with either the .pfa font or the .otf font. 3. Now included in the source files in the Git repository are the creation files for the PMW-Music font, for all three historical versions: PostScript types 3 and 1, and OpenType. They are in the fontmaint subdirectory. 4. Updated the documentation so that it no longer relies on the features of PMW-Music that are not supported by OpenType. 5. Make the "force accidental after transposition" facility (the ^+ notation) work in key N. This is occasionally needed for cautionary accidentals. 6. Implement the ability to specify a font encoding in a non-standard font's .utr file. This allows for up to 512 characters to be encoded by name, thus giving access to fonts such as some Arabic ones that don't have the Arabic characters in their default encoding. 7. Implement preprocessing test for transposition. 8. Implement \t\ to insert current transposition value into a string. Version 5.10 08-June-2022 ------------------------- 1. Fixed an obscure spacing infelicity when, after an item such as a time signature, the note in a higher staff had no accidental but the note on a lower staff did, or had a wider accidental. 2. Merged experimental optional code for reading MusicXML files. Only a subset of MusicXML is supported and there are many infelicities. 3. The "barlinespace" directive is documented as being able to adjust the default, as well as setting an absolute value. However, values starting with a plus or a minus sign were being rejected. 5. In a drawing function, the system variables gaptype, linegapx, and linegapy also apply to gaps in slurs. The synonyms gapx and gapy are introduced for the last two and the documentation has been updated. 6. Added the /cb ("centre in bar") option to text strings. 7. Fix bug whereby [stave n omitempty "Name"] treated the name as a rehearsal mark instead of an implied [name] argument. 8. Add /l, /r, /u, and /d to stave name strings. 9. Arrange for vertical stave name strings on a single stave (those with /v but not /m) to have their midpoint aligned with the centre of the stave. 10. Reduce severity of "Unexpected end of slur or line" error so that output is still generated. 11. Fixed a bad spacing bug that happened when a bar on a stave other than the first contained [reset] and the notes before [reset] were shorter than the bar length. 12. Bad MIDI was generated if a note's pitch was outside the range supported by MIDI. It now gives an error and ignores such notes. 13. Added check for absolute pitch (after transposition) being within the supported range. Hard error if not. 14. Added the SystemSeparator directive to support system separators. 15. Extended RepeatStyle to allow for "wings". 16. Implemented 10 additional text sizes that cannot be changed, but can be accessed by /S instead of /s. This is for the benefit of "standard" macros. 17. Added /fbu for figured bass text at the underlay level. 18. Text positioned at underlay or overlay level (but not being actual underlay or overlay) was not causing the relevant level to be calculated. Fixing this caused underlay/overlay that was not preceded nor followed by any notes in the bar to be positioned at the stave level instead of a default above/below position. 19. The "undef" condition was not working if the macro name being tested began with a digit or contained upper case letters. 20. Fixed an obscure bug with buffer extension when expanding macros, which showed up if there were a lot of macros in a line. The effect was to add nonsense to the line, giving weird input errors or crashes. 21. Created some "standard macro" files, and arranged for them to be picked up by "*include" if no other file of that name exists. 22. Updated the PSheader file by removing a test for a font's being in the PostScript FonDirectory after "findfont" because (a) the test is clearly redundant if "findfont" succeeds and (b) a user reported getting the "unknown" error, even though the font had been loaded. 23. When a Unicode code point was translated to a code point in a font with non-standard encoding, if the string was underlay or overlay and the resulting code point was the Unicode code point for hyphen or equals or sharp, it was erroneously given the special underlay/overlay treatment. Such translations are now made to behave as if the input were escaped. Version 5.02 30-January-2022 ---------------------------- Fixed another bug in the handling of B2PF fonts, in fact a bug in the fix 1 for 5.01: it was applying strchr() to non-ASCII characters, causing misbehaviour and crashing. Version 5.01 02-January-2022 ---------------------------- 1. Fixed bugs in the handling of B2PF fonts caused by pre-processing long strings before splitting up (headings into left/centre/right; underlay into syllables, stave starting strings into lines). In configuations where the strings were to be reversed, this caused reversal of the whole string instead of just the characters in the individual parts. 2. Fixed a related issue with specially interpreted characters in strings that are processed by B2PF - e.g. vertical bar in headings. Version 5.00 24-November-2021 ----------------------------- 1. This version is the result of a major overhaul of the code to modernise it and tidy up some parts of it. The opportunity has been taken to remove some obsolete features and some limitations. There is a list of changes in chapter 11 of the manual. Here are some of the more important ones: * The features for inserting literal PostScript have not been re-implemented. They can be put back if anybody is actually using them. * The "stretchrule" directive and the directives whose names began with "old" (undocumented for many years) have not been reimplemented. If encountered, a warning is given. * There are fewer limitations on things like line length. There is now no need to use the "barcount" directive for movements with more then 500 bars. * The program no longer leaks memory. * The handling of text strings has been re-written. All escapes are now interpreted when the string is read, instead of having to be handled in several different places when the string is processed. One incompatible consequence of this is that, should any of the characters hyphen, equals, or sharp sign be required as literals in an underlay or overlay string, it no longer works to input them as character number escapes (e.g. \45\ for a hyphen). Instead, there are special escapes \- \= and \# for this purpose. Similarly, if you need a double quote in any text string, the only way to input it is the \" escape, and \| is the way to remove special interpretation of vertical bar in some strings. * It is now possible to specify a specific character to use for unsupported Unicode characters in non-standardly encoded fonts. If this is not done, the star character from the Music font is used. Previously a random character in the font was used, which could look bizarre. * The [omitempty] and [stavelines] directives have always affected the entire stave, wherever within it they appeared. This seems untidy, so now these features are part of the [stave] directive. For example, to set up stave 2 as a 3-line omitempty stave, you can use [stave 2/3 omitempty "name"...]. The old directives are still recognized: [omitempty] gives a minor error and does nothing, but [stavelines], for the moment, still works (with a warning). * The use of, for example, \x2\ for extra font 2 is ambiguous because it could be a hexadecimal character number; \xx2\ is now implemented to resolve this. The old usage still works, but with a warning. * Half sharps and half flats are now first-class citizens. Previously, the code worked in semitones, and the half accidentals were an untidy hack. The new code works in quarter tones, though transposition is still in semitones. * Standard and custom key signatures are now handled in exactly the same way, the only difference being that the standard ones are pre-defined. * A few new features are added, including the ability to number repeated bars automatically. Version 4.52 was never formally released ---------------------------------------- 1. When the key is the pseudo key "N", all non-essential accidentals are suppressed after transposition. This no longer applies to accidentals that are explicitly requested after transposition. 2. Two bugs relating to bar numbering. If a stave 0 was present, the logic for moving a bar number up when the next bar starts with a high note, and the logic for moving it right at the start of a bar for certain clefs was not working (and hasn't been for a very long time). Version 4.51 06-January-2021 ---------------------------- 1. The documentation for the MakeKey directive specifies that the accidentals are output in the order in which they are defined, but this was not happening. Instead, they were being output in the order of their position on a treble clef stave. The bug has been fixed. Version 4.50 29-November-2020 ----------------------------- 1. Added "[no]linestartleft" to rehearsalmarks. 2. In right-to-left mode, round brackets for a notehead were being output the wrong way round, that is )o( instead of (o). 3. Reformatted some of the reading code to include length checks on some buffers and rationalize the use of buffers for strings, words, and file names. Version 4.40 17-August-2020 --------------------------- 1. Renamed -includefont as -incPMWfont with synonyms -incpmwfont and -ipf, to emphasize that it applies only to the music font(s). The old name is still recognized, but deprecated. 2. Fix an undefined reference that was introduced in 4.35/3. 3. Give an error if ! follows a lower case rest letter (this was accidentally never checked, though it is documented as following an upper case letter). 4. Added new "rest" letter T, the crotchet version giving a single slash beat indicator and the whole bar rest version giving a "percent" repetition sign. 5. Tidied up handling of -norc: gives a hard error if not the first option and is allowed, but ignored, when PMW is compiled without .pmwrc support. Also added the synonym -nopmwrc. 6. Implemented B2PFfont. Version 4.36 23-July-2020 ------------------------- 1. Change 5 for 4.35 contained a bug which caused the lengths of strings to be incorrectly computed when a .utr file was in use. This affected the positioning of heading/footing strings in particular. There was also the possibility of error for a very long string containing multibyte UTF-8 characters. Version 4.35 15-June-2020 ------------------------- 1. Implemented the KeyTranspose directive. 2. Extend -F and -MF to take a colon-separated list of directories. 3. Add "include" feature to the textfont directive. 4. If a portion (left, centre, right) of a header or footer string was more than 255 bytes long, it was incorrectly processed. Truncation or undefined behaviour could occur. The size of the relevant buffers has been increased to be the same size as the maximum logical input line length. 5. Added Unicode support for non-standardly encoded PostScript fonts via .utr files. Version 4.34 20-April-2020 -------------------------- 1. Produce one consolidated list of unsupported Unicode code points instead of an error message for each one. 2. After "Follow-on ignored for string with explicit positioning", PMW was not producing any output (it was treating it as a serious error rather than a warning). 3. Some miscellaneous code tidies. 4. Implemented MakeKey for custom key signatures. 5. Made all file opening failures into hard errors. 6. In a "draw" definition, a slash not followed by a variable name wasn't always diagnosed, and after an unknown item was encountered, "draw" reading was exited prematurely, sometimes causing unknown heading directive errors. Version 4.33 07-March-2020 -------------------------- Many of these new features were added to facilitate translating MusicXML into PMW input. 1. A typo in the code meant that sometimes, instead of giving the error "Insufficient space to print notes on opposite sides of beam", PMW went into a loop and/or crashed. 2. Added the /lc and /rc options to text strings and hairpins, to allow horizontal positioning by musical offset. 3. Extend the PMWversion directive to test for greater or less than as well as equality. 4. Add the facility for multiple text strings, possibly with different options, for stave names. 5. Add -errormaximum (aka -em) to adjust maximum number of errors before bombing out. This helps with testing errors. 6. Added the follow-on (/F) facility for stave text strings. 7. Added an entry for character 160 (U+00A0, non-breaking space) to all the standardly encoded AFM files. Odd nobody noticed its absence before - the effect was incorrect calculation of the length of any string that contained this character. 8. Increased the allowed number of text font sizes from 12 to 20. 9. Added the [ssabove] stave directive. 10. An internal error occurred if a bar contained a [reset] followed by notes that did not fill the bar, followed by something else, for example: E+ [reset] q-q== < because the position after the final note was not being recorded. 11. When a stave title has the /m option, to print halfway between this stave and the next, ignore it if this is the last stave or if the next stave is suspended. Also ignore if this stave has zero stave spacing and the next one that has non-zero spacing is suspended. 12. Added \nh\ and \nc\ so that individual notes can have noteheads set as harmonic or cross. This makes it possible to have chords containing different noteheads. 13. Added /cx, /llc, /lrc, /rlc, and /rrc to slurs and lines to allow for horizontal positioning by musical offset a la MusicXML. Version 4.32 12-August-2019 --------------------------- 1. Transposition values of multiples of 11 or 12 caused PMW to give up with a hard internal error for some note values. 2. A maximum (accumulated) transposition value of 60 is now implemented. This is 5 octaves, which should be enough for anybody. 3. Implemented key N. 4. Fixed some code infelicities shown up by ASAN, valgrind, and current compiler warnings. 5. When setting music right-to-left, the start of a slur above a note with an up stem was too far to the left and the end of a slur below a note with a down stem was too far to the right. 6. If a small notehead was specified for a breve or semibreve that had no ledger lines or accidentals, it was printed in the wrong place. Breves with ledger lines were also incorrectly positioned. 7. Implemented bracketed noteheads facility. 8. An invisible accidental specified for a rest was not provoking an error. Version 4.31 28-January-2019 ---------------------------- 1. Change code for building the version date to use memcpy() instead of strncat() because GCC now complains when a whole string isn't copied. 2. When there's an error that causes a skip to (e.g.) end-of-line, output the error message before doing the skip so that the correct position where the error was detected is shown. 3. Refactored the code handling ornament/expression errors to try to reduce error cascades when the terminating backslash is missing. After a skip to a bar line, don't check the length of that bar. 4. After "Note or rest letter expected" don't check the length of that bar. 5. Fixed error message loop for certain errors that skip to end of line, if the error was detected on the first character (e.g. a line after a "heading" directive starting with "+", where it thought a number should follow). Also, now check for a digit after + or - following a heading string before trying to read a spacing dimension. 6. Implemented &&& continuation lines, mainly for new replicator (see next). 7. Implemented &* replication feature. 8. Increased some buffer sizes (replicating many bars might require long lines). 9. Semicolons after the arguments of a macro call were being ignored, which was not the intention; they are ignored after an argumentless call (name only) to terminate the name. If &x(...) generates beamable notes, the following semicolon should terminate the beam. It now does. 10. Improve error message and handling if \...\ is (erroneously) present after an "x" note repetition. 11. Install checks for too long macro names and too many macro arguments. 12. If an included PostScript file is actually encapsulated PostScript, wrap it in save/restore and disable the a4, showpage, and copypage commands for the duration. 13. More rigorous checks on the syntax of psheading etc. 14. Give warning for |:) or (:| that is, an end repeat at the start of a bar, or a start repeat at the end of a bar. 15. Increase two internal small buffers to avoid compiler warning. 16. Added escapes \<< and \>> for double typographic quotes. Version 4.30 15-June-2018 ------------------------- 1. If a "movement" was coded without any staves (for example, for a title page), there was the possibility of a segmentation crash due to memory corruption. This is a very old bug, surprisingly never triggered before. 2. Added the "tripletize" feature, somewhat of an experiment. 3. Allow semicolon and comma after any note, not just quavers and shorter, to make life easier when halvenotes and doublenotes are being used. 4. Implement [doublenotes] and [halvenotes] to alter note lengths without affecting time signatures. 5. Make -norepeat a synonym of -norepeats because I keep forgetting. 6. Make "stafflines" a synonym of "stavelines" because staff/stave are supposed to be interchangeable throughout. 7. Added an optional thickness to -drawstavelines. 8. Repeats in the middle of bars are now honoured in MIDI output. 9. If there were more than 20 text strings preceding a note, PMW could crash. The limit has been increased to 50, and a test for overflow is now in place. 10. Arrange to free heap memory so tests can run with -fsanitize=address. 11. If a chord was repeated multiple times by 'x' followed by a number greater than 1, a data overrun could occur. There is now also a hard error if there are too many notes in a chord (the limit is now 16). 12. If a midichannel directive contained a volume setting, undefined memory was being copied accidentally (but never used). 13. Several code refactorizations to tidy up suspect code picked up by gcc and clang sanitizers. 14. "Printtime" and "printkey" directives used to apply to the entire piece; even if set in the second movement they would affect the first. Now they apply only to the movement they are set in and any that follow. 15. Some other changes for "printkey": (a) At a mid-stave change of key, PMW used to check for C major or A minor when deciding whether to automatically insert a previous key cancellation signature using natural signs, though in one case the test for A minor was missing. Now it checks for a key signature of zero width, which means that if "printkey" defines an empty string for the new key, a cancellation signature will be generated. (b) Previously, a cancellation signature took no notice of any "printkey" setting. There is now an optional second argument for "printkey" that specifies what to print for a cancellation. If not supplied, an empty string is used. 16. Added four new characters to the music font: reverse turns and half circles. 17. Characters from the PMW-Alpha font were not being correctly included in the documentation PDF (something changed and I didn't notice). This has been fixed by including the type 3 PostScript font explicitly when building the PDF from SDoP's PostScript output. Version 4.29 26-June-2016 ------------------------- 1. Added -norc to the scripts for running tests to ensure that the user's .pmwrc file, if it exists, is ignored. 2. Running with a lot more compiler warnings turned on threw up a number of infelicities in the code. Refactoring has got rid of the compiler warnings. 3. Compiling with clang threw up a few that gcc missed; it also found a genuine bug, a misplaced ) in an expression. By pure fluke there appeared to be no way of provoking misbehaviour, because what was being checked was re-checked (correctly) later. 4. Allow ! as a modifier to notes as well as rests. Version 4.28 08-February-2014 ----------------------------- 1. On a 64-bit system, stretching and shearing fonts did not work. I only noticed when I upgraded to a 64-bit system; clearly not many people use this feature. 2. Under some circumstances, a spurious error "An input line is too long when macros are expanded" could be generated. This showed up on a 64-bit system with 4G of memory, but I'm not sure which exact condition provoked it. Version 4.27 04-December-2013 ----------------------------- 1. If a bar containing a long rest symbol is wider or narrower than normal, the |----| symbol is now drawn instead of using the font character. This means it can be made longer or shorter. In particular, it is now possible to have one long bar right across the page as is common in instrumental parts for tacet movements. 2. Updated font-handling to add the remaining Unicode characters in the Latin-A extended font, together with the infinity character, all of which are present in modern fonts. 3. The PDF index in the manual now has clickable links to the individual letter headings in the index. Version 4.26 05-March-2013 -------------------------- 1. The table out_mfstr_ps table (ancient code) was mixing small integers and pointers in the same table (space-saving back in the 1990s) which caused trouble on systems where addresses could be negative and in any case is bad style these days. In fact, the additional space used is very small. 2. Removed a number of unused variables that were thrown up by the warning -Wunused-but-set-variable in a modern gcc. 3. If a mid-stave bar at the start of a system starts with both a time change and a key change, it is now possible to have just one of them as a warning at the end of the previous system. 4. Added [no]codemultirests. Version 4.25 06-January-2013 ---------------------------- 1. Allow tremolo markings to be moved up and down (but not left and right). The syntax is odd (e.g. G\//d4\ moves a single tremolo down 4) but it is consistent with everything else. 2. In read2.c there was a local variable called oo, which could be confused with the macro oo in that module - a shorthand for offsetof. The variable is renamed, and a couple of explicit offsetof appearances now use the macro. 3. When writing a MIDI file, simple "scrubbing" (single or double tremolos) on minims and crotchets (possibly dotted) is now recognized. Previously the notes were played as single long notes. Version 4.24 23-March-2012 -------------------------- 1. There was a bug in the debugging code invoded by -dsb (used only by developers) which caused it to generate incorrect output for some ornaments. 2. On 64-bit systems, if there was more than one ornament on a note or chord (e.g. arpeggio plus fermata), only the first of them was shown. 3. Fixed a uninitialized value in the data block for certain ornaments. 4. In rare circumstances, when a specific item happened to occur right at the end of a memory block, the code for moving on to the next block was incorrect, and so the output was not right. These are specific cases: (a) Amalgamation of a right repeat immediately followed by a left repeat. (b) A final first time bar at the end of a line: the terminating jog might be missing. (c) Beam breaks on 64-bit systems. 5. The structure lengths for "assume time", "assume key", and "assume clef" were incorrect. This could lead to overwriting for "assume time" - by luck the other two were not affected. The only visible effect was small positioning variations when systems were stretched. 6. Code for advancing through a chord would have gone wrong on 64-bit systems, but for the lucky coincidence that the length of the structure involved happens to be a multiple of 8. There was a similar issue with the code for linking between multiple memory blocks. Version 4.23 ------------ 1. The only change to the program for this release is the addition of the -drawbarlines and -drawstavelines command line options. 2. Updated the documentation Makefile to ensure that (a) it uses the local versions of PMW's font metrics and PostScript header, and does not look for installed versions, when building the PMW examples; (b) the PMW fontmetrics are made available to SDoP when it processes the spec. This is done by making a fontmetrics directory containing only those files rather than just pointing SDoP at the main PMW directory, for two reasons: (1) PMW also uses a PSheader file, which SDoP picks up in error (the main reason), and (2) we want SDoP to use its own fontmetrics for other fonts. 3. Changed documentation to suggest making two symbolic links for the PMW fonts intead of a single directory link, which does not always work. Version 4.22 re-release ----------------------- There are no changes whatsoever to the code, just to the packaging and the documentation: 1. Added support for DESTDIR to the Makefile. 2. Reformatted the specification using the latest version of SDoP, which turns cross-references and index page numbers into clickable links in the PDF. 3. Added some newly contributed files to the contrib directory. Version 4.22 ------------ 1. Get rid of an "uninitialized variable" warning in paginate.c. 2. Added \..\ for staccatissimo, using new characters 194, 195 in the font, which are teardrop shapes (one inverted). As part of this, the code for parsing accents and ornaments has been reorganized to be more table driven. 3. When a syntax error is output, the file name used to be included with the line number only for included files, but now it is always included for the benefit of people who use the "compilation mode" of Emacs (or similar feature in other environments). This mode makes use of the error messages and is able to open the file at the place where the error was found during the compilation, but of course it needs the file name. 4. Tidied up the copyright string, which for some crazy reason appeared twice in the source code. Added "Built" to the date that is shown by -V etc. 5. When righttoleft was set with -eps, the bounding box values in the EPS file were incorrect whenever the magnification was not 1.0. 6. When a layout directive caused a system to be squashed to fit onto a line, underlaid words could crash into each other because of the squashing. (Bars are initially spaced to avoid underlay crashes, but this did not take account of squashing.) This problem has been alleviated by respacing lines when the squashing is above a certain threshold - in the same way as happens when systems are stretched a lot. For backwards compatibility on old files, a new directive called stretchrule has been invented, with values 0, 1, or 2; oldstretchrule (dating from a much earlier change) is equivalent to setting stretchrule to 0. The default is 2, and 1 is the situation prior to this change. 7. Related to 6, when PMW was adjusting note spacing so that underlaid syllables did not collide, it was ignoring leading and trailing # characters, treating them as spaces (which of course, they print as). However, this means that using # to move a syllable left or right did not work as expected. It now ignores leading and trailing spaces only if they are actual space characters. 8. Updated the AFM files in the fontmetrics directory to later versions that include additional characters in current versions of the text fonts. 9. When a bar was not of the correct length, the error message always said it was too long, even when it was too short. I am amazed nobody has noticed this bug before; it was introduced by change 30 of version 4.20. 10. Allow /u, /d, /l, and /r in strings for drawing calls. 11. Add -MF to allow overriding of the directory in which the music fonts are stored. 12. Process the files in the testdist directory with -includefont (requiring the new -MF option) so that the output can be directly viewed in environments where the fonts are not installed. 13. Added ||| to print an "end-of-piece" barline in the middle of a piece. 14. Added /), /(, /b, and /B for bracketing expression marks and ornaments. Version 4.21 ------------ 1. Changed an (int) cast to (long int) in the ps.c source, in order to get rid of a compiler warning in 64-bit environments. 2. Re-organized the rdargs module (argument decoding) to get rid of some 32-bit-isms that caused crashes and/or weird behaviour in 64-bit environments. 3. Added the midifornotesoff heading directive. Version 4.20 ------------ 1. Carried out a general spring clean of the code, tidying up comments, removing redundant code left over from the Risc OS days, and also re- arranging some of the control logic. 2. The code for "draw" features used an array of ints for the drawing engine implementation, casting addresses to ints for handling text and other pointers. This does not work in 64-bit environments. It has now been changed to use a union of int and void * for these items. I also added a "type" to data items so that it can be checked for the various operators (previously there was no check). This has made it possible to upgrade "pstack" so that it correctly shows text strings and says "code-block" instead of printing the address. 3. The store (memory) handling functions also used addresses cast to ints. This is no longer the case. 4. Fixed a bug in the string width measuring code which could have given wrong answers in cases where non-standard fonts were in use. 5. A related bug to (3) could have caused trouble when small caps fonts were used. 6. Fixed bugs thrown up by running the tests under valgrind. A couple of uninitialized variables, and one text string overrun while calculating a length for centering. 7. Some of the output differed in the third decimal place when the tests were run under valgrind. This was connected with floating point arithmetic, in particular, that used for drawing fancy types of slur. Some massaging of the code, especially in the way floats are converted back to ints, has been done, and now the tests produce the same output when run native or under valgrind. This was a long and tedious slog. 8. There was a typo in the AFM file for the PMW-Alpha font: character 222 had a width of 0.75 which should really be 0.15. 9. The documentation has been converted to a new production system, and the opportunity has been taken to thoroughly revise it. 10. Two MIDI bugs have been fixed: (a) When a chord was tied to a subsequent chord with more notes than the first chord, for example, (cd)_(cde), the MIDI generated for the additional notes was incorrect, often causing a long period of silence with the note played minutes later. (b) When a MIDI parameter, for example, the voice, was changed in mid-part by a directive such as [midichannel 1 midivoice "flute"], and playing was started after this directive, using the command line option -midibars, the change of parameter was not heeded. 11. When overlay was used with chords, the level was incorrectly computed, taking into account only the lowest note of the chord instead of the highest. Overlay has also been raised by one point. 12. A hairpin that continued over more than one line boundary caused PMW to crash. This could accidentally be provoked by terminating a '>' hairpin with '<' or vice versa. 13. Change 4.01/5 removed "a4" from the PostScript output because it was causing trouble with GhostScript. It seems that nowadays it is no longer an issue, and is needed for conversion to PDF, especially if the sheet size is something else, for example, A3. The action now is to include a known paper size, set from the "sheetsize" directive (default A4), between %%BeginPaperSize and %%EndPapersize lines. If the dimensions are independently set using sheetdepth or sheetwidth, this does not happen. 14. Add support for small note heads (to show optional notes) with the note option \sm\. All this does is to reduce the size of the note head. 15. Added "letter" to the list of recognized paper sizes for the "sheetsize" directive. 16. The heading directive "stavespacing 0/xxx" was not being diagnosed as an error. 17. If [sshere] or [ssnext] were specified on stave 0, or with "0" as a stave number (meaning "all staves"), and a relative change was specified (e.g. [sshere 0/+20]) the change was interpreted as absolute instead of relative. 18. Give a warning if the same stave is mentioned more than once in a stavespacing, [sshere], or [ssnext] directive. 19. Some of the warning messages were missing "Warning:" at the start. 20. The "bar length is different to the staves above" message has been changed from a serious error (which prevents PMW from generating output) to a warning - some attempt at the output will be made (see also 31). 21. No diagnosis was previously given for an unsupported code point in text. It was silently replaced. A warning message is now given. 22. The internal formatting function that is used to generate error messages went wrong if more than one substitution of a width was present (previously there were no cases of this, so the bug didn't show). 23. Added six characters to the PMW-Music font: 270 184 0.0 ledger2 a ledger line that is 2/3 thicker 275 189 0.424 halfsharp1 half sharp, Egyptian style 276 190 0.6 halfsharp2 half sharp, Turkish style 277 191 0.5 halfflat1 half flat, Egyptian style 300 192 0.5 halfflat2 half flat, Turkish style 301 193 0.6 icomma inverted comma, for right-to-left music 24. Added the ledgerstyle directive. 25. Added some simple support for half sharps and half flats, and the halfsharpstyle and halfflatstyle directives. There is no MIDI support. 26. Added the printkey directive. 27. Added the righttoleft directive (probably incompletely). 28. Changed -F so that it specifies an additional fontmetrics directory, not the only one. 29. Fixed a couple of small bugs relating to the handling of characters in text strings with codes greater than 127 in the Music font. 30. Fixed a problem with duplets and other irregular note groups that caused (for example) {GG} and {3/2GG} in 3/2 time to be treated differently, when of course they should be the same. There was also another bug that happened when very short notes were involved in certain kinds of irregular groups; PMW complained about bars being too long or too short by very small fractions of a crotchet. These fixes have also tidied up some other irregularities in this area; the documentation now tries to explain it all better. There may be differences in the way some of the rarer groupings are handled. 31. The "bar length is different to the staves above" message was given twice if it occurred in the first bar of a system other than the first, because such bars are measured twice (once for the previous system, to discover that it doesn't fit). 32. Fixed some cases when the bounding box of EPS output was incorrect. The cases all involved text. Version 4.12 ------------ 1. Transposing the key/chord name in a string such as "\tCm9" up by one semitone caused the string to be mangled and an incorrect error message to be generated, whereas other strings such as "\tCm11" worked fine. (This was a buffer length error.) 2. Transposing a key/chord name in a heading line did not always work correctly. For example, transposing Cm (C minor) up by one semitone resulted in D$m (D-flat minor) instead of C#m (C-sharp minor), even if the movement's key signature preceded the heading line. This transposition now works as long as the key signature is defined before the heading that contains the transposition. 3. Code tidies to avoid compiler warnings related to string signedness. 4. The midistart directive was in the code (from the old Acorn version) but was not documented, and didn't work as expected because no time deltas were written to the file. All the events in the midistart data are now preceded by a zero delta so that they happen at the start of playing, and the directive is documented. Version 4.11 ------------ 1. The sorting of MIDI events was not quite as intended, leading to occasional cases where a repeated note was turned on for the second time before (rather than after) being turned off (at the same point in time). Some MIDI players seem to "do the right thing" with this, but apparently others do not. The sorting has been mended. 2. A new character has been added to the PMW-Music font. Its number is 183 (decimal) or 267 (octal). The character is an "x" that is suitable for printing at the head of a guitar grid to indicate a string that is not played. Like the open and closed circles, its typographic width is exactly right to move the printing point on to the next guitar string position. 3. The heading directives playtempo, playtranspose, and playvolume, and the stave directives playtranspose and playvolume have been given synonyms with "play" replaced by "midi" because the old names (which originally referred to MIDI and non-MIDI playing) are not longer sensible. They are, however, retained for backwards compatibility. Version 4.10 ------------ 1. A major new feature: text strings are now interpreted as UTF-8 character strings using the Unicode encoding for non-Music and non-Symbol fonts (strictly, fonts that use the Adobe standard encoding by default). For backwards compatibility, a byte with a value greater than 127 that cannot form part of a valid UTF-8 sequence is interpreted as a Unicode character with its byte value. This change is almost backwards compatible. See the documentation for exact details. 2. PMW could crash for certain command lines because a vector used during argument decoding wasn't big enough. (The number of possible options has increased recently.) 3. PMW crashed if the quoted string was missing from a "heading" directive. Version 4.07 ------------ 1. Fixed some errors in the PMW-Music.afm file. These did not affect the running of PMW, but could cause trouble when using the PMW-Music font with other applications. (i) The "B" for the bounding box was missing in all but the first character. (ii) Some semicolons were not preceded by a space. This is not incorrect, as far as I can tell, but I had a report that the afm2tfm program didn't like it. 2. The Makefile contained just "RunTests" for running the tests; it should be "./RunTests". 3. Changes to the PMW-Music.pfa Postscript font: (i) There was a typo in the data for the "diminished chord sign" character (character 181) - "hlineto" instead of "hmoveto". This didn't seem to bother GhostScript or PostScript printers, but the "fontforge" utility noticed it and complained. (Note: fontforge has other problems with the font, which I have not resolved.) (ii) I have increased the thickness of the minim notehead by a small amount. 4. There is a new command line option -nowidechars (-nw) which stops PMW from using the 100-point wide stave characters when printing staves. Instead, staves are constructed entirely from the 10-point wide characters. This option is provided because it seems that some PostScript interpreters cannot deal correctly with the very wide characters. Using the standard 5-line stave, a 310-point stave is normally printed as the string FFFC. With the new option, it is printed as CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC. 5. A simple facility for specifying default options has been created. When PMW starts up, it looks in the user's home directory for a file called .pmwrc. If this file exists, its contents are read and used to modify the PMW command line. White space (spaces, tabs, or newlines) in the file are used to separate items. Each item is added to the command line, before the given arguments. Thus, for example, if you always want to make use of the -nowidechars option, all you need to do is to create a .pmwrc file that contains -nowidechars and the effect is as if you type "-nowidechars" immediately after "pmw" every time you run it. If you insert an option that requires data, the data item must also be given in the .pmwrc file. For example, the file might contain -midi /usr/tmp/pmw.midi if you always want to create MIDI output. Omitting the file name causes an error. Note that PMW does not allow options to be repeated, so if an option is present in the .pmwrc file, it cannot also be given on the command line. There is no way to override individual options that are set in the .pmwrc file. However, if the first option on the command line is "-norc", the file is not used at all. 6. A new option, -includefont, is provided to cause PMW to include the music font within the PostScript output that it generates. (If the PMW-Alpha font is used, that is also included.) If you use this option, there is no need to install the font(s) for GhostScript (or any other display program) to find. However, it does mean that each PMW output file is bigger by 37K for PMW-Music and 31K for PMW-Alpha. 7. New options -duplex and -tumble are provided to set the duplex and tumble printing options in the PostScript output. 8. A semicolon that did not immediately follow a beamable note was ignored. (Way back in pre-history, space was the beam separator, and semicolon was needed as a general separator, but this changed a very long time ago.) This meant that errors such as "b-b-[endslur];" were not diagnosed, though if a comma were used instead, there would be an error. I have now removed the use of semicolon as a general separator - hopefully it is rarely used - and stuck in explicit diagnostics for misplaced semicolons and commas. 9. Fixed an extremely obscure bug that caused the loss of some ties in a chord when the "p" facility was used. For example, for this sequence: (#a`-d-)_ p_ P+._ | (A`+.D+.) | one tie was lost between the final two chords. It is possible that other specific sequences could also have provoked the bug. 10. It is now possible to use "p" and "x" at the start of a bar to repeat the note or chord at the end of the previous bar. If there is no tie, the accidentals are repeated; if there is a tie, they are not. If there is a subsequent use of "p" or "x" after one or more tied notes, the accidentals *are* repeated, according to the usual notation convention. 11. The Makefile has been updated so that, after installing pmw, it runs a script that looks for the "gs" command and, if it finds it, writes some text about how to get GhostScript to use the music fonts. 12. The gracespacing directive has been extended to take a second, optional value. This applies when there is more than one grace note before a main note. The second value specifies the space between the grace notes. The default is the same as the space between the grace note and the main note, and that in turn defaults to 6 points. A "+" or "-" can be used to specify a change to the existing value. For example: gracespacing +2 -1 increases the space between the last gracenote and the main note by 2 points, but reduces the space between multiple gracenotes by one point. If only one number is given to gracespacing, it is used for both values. For example: gracespacing +3 increases both spaces by 3 points. 13. Added an "uninstall" target to the makefile. 14. Transpositions of an octave or more caused PMW to fail with an error message such as "Internal failure - transposition (48, 0, 60, 48)". Such transpositions should now work. 15. There is a new command line option -printgutter. This specifies a distance by which righthand (recto) page images are moved to the right, and lefthand (verso) page images are moved to the left, thus creating a "gutter" for binding when the images are printed doublesided. The -printgutter setting applies only when pages are being printed 1-up. It is ignored for any of the 2-up printing styles. Version 4.06 ------------ 1. I had screwed up spectacularly in the representation of variable length numbers in MIDI files, setting the top bits of the bytes to precisely the wrong values throughout. This meant, for instance, that any long rests in a piece threw the whole MIDI thing out, leading to chaos. Version 4.05 ------------ 1. It is now possible to specify alterative MIDIvoices and MIDIperc files by means of the command line options -MV and -MP, respectively. 2. An incorrect MIDI file was written if there was more than one stave, and there were notes tied over bar lines. An attempt to play such a file using Timidity caused it to stop at the point of error. 3. If just one bar is selected for MIDI generation, and it happens to be the end of a repeat section, PMW does not now carry on to play the repeat. 4. Added the -norepeats (synonym -nr) command line option, to suppress repeats in MIDI output. Version 4.04 ------------ 1. Internal re-arrangement of flags for each note into two 32-bit words instead of one, in order to get more flags available. 2. Added support for writing MIDI files. 3. Added support for transposing chord names in text strings by means of the \t escape sequence. Version 4.03 ------------ 1. The PostScript music font PMW-Music has been converted from a Type 3 to a Type 1 font. The file is now called PMW-Music.pfa, as per the normal convention. This font should display better on the screen, and should also be included in PDF files, thereby making the music therein display better. 2. Added three extra characters to the music font. 3. The PSheader file used a variable called PMSencoding, a hangover from the previous incarnation. Renamed as PMWencoding. 4. If *include was used when the input was the standard input, that is, not a named file, PMW crashed. It no longer crashes; however, if the included name is not absolute, it cannot make it relative to the main input (because there is no name). It just goes ahead and tries to open the file - that is, is it taken as relative to the current directory. 5. --help is now the same as -help, because some people are in the habit of using --help. 6. Arguments in macro calls are now scanned (recursively) for macro calls. For example, &a(&b) first expands &b, then uses the result as the argument for &a. The use of & as an escape now applies only to non-alphanumeric characters. 7. When cue notes and full-sized notes are vertically aligned, augmentation dots are supposed to line up. They weren't. In solving this, I've introduced two states: in the default state, the dots are spaced proportionately according to the size of the cue notes. There is a new option, invoked by [cue/dotalign] which causes them to be placed so that they align with any full-sized notes above or below on the same stave. This is useful when using the cue facility for alternative notes. Version 4.02 ------------ 1. It was still saying "Scribe" in the PostScript output instead of "Writer". 2. Added -manualfeed to set the manual feed flag in the PostScript. 3. Put back the MIDI and playing directives for compatibility with old PMS files, though they have no effect. (They were made to work later - see above.) Version 4.01 ------------ 1. Building problem. It was including one too many "/pmw" components in the path used for finding the PSheader and fontmetrics. 2. Crash if sluroverwarnings was set and the bar following a warning bar did not exist. 3. The -debug option wasn't behaving as documented (debug output to stderr). It was taking the next item on the command line as a file to write to. This is dangerous! It now behaves as documented. 4. PMW-Music change: when being processed by GhostScript, the widths of the short stave characters are now (incorrectly) set as long as the long stave characters. This gives a much better effect in the examples in the manual when converted to PDF. It may also give a better screen display. 5. The PostScript command "a4" was put in the output (this dates from very early PostScript printers). It seems to cause trouble with GhostScript, causing problems in the zoom window, and it doesn't seem to be necessary any more, so I have cut it out. Version 4.00 ------------ Version 4.00 is the first version ported from the RISC OS program to Unix-like systems. A lot of changes were made as part of the porting process. However, the following changes were also made to the application-level logic of the program itself. 1. Removed (commented out) code for playing. (This got added back in later - see above.) 2. Fixed a bug with very long arpeggio squiggles - buffer not big enough - which just doesn't show up on RISC OS. 3. A macro defined with arguments, but no text, didn't remove any arguments that were present when it was called. For example, if you had *Define X(1) @.... followed by &X(3) in the later text, "(3)" got left instead of being removed. 4. There was a place I forgot to record where the code was indirecting through a NULL pointer (for an empty string); on the Acorn this didn't produce an error. ****