music - How to iterate through an array of arrays in PostScript? How to use a font with musical signs? -
I have struggled with some postScript code, and I have very little goal (PostScript language really cool!) < / P>
What do I have so far:
%! PS-Adobe-2.0 / Times-Roman SearchFont 20 ScalefontSetFont / R360 / 12 / DEF / Triades [(C DM M FGM BMB 5) (FGM Bbc DM Amb 5) (BB CM DM EG FMM 5 ) (EB FM GM AB BB CM DMB 5) (AB Bbm CM DB EB FM Gmb 5) (DB EBM FM GB AB Bbm) CMB 5) (F # G # MA # Mb # D # ME # MB5 ) (BC # MD # MAF # G # MA # MB5) (AF # MG # M ABC # MD # MB 5) (A BMS V # M DEF #MG # MB 5) (DMF5MGa BM C # MB5) (GM BM CD MF # B5)] DEF 336 3 Translation Trades {50 MMTO Show 30 Rotate} < / Code> This gives me a page with 12 strings spaced through a circle, but there is a problem with this approach: it automatically spaces it, so in a number of chords in the < Code> # , the line grows and the chords are far more distant from each other. I tried to loop the nested, printing a print after the other, but he did not really work here, whatever I tried here is:
%! PS-Adobe-2.0 / Times-Roman SearchFont 20 Scalphont Setfont / R3602 / DF / TennesEir [[(C DM M FG MBM M5)] [(FGM MBBC DM Amb 5)] [( BBM DM DM EB FGM MB5) [(AB FM GM AB BB CM DMB 5)] [(AB Bbm CM DB EB FM Gmb 5)] [(DB EBM FM GB AB Bbm CMB 5)] [(F # G # MA # Mb # D # ME # MB 5)] [(BC # MD # MAF # G # MA # MB5)] [(EF # MG # M ABC # MD # A B5) [[(a BM C # M DEF # MG # MB5)] [(DMFFM # MA BM C # MB5)] [(GM BM CD MF # B5)]] DEF 336 396 for translation quarterly ARR {50 moveto {50 0 moveto show} forall 30 rotate} forall showpage For some reason, both outputs are similar. How can I fix this?
Another topic is: How to use fonts with music symbols? I wanted chords like BBM to make a real flat sign instead of b letters Any direction given here would be appreciated.
Thank you very much.
Inspection: An array of stars is the most suitable data structure for the job? It seamed me like the easiest and straighfoward one, if you were programming it, would you use other data structure instead?
I think you should expect that moveto should be relative, this is not it, on this page Specifies a full position. So take your outer loop to 50,0, your internal loop runs in 50,0 (which is the same place) and pulls the string. Then you wander 30 degrees, go to 50,0, go to 50,0 again and so on. You will notice immediately as it is similar to your first code piece, that is why you get the same output.
If you want a relative mameto then you have to rmoveto instead of moveto.
Of course, I am totally misunderstood what you want to achieve .....
There are a few ways to use a font that you use are doing;
If you can install fonts for the interpreter, just call the font as if you are for Times-Roman.
You can embed the font in the postscript file and in the same way, in this case you can send a postScript file to someone who does not have fonts and it will still print properly.
If font types are 1 fonts then you can embed them directly Note: By looking at any one of these packages, I know that .pfb files (printer font binary) that you can not use directly They have to decode you. You can not directly use TrueType (or open type) fonts, they need to convert to 42 fonts (or with CFF outline in the case of an open type font, in type 2 font).
I 'is not completely sure what you are trying to do, so it is difficult to criticize your attitude. Note that my music knowledge is essentially zero, which may not help Does .....
Comments
Post a Comment