music - How to iterate through an array of arrays in PostScript? How to use a font with musical signs? -



music - How to iterate through an array of arrays in PostScript? How to use a font with musical signs? -

i have struggled postscript code, , i'm reaching goal little little (the postscript language cool!)

what have far is:

%!ps-adobe-2.0 /times-roman findfont 20 scalefont setfont /r 360 12 / def /triades [ (c dm em f g bmb5) (f gm bb c dm emb5) (bb cm dm eb f gm amb5) (eb fm gm ab bb cm dmb5) (ab bbm cm db eb fm gmb5) (db ebm fm gb ab bbm cmb5) (f# g#m a#m b c# d#m e#mb5) (b c#m d#m e f# g#m a#mb5) (e f#m g#m b c#m d#mb5) (a bm c#m d e f#m g#mb5) (d em f#m g bm c#mb5) (g bm c d em f#b5) ] def 336 396 translate triades { 50 0 moveto show 30 rotate } forall showpage

it gives me page 12 chord sequences spread through circle. there problem approach: automatic spacing, line many chords have # in it, line gets bigger , chords more distant 1 another. tried nested loop, printing chors 1 one, didn't work. here's tried:

%!ps-adobe-2.0 /times-roman findfont 20 scalefont setfont /r 360 12 / def /triadesarr [ [(c dm em f g bmb5)] [(f gm bb c dm emb5)] [(bb cm dm eb f gm amb5)] [(eb fm gm ab bb cm dmb5)] [(ab bbm cm db eb fm gmb5)] [(db ebm fm gb ab bbm cmb5)] [(f# g#m a#m b c# d#m e#mb5)] [(b c#m d#m e f# g#m a#mb5)] [(e f#m g#m b c#m d#mb5)] [(a bm c#m d e f#m g#mb5)] [(d em f#m g bm c#mb5)] [(g bm c d em f#b5)] ] def 336 396 translate triadesarr { 50 0 moveto { 50 0 moveto show } forall 30 rotate } forall showpage

for reason, both outputs same. how can prepare it?

there's topic: how utilize font musical signs it? wanted chords bbm have actual flat sign, instead of b letter. tried downloading , using fonts feta, bravura or gonville (or font used in songs package)

any directions here appreciated.

thank much.

obs.: array of strings suitable info construction job? seamed me simple , straighfoward one. if 1 doing program, utilize info construction instead?

i think expecting moveto relative, isn't, specifies absolute position on page. outer loop moves 50,0 inner loop moves 50,0 (which same place) , draws string. rotate 30 degrees, move 50,0, move 50,0 1 time again , on. notice same first code fragment, why same output.

if want relative moveto need rmoveto instead of moveto.

of course, exclusively possible i'm misunderstanding want achieve.....

as using font there couple of ways depending using;

you can install font interpreter, phone call font doing times-roman.

you can embed font in postscript file , same, in case can send postscript file doesn't have fonts , still print correctly.

if fonts type 1 fonts can embed them directly. note: looking @ 1 of these packages notice contains .pfb files (printer font binary) cannot utilize directly, need decode them. cannot utilize truetype (or opentype) fonts straight @ all, need converted type 42 fonts (or in case of opentype font cff outlines, type 2 font).

i'm not exclusively sure trying do, kind of hard critique approach. note musical knowledge nil, doesn't help.....

fonts music postscript

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -