moinejf / abc2svg

project moved to https://chiselapp.com/user/moinejf/repository/abc2svg
GNU Lesser General Public License v3.0
48 stars 6 forks source link

How to render diamond-shaped noteheads? #31

Closed Badim150 closed 7 years ago

Badim150 commented 7 years ago

How do I render these diamond-shaped noteheads? image

moinejf commented 7 years ago

You must use head decorations. The note head is drawn by SVG <path> in <defs>. The 'id' is the name of the glyph in %%deco. The decoration name must begin by 'head-'

Here is an example:

%abc2.2
%%pagescale 2

% -- definition of the glyph 'wdmd'
%%beginsvg
<defs>
<path id="wdmd" class="stroke" d="m0 -3
        l4.25 3 -4.25 3 -4.25 -3z\n"         
        style="stroke-width:1.1"/>
</defs>
%%endsvg

% -- white diamond head
%%deco head-wh 0 wdmd 0 0 0

X:1
M:none
L:1/4
K:C clef=none
[e''!head-wh!a]2 | [!head-wh!bb'2]
Badim150 commented 7 years ago

Thank you

joaocc commented 7 years ago

Hi, (Please apologise in advance if my question shows lack of knowledge of how the ABC standard is defined) Shouldn't these musical symbols be defined in the standard (similar to #16) ? Is there any reasonably easy way to propose that "normal" user may request for them to be included? Or is there any special reason for them to be missing? Thanks

moinejf commented 7 years ago

Hi joaocc, The ABC standard progresses very slowly (there was no update since february 2013). Many definitions were added from my abcm2ps in the version 2.0, but without clear explanations. On the other side, some users have very specific requirements, as shaped notes, feathered beams, tablatures, dotted slurs, stems on 2 staves... I added some features by syntax extension to the standard and many new parameters (the documentation is in my site) when the requirements seemed general enough. But, as there were (and still are) a big number of requests, I created escapes in abcm2ps/abc2svg for the users to define by themselves the symbols/glyphs they want. The main escape mechanism is %%deco: the users define the glyphs (in PostScript for abcm2ps and SVG for abc2svg) and puts them in their pages by !decoration!. There are libraries of such decorations, either private (I know some ones, mainly by music teachers) or public (by Hudson Lacerda, Guido Gonzato...). Indeed, these extensions are program (and language) specific, and, up to now, there was no agreement in the ABC mailing-list to let enter such mechanisms into the standard (a 4 months active discussion about drums did not give any result). Now, what is a 'normal' user? I would say someone who wants music sheets as found in the celtic/baroque/classical/song worlds. He/she does not need diamond-shaped noteheads.

joaocc commented 7 years ago

Thanks for the clarification on the process, and for clarifying that there are libraries of such symbols that help address missing symbols.

My meaning for "normal user" should have been "non-ABC developer" that is not familiar with the processes to propose changes to the standard :)

Our diamond-shaped notes appear in a piece called Salut D'Amour by Elgar, which is a classic piece from 1888, and is part of Violin teaching curricula. They mean that the base note should be played with some harmonic effect (my lack of violin knowledge prevents me from being more precise)

In some cases they seem to be represented differently: image. However, in the case of the scores we got, they are represented as diamond shaped.

Thx