Converting ABC to PS/PDF with variable number of staves in different parts of the music. The problem is/was a piece of music summarizable as: P: SOLO. [V:1] [| Phrase A1 |] % P: DUET. [V:1] [| Phrase B1 |] [V:2] [| Phrase A2 |] % [V:1] [| Phrase A3 |] [V:2] [| Phrase B2 |] % P: TRIO. [V:1] |: Phrase A4 :| [V:2] |: Phrase B3 :| [V:3] |: Phrase C1 :| This works fine with the original abc2ps and my jcabc2ps, but failed spectacularly with abcm2ps (and apparently some other software). The problem is that some software (e.g., [jc]abc2ps] "restarts" formatting at the P: lines, so the different parts with different numbers of staves are handled as expected. However, abcm2ps has a different interpretation based on the ability to have [P:...] inline, and doesn't start reformatting the music. The result is that the first occurrences of [V:1], [V:2] and [V:3] are put together in the first system of 3 staves, and everything goes wrong from there on. There seems to be two solutions. Jef Moine (abc2ps's author) suggested this: %%score 1 P: SOLO. [V:1] [| Phrase A1 |] % %%score 1 2 P: DUET. [V:1] [| Phrase B1 |] [V:2] [| Phrase A2 |] % %%score 1 2 3 P: TRIO. [V:1] |: Phrase A4 :| [V:2] |: Phrase B3 :| [V:3] |: Phrase C1 :| This seems to work, though it fails with software that doesn't implement the %%score directive. It's probably specific to abcm2ps, unless it gets incorporated into a future standard. Another solution that I stumbled across and Jef also mentions is to include "empty" staff lines, such as: %%staffnonote 0 % Suppress staffs with no notes P: SOLO. [V:1] [| Phrase A1 |] [V:2] [| invisible rests up to P: DUET |] [V:3] [| invisible rests up to P: TRIO |] % P: DUET. [V:1] [| Phrase B1 |] [V:2] [| Phrase A2 |] ... This works with abcm2ps, but is based on the clumsy idea of including dummy staff lines with only rests, plus a command that suppresses them. The %%staffnonote directive is probably not implemented by much software, and isn't in any "standard", so it will probably fail with a lot of ABC software. ... to be continued as I get more info ...