% abcm2ps decorations for guitar notation % % Version 1.0 % Copyright Gek S. Low, 23 July 2006 % % DISCLAIMER: This abcm2ps format file is provided as is, is written for my personal use, and is quite experimental. % There are possibly a number of layout issues. I may introduce changes that are incompatible with abc scores written % with earlier versions of this format file. Use at your own risk. Contributions and suggestions are welcome. % % Free for personal and non-commercial use only. % % List of decorations: % * left hand fingerings: redefined !0! to !4! and added !c0! to !c4! for chords % - For slides, can add !lhsu! and !lhsd! (slide up and down), use !lhsuc! and !lhsdc! for chords % * right hand fingerings: !rhp! (below), !rhi!, !rhm!, !rha! (above) % * strings: still experimental !str1! to !str6! curently display on right side of note. % - This may not be the most ideal solution. Perhaps above or below might be better. % * barres: % - provided via the "trill pairs" approach. 15 positions total. % - as decorations are limited to 128 max in abcm2ps, half barres are not provided. % - I don't see a good way to reduce the number of decorations here. % - Tip: wrapping a "barre pair" around a single note will display the text but not the extending line if distance is short. % * arpeggios and strums % * noteheads: % - diamond noteheads - for harmonics, both solid and outlined % - cross noteheads - for percussive effects, big and small heads % - slash noteheads - for use in chord charts. 2 versions - one for use with z, the other for use with notes % * spacers: quite useful for "pushing up" certain types of decorations (space of size 10) % % postscript section beginps % -- left hand fingering /lefthand { % usage: x y dx dy str lefthand 5 1 roll exch 4 1 roll add 3 1 roll exch add exch M /Bookman-Demi 8 selectfont show}! /lefthand0 { -7 -3 (0) lefthand}! /lefthand1 { -7 -3 (1) lefthand}! /lefthand2 { -7 -3 (2) lefthand}! /lefthand3 { -7 -3 (3) lefthand}! /lefthand4 { -7 -3 (4) lefthand}! /lhsu { %usage: x y lhsu 0.7 SLW -0.8 add exch -8 add exch M -3.5 -1 RL stroke}! /lhsd { %usage: x y lhsd 0.7 SLW 0.8 add exch -8 add exch M -3.5 1 RL stroke}! /lhsuc { %usage: x y lhsu 0.7 SLW 2.2 add exch -13 add exch M -3.5 -1 RL stroke}! /lhsdc { %usage: x y lhsd 0.7 SLW 3.8 add exch -13 add exch M -3.5 1 RL stroke}! % -- left hand fingerings inside chords /lefthand0c { -12 0 (0) lefthand}! /lefthand1c { -12 0 (1) lefthand}! /lefthand2c { -12 0 (2) lefthand}! /lefthand3c { -12 0 (3) lefthand}! /lefthand4c { -12 0 (4) lefthand}! % -- left hand fingerings - slide up /lefthand1su { 2 copy lhsu -8 -3 (1) lefthand}! /lefthand2su { 2 copy lhsu -8 -3 (2) lefthand}! /lefthand3su { 2 copy lhsu -8 -3 (3) lefthand}! /lefthand4su { 2 copy lhsu -8 -3 (4) lefthand}! % -- left hand fingerings - slide down /lefthand1sd { 2 copy lhsd -8 -3 (1) lefthand}! /lefthand2sd { 2 copy lhsd -8 -3 (2) lefthand}! /lefthand3sd { 2 copy lhsd -8 -3 (3) lefthand}! /lefthand4sd { 2 copy lhsd -8 -3 (4) lefthand}! % -- right hand fingering /righthand { % usage: x y str righthand 3 copy pop M 1 copy stringwidth exch -2 div exch RM /Times-Italic 12 selectfont show M}! /righthandp { (p) righthand}! /righthandi { (i) righthand}! /righthandm { (m) righthand}! /righthanda { (a) righthand}! % -- strings /strings { % usage: x y dx dy str strings 5 1 roll exch 4 1 roll add 3 1 roll exch add exch 3 -1 roll 3 copy pop M 1 copy stringwidth exch -2 div exch RM /Times-Roman 10 selectfont show 3.5 add M 0.5 SLW currentpoint 5 0 RM 5 0 360 arc stroke}! /str1 { 18 -4 (1) strings }! /str2 { 18 -4 (2) strings }! /str3 { 18 -4 (3) strings }! /str4 { 18 -4 (4) strings }! /str5 { 18 -4 (5) strings }! /str6 { 18 -4 (6) strings }! % -- barres /sbarre { % usage: str x y sbarre M 1 copy stringwidth exch -2 div exch 3 add RM /Times-Bold 14 selectfont show}! /barre { % usage: w x y str barre 3 copy pop exch -14 add exch M 0 3 RM /Times-Bold 14 selectfont show 3 copy pop pop 20 gt % if too close no need to draw line { 3 4 RM 3 1 roll add exch 7 add lineto 0 -4 RL stroke} if}! /C1 { (CI) barre}! /C2 { (CII) barre}! /C3 { (CIII) barre}! /C4 { (CIV) barre}! /C5 { (CV) barre}! /C6 { (CVI) barre}! /C7 { (CVII) barre}! /C8 { (CVIII) barre}! /C9 { (CIX) barre}! /C10 { (CX) barre}! /C11 { (CXI) barre}! /C12 { (CXII) barre}! /C13 { (CXIII) barre}! /C14 { (CXIV) barre}! /C15 { (CXV) barre}! /barreline { %usage: height x y barreline M 3 0 RM -3 0 RL 3 add 0 exch RL 3 0 RL stroke}! % -- arpeggios and strums /arpu { % usage: height x y arpu 2 copy 4 index add M -6.5 0 RM 2.5 5 RL 2.5 -5 RL fill arp}! /arpd{ % usage: height x y arpd 2 copy M -6.5 0 RM 2.5 -5 RL 2.5 5 RL fill arp}! /strumup { % usage: height x y strumup 2 copy 4 index add M -6.5 0 RM 2.5 5 RL 2.5 -5 RL fill M -4 0 RM 0 exch RL stroke}! /strumdown { 2 copy M -6.5 0 RM 2.5 -5 RL 2.5 5 RL fill M -4 0 RM 0 exch RL stroke}! /topstrumup { % usage: x y str topstrumup M 0 10 RL currentpoint stroke M -2.5 0 RM 2.5 5 RL 2.5 -5 RL fill}! /topstrumdown { M -2.5 5 RM 2.5 -5 RL 2.5 5 RL currentpoint fill M -2.5 0 RM 0 10 RL stroke}! % -- various note heads /diamondsolid { % usage: x y diamondsolid M 0 3 RM -4 -3 RL 0 -1 RL 4 -2 RL 4 3 RL 0 1 RL -4 2 RL fill}! /diamondhollow { % usage: x y diamondhollow M 0 2.5 RM 0.5 SLW -3.5 -2.5 RL currentpoint stroke M 1.5 SLW 3.5 -2.5 RL currentpoint stroke M 0.5 SLW 3.5 2.5 RL currentpoint stroke M 1.5 SLW -3.5 2.5 RL stroke}! /cross { %usage: x y cross 1 SLW M 3.5 2.5 RM -7 -5 RL 7 0 RM -7 5 RL stroke}! /bigcross { %usage: x y cross 1 SLW M 3.5 2.5 RM 2.5 3.5 RM -5 -7 RL 0 7 RM 5 -7 RL stroke}! /slashz { %usage: x y slashz 12 sub M -7 6 RM 11 12 RL 3 0 RL -11 -12 RL -3 0 RL fill}! /slash { exch 1 sub exch M 4 3 RM -9 -12 RL 2 0 RL 9 12 RL -2 0 RL fill}! endps % deco section % -- left hand finering deco 0 1 lefthand0 10 0 0 deco 1 1 lefthand1 10 0 0 deco 2 1 lefthand2 10 0 0 deco 3 1 lefthand3 10 0 0 deco 4 1 lefthand4 10 0 0 deco lhsu 1 lhsu 10 0 0 deco lhsd 1 lhsd 10 0 0 % -- left hand fingering for use with chords deco 0c 1 lefthand0c 10 0 0 deco 1c 1 lefthand1c 10 0 0 deco 2c 1 lefthand2c 10 0 0 deco 3c 1 lefthand3c 10 0 0 deco 4c 1 lefthand4c 10 0 0 deco lhsuc 1 lhsuc 10 0 0 deco lhsdc 1 lhsdc 10 0 0 % -- right hand fingering deco rhp 4 righthandp 10 0 0 deco rhi 3 righthandi 10 0 0 deco rhm 3 righthandm 10 0 0 deco rha 3 righthanda 10 0 0 % -- strings deco str1 1 str1 12 0 0 deco str2 1 str2 12 0 0 deco str3 1 str3 12 0 0 deco str4 1 str4 12 0 0 deco str5 1 str5 12 0 0 deco str6 1 str6 12 0 0 % -- barres deco C1( 5 - 24 0 0 deco C1) 5 C1 24 0 0 deco C2( 5 - 24 0 0 deco C2) 5 C2 24 0 0 deco C3( 5 - 24 0 0 deco C3) 5 C3 24 0 0 deco C4( 5 - 24 0 0 deco C4) 5 C4 24 0 0 deco C5( 5 - 24 0 0 deco C5) 5 C5 24 0 0 deco C6( 5 - 24 0 0 deco C6) 5 C6 24 0 0 deco C7( 5 - 24 0 0 deco C7) 5 C7 24 0 0 deco C8( 5 - 24 0 0 deco C8) 5 C8 24 0 0 deco C9( 5 - 24 0 0 deco C9) 5 C9 24 0 0 deco C10( 5 - 24 0 0 deco C10) 5 C10 24 0 0 deco C11( 5 - 24 0 0 deco C11) 5 C11 24 0 0 deco C12( 5 - 24 0 0 deco C12) 5 C12 24 0 0 deco C13( 5 - 24 0 0 deco C13) 5 C13 24 0 0 deco C14( 5 - 24 0 0 deco C14) 5 C14 24 0 0 deco C15( 5 - 24 0 0 deco C15) 5 C15 24 0 0 deco barreline 2 barreline 0 0 0 % -- arpeggios and strums deco arpu 2 arpu 0 0 0 deco arpd 2 arpd 0 0 0 deco strumup 2 strumup 0 0 0 deco strumdown 2 strumdown 0 0 0 deco topstrumup 3 topstrumup 10 0 0 deco topstrumdown 3 topstrumdown 10 0 0 % -- various noteheads deco head-x 0 cross 0 0 0 deco head-bigx 0 bigcross 0 0 0 deco head-harm-s 0 diamondsolid 0 0 0 deco head-harm-h 0 diamondhollow 0 0 0 deco head-slash 0 slash 0 0 0 deco head-slashz 0 slashz 0 0 0 % -- spacers deco spc 3 - 12 0 0 deco spc( 5 - 12 0 0 deco spc) 5 - 12 0 0