moinejf / abc2svg

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

Question: PostScript code that works in abcm2ps not working in abc2svg--how to fix? #120

Closed chrisfargen closed 4 years ago

chrisfargen commented 4 years ago
% from https://welltemperedstudio.wordpress.com/code/guitar-marksfmt/
%%beginps
/slashz { %usage: x y slashz
    12 sub
    M -7 6 RM 11 12 RL 3 0 RL -11 -12 RL -3 0 RL
    fill}!
%%endps
%%deco head-slashz 0 slashz 0 0 0
X:1
M:C
L:1/4
K:C
U: s = !head-slashz!
CEGc | "C"sz sz "G7"sz sz | CEGc | "C"sz "Am"sz "Dm7"sz "G7"sz |

Hello! I'm trying to get the above code to work in abc2svg.

Here's the output in abcm2ps:

2020-06-27-131957_1891x262_scrot

However, when I run in the web editor (abc2svg-1.20.11), I get an error message: bind error 'NaN' abc2svg bug - stack: ...

Any guidance appreciated. Thanks in advance.

chrisfargen commented 4 years ago

Got it worked out.

%%beginps
/slashz { %usage: x y slashz
    12 sub
    M -6 20 RM 11 12 RL 3 0 RL -11 -12 RL -3 0 RL
    fill}!
%%endps
%%deco slashz 7 slashz 0 0 0
X:1
M:C
L:1/4
K:C
U: s = !slashz!
U: i = !invisible!
CEGc | "C"siz siz "G7"siz siz | CEGc | "C"siz "Am"siz "Dm7"siz "G7"siz |
moinejf commented 4 years ago

The bug is fixed in the chisel repository by the commit [ee6ac46219]. Thanks.