forked from lewdlime/abcm2ps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
features.txt
376 lines (279 loc) · 11.8 KB
/
features.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
Features of abcm2ps 7.6.9 (J.F. Moine, January 2014)
====================================================
abcm2ps tries to follow the ABC standard version 2.1 (december 2011):
http://abcnotation.com/wiki/abc:standard:v2.1
Here are listed only the differences from the standard.
Features not implemented.
========================
Information fields.
- The continuation field ('+:') is implemented for w: only.
- The charsets iso-8859-5 .. iso-8859-8 are not implemented.
Tune body.
- The following decorations are not implemented:
!dacoda!, !dacapo!
- 'U:' fields cannot contain guitar chord nor annotations.
- The values assigned by the 'U:' field are always global (they
are not restored at end of tune).
- Multiple measure overlay (as '&&') is not implemented.
Use the '(& .. & .. & .. &) extension instead.
Text strings.
- The HTML sequences are not implemented.
- The unicode '\Uxxxxxxxx' 32 bits character is not implemented.
Use the UTF-16 surrogates instead.
Features that work differently.
===============================
File structure.
- The T: header field may be omitted when 'X:' is present.
- There is no notion of 'file header': any valid ABC field
found outside the tunes is considered as global, and applies
to the remaining tunes.
Information fields.
- In a tune body, the lines beginning with a letter in range A-G
or a-g and immediately followed by a colon are interpreted as
information fields.
- When the %%abc-version is different from '2.0', the field 'A:' is
'Area', and not 'Author of lyrics'. It is displayed only when
'infoline' is set.
- In 'K:' fields, the list of accidentals may be 'none' (for
no accidental).
- In 'U:' fields, the character may be
'\ ' (back-slash - space) to redefine the character space, or
'\t' (back-slash - t) to redefine the character tabulation.
The default value of these characters is !beambreak! (see below).
Tune body.
- The decorations on notes inside chords cannot be standard ones
because their offset is relative to the note they are attached to,
and not to the chord. They must be explicitly defined by %%deco
and %%postscript.
- '@' in annotations must be followed by the <x> and <y> offsets
of the text from the note position (in points). The <x> and <y>
values are separated by a comma, and <y> may be followed by a
space (usefull if the text begins with a digit, a dot or the
letters 'E' or 'e' - see sample3.abc for an example).
- Grace notes may appear before any symbol and may contain
chords. Their note lengths are handled. The unit note length
is not tied to L: (or M:). Instead, for compatibility, it is:
- a quaver for a single note and
a semi-quaver for many notes in standard tunes,
- a demi-semi-quaver in bagpipe tunes.
Grace notes greater than crotchets are drawn as crotchets.
- Tuplets values may be greater than 9.
- Tuplets may be nested.
Clefs.
- When 'clef=' is present, the clef name may be one of
'G' (treble clef), 'C' (alto clef) or 'F' (bass clef).
The two following definitions are equivalent:
K: clef=F
K: bass
- The suffixes "^8" and "_8" do an octave transposition
(while "+8" and "-8" don't do it).
Multiple voices.
- When the voices are synchronized, a 'P:' field is set in the first
voice, without changing the current voice.
This fixes the common error:
P:A
V:1
..
V:2
..
P:B % misplaced P: (in voice 2)
V:1
% should be here
..
V:2
% and normally repeated here
..
ABC Stylesheet specification.
- The star ('*' = floating voice) is not treated in '%%score'.
- '%%staves' coexists with '%%score'.
The differences of '%%staves' are:
- measure bars are drawn between staves when there is
no '|' between the voice names (this feature is inverted
in %%score).
- A floating voice may be only the second one in a
3 voices brace.
- Some formatting directives are not implemented, and some other
ones are defined. See the file 'format.txt' for details.
Extensions.
==========
File structure.
- Lines starting with '\' (back-slash) are ignored (abc2mtex
compatibility).
Information fields.
- The field 'L:' may contain 'auto' in which case the duration of
each note is adjusted to fulfill the measures.
This value works when the measures are regular (fixed duration).
'L:auto' may be used in each case the measure is regular in a
compatible way.
For instance, the three following lines give a same result:
- standard ABC:
L:1/4
cccd | e2d2 | cedd | c4 |
- auto L:
M:C % required
L:auto
cccd | ed | cedd | c |
- compatible
M:C % required
L:auto
cccd | e2d2 | cedd | c4 |
- The field 'M:' may specify more complex meters with a
combination of digits, parenthesis, slashes and blanks.
It may also specify ancient meters as 'M:2' or 'M:3',
and also 'M:o' (perfect minor), 'M:o.' (perfect major),
'M:c' (imperfect minor) and 'M:c.' (imperfect major).
An explicit measure duration may be specified putting its
value after an '=' sign (ex: 'M:C|=2/1').
- 'microscale=<d>' in 'K:' or 'V:' fields defines the
denominator to use in microtonal accidentals (see 'microtone'
pitches below).
- The field 'd:' is the same as 's:' (symbol line).
- In 'U:' fields, !ignore! defines the character as ignored.
This is the default value for the character '`' (back-quote).
- In 'U:' fields, !beambreak! defines the character as stopping
note beaming. This is the default value for the characters
'\ ' (space) and '\t' (tabulation).
Tune body.
- Microtone pitches are indicated by a number or a fraction after
an accidental (and before the note).
There are two ways to define microtone pitches:
- old method (default)
The pitches are indicated by a fraction of semitone as
"^3/4c" (3/4 of a sharp).
When omitted, the numerator defaults to 1 and the
denominator to 2 ("^/c" is the same as "^1/2c").
Support exists for 1/2 and 3/2 sharps and flats. For other
values, PostScript functions must be defined (%%postscript
or %%beginps - see below).
- new method
The pitches are indicated by a fraction of tone
(! not semitone !) when "microscale=<denominator>"
is set in K: or V: information fields.
With this method, only the numerator is to be set after the
accidental as "^3c".
For instance, the two declarations
- without microscale: ^3/2c
- with microscale=4: ^3c
give a same result.
Note: the numerator and denominator cannot be greater than 255.
There are also two ways to implement the accidental drawing
function:
- old method
When neither "microscale=" nor "%%micronewps" are set,
the name of the PostScript function which draws
a microtone accidental is:
<accidental_type><micro_value>
where:
- <accidental_type> is "sh" (sharp) or "ft" (flat)
(may be also "nt", "dsh" or "dft" !)
- <micro_value> is computed from the fraction as:
(<numerator> - 1) * 256 + <denominator> - 1
and it is called with <x> and <y>.
- new method
When either "microscale=" or "%%micronewps" is set,
the name of the PostScript function is:
<accidental_type><fraction of tone>
and it is called with <x> <y> <numerator>.
Note that the <fraction of tone> is two times the pitch
denominator when "microscale=" is not set.
- A note length starting with '0' (zero') indicates a stemless
note.
- A space ('y') may be followed by a width in points.
The default width is 20 pts.
- '[]' is the same as '[|]' (invisible bar).
- ':' (colon alone) is the same as '.|' (dotted bar).
- ']' alone is not a bar. It stops a repeat bracket.
- Repeat bars may contain a set of digits, '-' (hyphen),
',' (comma) or '.' (dot), or even a free string. Ex:
|: ... [1,3 ... :|2,4-6 ... :|["last time" ...
(note that a '[' is needed before the string - this one may
be empty).
- There may be slurs from notes to grace notes and reverse.
- Opening slurs ("(") may be followed by "'" or "," to force their
direction (above or below).
- The tie character ("-") may be followed by "'" or "," to force
the tie direction (above or below).
- The following decorations are added:
!beamon! do not break beaming (on a measure bar)
!beambr1! and !beambr2!
let only 1 or 2 beams from the previous note
!gmark! grace mark ('~' like sign)
!invisible! prevent a symbol to be displayed
!rbstop! stop here the current repeat bracket
!trem1! .. !trem4!
tremolo (on the second of a couple of notes
- see sample4.abc for example)
!xstem! draw a stem up to the note on the previous
staff
!/! .. !///! tremolo on one note
!beam-accel! and !beam-rall!
feathered beam
- There may be decorations on grace notes.
- Multiple lines of guitar chord / annotation may also be
indicated by '\n' or ';' in which case, the lines are of
the same type (gchord or annotation).
The 3 next notations are equivalent:
"_ann1" "_ann2" "G3" "4"
"_ann1;ann2" "G3;4"
"_ann1\nann2" "G3\n4"
(annotation on 2 lines and guitar chord on 2 lines)
The two next notations are NOT equivalent:
"_ann1" "G"
"_ann1;G"
(in the 1st line, 'G' is a guitar chord,
in the 2nd one, it is the 2nd line of the annotation)
A new annotation type may be indicated after a ';' as:
"^above;_below"
Clefs.
- the clef definition should not be in K: or V: information fields.
Better use the %%clef pseudo-comment (see format.txt)
- 'clef=P' is the same as 'perc'.
- When the clef name is 'perc' (or 'P'), accidentals change the
note head glyph. By default, sharp notes are drawn as a 'x'
and flat notes as a circled 'x'. This behaviour may be changed
redefineding the PostScript functions 'pshhd' and 'pfthd', or
defining 'pnthd' (natural), 'pdshhd' (double sharp) and
'pdfthd' (double flat).
- When no clef is specified, clef changes are automatically
inserted when needed ('bass' or 'treble').
- The clef name may be enclosed by double quotes in which case
it is the name of the PostScript function which draws the
clef. The arguments of this function are the x and y offsets.
Multiple voices.
- 'stem=auto' in a V: field re-enables the automatic computation
of the direction of the stems (default).
- For compatibility with previous abcm2ps versions, the V: fields may
contain:
- 'gchord=up' (default) and 'gchord=down'
which forces the display of guitar chords above or
below the staff (see 'gchord' in format.txt).
- 'gstem=up' or 'gstem=down'
which forces the direction of the stems of the grace notes
(see 'gstemdir' in format.txt).
- 'dyn=up', 'dyn=down' or 'dyn=auto'
which forces the place of the dynamic marks (above
or below the staff - default is 'auto' -
see 'dynamic' in format.txt)
- 'lyrics=up', 'lyrics=down' or 'lyrics=auto'
which forces the place of the lyrics (above or below
the staff - default is 'auto' - see 'vocal' in format.txt).
(use pseudo comments instead - see format.txt)
- 'merge' in a V: field makes the voice to go on the same staff
as the previous voice (BarFly compatibility).
- The BarFly voice switch in tune ('V:x <notes>', i.e.
voice + notes on the same line) may work.
- The operator '(&...&...&)' permits voice overlay on many
measures. See sample3.abc for an example.
Text strings.
- The guitar chords and annotations may contain '\#', '\b' and '\='
to display accidentals.
- The strings may contain characters from '\001' to '\005' to display
accidentals. For compatibility, the values '\201' to '\205' are
handled the same way.
- In quoted string, the '%' does not need to be escaped.
- The strings may contain XML character references like "é"
or "𝅘𝅥"
Deprecated ABC syntax.
- Most of the deprecated ABC syntax is supported.
- Some incompatible syntaxes are handled according to the ABC version
of the file as the ABC 2.0 line continuation mechanism.