lewdlime / abcm2ps

abcm2ps is a command line program which converts ABC to music sheet in PostScript or SVG format. It is an extension of abc2ps which may handle many voices per staff. abcm2ps is Copyright © 2014-2016 Jean-Francois Moine.
http://moinejf.free.fr/
GNU General Public License v3.0
82 stars 31 forks source link

(multi-)measure invisible rest X is not supported -- update: at the beginning of voice #36

Closed jasper-e closed 6 years ago

jasper-e commented 6 years ago

I get "Notation 'X' not treated" when I try to use X as (multi-) measure invisible rest accoring to http://abcnotation.com/wiki/abc:standard:v2.2#rests

moinejf commented 6 years ago

Strange: there is no such a message in abcm2ps! May you give a ABC example?

jasper-e commented 6 years ago

I wonder if it is because of my abcm2ps is quite old from the xubuntu distribution: 6.6.17 (June 10, 2012)

I have found a public domain example, I have uploaded it here -- note that the file is in Unicode encoding and in Linux format (no CR/LF).

Thanks in advance for your assistance!

jasper-e commented 6 years ago

One more comment: the actual abc content is not maintained manually but is generated (converted from another format)

moinejf commented 6 years ago

With your tune, I get only these messages:

/tmp/toto.abc:14:193: error: Not enough words for lyric line
/tmp/toto.abc:14:193: error: Not enough words for lyric line
/tmp/toto.abc:14:193: error: Not enough words for lyric line
/tmp/toto.abc:14:78: warning: Line overfull (676pt of 663pt)

There is no 'X' inside the tune. The tune has time errors: it seems that tuplets are missing. For instance:

G2 ('GAB) A2 G2

shoud be

G2 (3GAB A2 G2

About the abcm2ps version, 'X' has been implemented in the version 3 or 4, surely before 2000.

jasper-e commented 6 years ago

Looks like I have recently introduced a bug into my converter in tuplets... Going to correct it. I am going to reinstall abcm2ps then, hoping it solves the issue with invisible rests.

jasper-e commented 6 years ago

Got another example.

jasper-e commented 6 years ago

A comment here: in some other music notation software, I need the invisible rest in order to start with the repeat start bar. I would not like to deal with removal of the measure if possible during my conversion, because I have to deal with that at several places in that case (note lengths, note pitches, chord lengths and chord names, tuplets, lyrics, decorations etc.)

jasper-e commented 6 years ago

Perhaps a bit more interesting example. Here voice 2 has only notes for the responsorial part.

jasper-e commented 6 years ago

By the way abc2xml.py interprets this last example correctly (I have checked with MuseScore), see its output

moinejf commented 6 years ago

I tried your tunes with old versions of abcm2ps, and, I was wrong, 'X' has been implemented in the version 7.0.8 (May 2012). With prior versions, all 'X's (at start of tune or not) are reported by

Notation 'X' not treated

About the invisible rests at start of tune, this raises a problem about measure bar numbering: the anacrusis (incomplete measure) is not counted. For instance, in

G|cdef|g4|

'g4' is the 2nd measure.

Also, with your last tune (Az ég és a föld), abc2svg outputs 2 errors:

/tmp/titi.abc:7:1 Error: C: inside tune - ignored
/tmp/titi.abc:9:1 Error: A: inside tune - ignored

There is no such error with abcm2ps, but the C: and A: fields are also ignored; see http://abcnotation.com/wiki/abc:standard:v2.2#information_fields.

jasper-e commented 6 years ago

Thanks, it turned out I could easily switch to version 7.8.9 (taking the package from a newer ubuntu release, I had even no issues with dependencies at all :) ) and the issue with X is gone! :+1:

With respect to incomplete measures it is surprising that X yields one. I would consider X in itself to complete the measure as it has the length of the whole measure by definition :)

The wrong placement of C:, A: and other information-like fields (even T: as well) is a known issue with my converter, with low/medium priority (I expect it to be quite easy to fix), at the moment the primary focus to get the melody + chords + lyrics + decorations work well.

moinejf commented 6 years ago

About incomplete measures, the problem is not 'X', but 'x'. The normal start of 'Let My People Go' is

B, / | GGFF  | G/GE/-E2  |

where 'G/GE/-E2' is the second measure. When you write

x3x/B, / | GGFF  | G/GE/-E2  |

you set 'G/GE/-E2' as the 3rd measure, and this is wrong.

Otherwise, you can avoid a series of 'X|X|X|X|X|X|X|X|' by 'X8|'. And, more, you can use '&' to insert temporary voices.

Eventually, you can get up-to-date binaries of abcm2ps in Guido's page: http://abcplus.sourceforge.net/ (if you use a ARM v7 machine, I may send you a armhf static binary).