view release on metacpan or search on metacpan
Add --syntax and --lilypond options.
Add help for syntax and lilypond syntax.
Allow numeric (bpm) argument for !ly directive.
Add example song, free of copyrights.
Be liberate with 'chord' names.
Finetuning of new musical symbols.
Rename songs to use .ptb file extension instead of .dat.
2.024 Dec 07 2012
Add a different musical symbols font to prevent PDF conversion
problems.
Remove some obsolete code.
2.023 Jan 16 2012
Add (experimental) support for high notes.
Fix problem with transposing bass/high notes.
Fix LilyPond comments (single % is sufficient).
2.021 Apr 19 2011
lib/App/Music/PlayTab/Chord.pm
lib/App/Music/PlayTab/LyChord.pm
lib/App/Music/PlayTab/Note.pm
lib/App/Music/PlayTab/NoteMap.pm
lib/App/Music/PlayTab/Output.pm
lib/App/Music/PlayTab/Output/Dump.pm
lib/App/Music/PlayTab/Output/PDF.pm
lib/App/Music/PlayTab/Output/PostScript.pm
lib/App/Music/PlayTab/Output/PostScript/Preamble.pm
lib/App/Music/PlayTab/Version.pm
lib/App/Music/PlayTab/res/fonts/MusicSymbols.ttf
zzexamples/TOC
zzexamples/allblues.ptb
zzexamples/anighttunisia.ptb
zzexamples/autumnleaves.ptb
zzexamples/badlands.ptb
zzexamples/bamboo.ptb
zzexamples/bbrevival.ptb
zzexamples/bluebossa.ptb
zzexamples/bluestrans.ptb
zzexamples/bluetrain.ptb
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
# Globals.
my $ps =
{ papersize => [ 595, 840 ], # A4, portrait
marginleft => 50,
margintop => 40,
marginbottom => 50,
marginright => 45, # only used for page number!
lineheight => 15,
fonts => {
title => { name => 'Helvetica',
file => 'ArialMT.ttf',
size => 16 },
subtitle => { name => 'Helvetica',
file => 'ArialMT.ttf',
size => 12 },
chord_n => { name => 'Helvetica',
file => 'ArialMT.ttf',
size => 17 },
chord_cn => { name => 'Myriad-CnSemibold',
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
my ( $pkg, $args ) = @_;
my $self = bless { }, $pkg;
$self;
}
# Init the backend.
sub setup {
my ( $self, $args, $title ) = @_;
@delta_values = ( 0, 0, 0 );
$ps->{fonts}->{chord} = $ps->{fonts}->{chord_n};
@mediabox = ( 0, 0, @{ $ps->{papersize} } );
if ( $args->{opus}->{globalsettings} ) {
$self->globalsettings( $args->{opus}->{globalsettings} );
}
my $options = { pagedefs_default => { pdf => $ps } };
$self->pagesettings($options);
$ps = $self->{ps};
# Add font dirs.
for my $fontdir ( $self->{fontdir}, ::findlib("fonts"), $ENV{FONTDIR} ) {
next unless $fontdir;
if ( -d $fontdir ) {
warn("PDF: Adding fontdir $fontdir\n");
PDF::API2::addFontDirs($fontdir);
}
else {
warn("PDF: Ignoring fontdir $fontdir [$!]\n");
undef $fontdir;
}
}
$self->initfonts($options);
unless ( $pr ) {
$pr = PDFWriter->new;
my @tm = gmtime(time);
$pr->info( Title => $args->{opus}->{title},
Creator => "PlayTab $App::Music::PlayTab::VERSION",
CreationDate =>
sprintf( "D:%04d%02d%02d%02d%02d%02d+00'00'",
1900+$tm[5], 1+$tm[4], @tm[3,2,1,0] ),
);
}
# newline() is called before setup_line(). Supply standard value.
$yd = -15;
$f_chord = $ps->{fonts}->{chord};
$f_msyms = $ps->{fonts}->{msyms};
}
sub globalsettings {
my ( $self, $args ) = @_;
my @args = @$args;
while ( @args ) {
my $arg = shift(@args);
if ( $arg =~ /^media=(.*)$/ ) {
my $media = $1;
if ( $media eq "800x1280" ) {
# 800x1280 Samsung Galaxy Note 10.1 tablet.
@delta_values = ( -4, 2, 4 );
$condensed = 1;
$ps->{fonts}->{chord} = $ps->{fonts}->{chord_cn};
@mediabox = map { $_ * (72/150) } 80, 435, 800, 1280;
$mediabox[2] += $mediabox[0];
$mediabox[3] += $mediabox[1];
}
elsif ( $media =~ /^(ipad|960x1280)$/ ) {
# 768x1024 iPad2.
@delta_values = ( -7, 2, -10 );
$condensed = 0;
$ps->{fonts}->{chord} = $ps->{fonts}->{chord_cn};
@mediabox = map { $_ * (72/150) } 70, 440, 960, 1280;
$mediabox[2] += $mediabox[0];
$mediabox[3] += $mediabox[1];
}
elsif ( $media eq "768x1024" ) {
# 768x1024 iPad2.
@delta_values = ( -12, 3, -10 );
$ps->{fonts}->{chord} = $ps->{fonts}->{chord_cn};
@mediabox = map { $_ * (72/150) } 90, 685, 768, 1024;
$mediabox[2] += $mediabox[0];
$mediabox[3] += $mediabox[1];
}
else {
warn("PDF backend: Unrecognized media type: $media\n");
}
next;
}
if ( $arg eq "narrow" ) { #### IN PROGRESS
@delta_values = ( -4, 1, 4 );
$condensed = 1;
$ps->{fonts}->{chord} = $ps->{fonts}->{chord_cn};
@mediabox = map { $_ * (72/150) } 70, 440, 800, 1280;
$mediabox[2] += $mediabox[0];
$mediabox[3] += $mediabox[1];
next;
}
if ( $arg eq "condensed" ) {
$ps->{fonts}->{chord} = $ps->{fonts}->{chord_cn};
next;
}
}
}
# New page.
sub setuppage {
my ( $self, $title, $stitles ) = @_;
$self->pdf_page( 1, $title, $stitles );
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
$barno = $line->{barno};
if ( $condensed ) {
$_ *= 0.7 for $xd, $md;
}
}
sub bar {
my ( $self, $first ) = @_;
$self->checkvspace;
$pr->vline( $x + $md, $y + 13, 16 );
$pr->rtext( $x + $md - 2, $y + 9, $barno, $ps->{fonts}->{barno} )
if $first && defined($barno);
$x += 4;
}
sub chord {
my ( $self, $chord, $dup ) = ( @_, 0 );
if ( ref($chord) =~ /::/ ) {
my $save_x = $x;
my $save_y = $y;
$chord->render;
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
}
sub newline {
my ( $self, $xtra ) = @_;
$x = $ps->{marginleft};
$y += $yd;
$y += ($xtra-1)*$yd if defined $xtra;
}
sub text {
my ( $self, $text, $xxmd, $font ) = @_;
$font ||= $ps->{fonts}->{subtitle};
$xxmd ||= 0;
$self->checkvspace;
$pr->text( $x + $xxmd, $y, $text, $font );
}
sub postfix {
my ( $self, $text ) = @_;
$x += 4;
$self->text( $text, $md );
}
use constant GRIDSTEP => 8;
use constant GRIDSPACE => 10;
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
# Physical newpage, if needed.
$pr->newpage if $pdf_pages++;
# (Re)set coordinates and page number.
$x = $ps->{marginleft};
$y = $ps->{papersize}->[1] - $ps->{margintop};
$pdf_page = $first ? 1 : $pdf_page+1;
# Print title header.
$pr->text( $x, $y, $self->{title} = $title, $ps->{fonts}->{title} );
# Add page number, if not first (or only) page.
if ( $pdf_page > 1 ) {
$pr->rtext( $ps->{papersize}->[0] - $ps->{marginright}, $y,
"Page $pdf_page",
$ps->{fonts}->{subtitle} );
}
$self->newline;
# Add subtitles, if any,
foreach ( @$stitles ) {
$pr->text( $x, $y, $_, $ps->{fonts}->{subtitle} );
$self->newline;
}
# And finally some vertical space.
$self->newline(2);
}
sub checkvspace {
my ( $self ) = @_;
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
# Otherwise, new page.
$self->pdf_page( 0, $self->{title}, [] );
}
################ Page settings ################
#
# Copied from GImager.
use JSON::PP ();
# Setup fonts.
sub initfonts {
my ( $self ) = @_;
}
# API: pagesettings (inheritable)
sub pagesettings {
my ( $self, $options ) = @_;
my $ret = delete( $options->{pagedefs_default} ) || {};
if ( open( my $fd, "<:utf8", $options->{pagedefs} || "pagedefs.json" ) ) {
local $/;
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
marginleft => 130,
margintop => 66,
marginbottom => 40,
marginright => 40,
offsets => [ 50, 300 ],
};
# Use fallback values, if necessary.
$ret->{pdf}->{$_} ||= $def->{$_} foreach keys(%$def);
my $stdfonts =
{ text => {
name => 'Times-Roman',
size => 12,
fallback => "/home/jv/.fonts/TimesNewRomanPSMT.ttf",
},
};
# Use fallback fonts, if necessary.
$ret->{pdf}->{fonts}->{$_} ||= $stdfonts->{$_} foreach keys(%$stdfonts);
unless ( eval { $ret->{pdf}->{papersize}->[0] } ) {
require PDF::API2::Resource::PaperSizes;
my %ps = PDF::API2::Resource::PaperSizes->get_paper_sizes;
$ret->{pdf}->{papersize} = $ps{lc $ret->{pdf}->{papersize}}
}
if ( 0 ) {
open( my $fd, '>:utf8', 'pagedefs.new' );
$fd->print(JSON::PP->new->utf8->canonical->indent(4)->pretty->encode($ret));
$fd->close;
}
$self->{ps} = $ret->{pdf};
}
################ App::Music::PlayTab::Note ################
package App::Music::PlayTab::Note;
# Glyph mappings of the MSyms font.
use constant MS_SHARP => "\x{0021}";
use constant MS_FLAT => "\x{0022}";
use constant MS_NATURAL => "\x{0023}";
sub render {
my ($self) = @_;
my $name = $self->name;
if ( $name =~ /(.)b/ ) {
my $width = $pr->strwidth( $1, $f_chord );
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
}
}
my $chord_small;
my $msym_small;
sub render_small {
my ($self) = @_;
my $name = $self->name;
$chord_small ||= 0.7 * $ps->{fonts}->{chord}->{size};
$msym_small ||= 0.7 * 25;
my $width;
if ( $name =~ /(.)b/ ) {
$width = $pr->strwidth( $1, $f_chord, $chord_small );
$pr->text( $x + $md, $y, $1, $f_chord, $chord_small );
$pr->msym( $x + $md + $width + 1, $y + 3, MS_FLAT, $msym_small );
$width += 1 + $pr->msymwidth( MS_FLAT, $msym_small );
}
elsif ( $name =~ /(.)#/ ) {
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
+ 1 + $pr->msymwidth( MS_SHARP ) + 7;
}
return $pr->strwidth( $name, $f_chord );
}
################ App::Music::PlayTab::Chord ################
package App::Music::PlayTab::Chord;
# Glyph mappings of the MSyms font.
use constant MS_SHARP => "\x{0021}";
use constant MS_FLAT => "\x{0022}";
use constant MS_DIM => "\x{0027}";
use constant MS_HDIM => "\x{0028}";
use constant MS_AUG => "\x{0029}";
use constant MS_MAJOR7 => "\x{002a}";
use constant MS_MINOR => "\x{002b}";
sub render {
my ($self) = @_;
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
################ PDF Writer (low level PDF API) ################
package PDFWriter;
use strict;
use warnings;
use PDF::API2;
use Encode;
my %fonts;
# Glyph mappings of the MSyms font.
use constant MS_FBFILLED => "\x{002e}";
use constant MS_FBX => "\x{002f}";
use constant MS_FBOPEN => "\x{0030}";
sub new {
my ( $pkg ) = @_;
my $self = bless { }, $pkg;
$self->{pdf} = PDF::API2->new;
# $self->{pdf}->{forcecompress} = 0; # development
$self->newpage;
lib/App/Music/PlayTab/Output/PDF.pm view on Meta::CPAN
splice( @_, 1, 0, 1 );
goto &_text;
}
sub ctext {
splice( @_, 1, 0, 0 );
goto &_text;
}
sub msym {
my ( $self, $x, $y, $sym, $size ) = @_;
my $font = $f_msyms;
$size ||= $font->{size};
$self->setfont($font, $size);
$self->{pdftext}->translate( $x, $y );
$self->{pdftext}->text($sym);
}
my %msymwidth;
sub msymwidth {
my ( $self, $sym, $size ) = @_;
my $key = $sym;
$key .= "\0$size" if defined $size;
$msymwidth{$key} ||= do {
my $font = $f_msyms;
$size ||= $font->{size};
$self->setfont($font, $size);
$self->{pdftext}->advancewidth($sym);
};
}
sub _text {
my ( $self, $align, $x, $y, $text, $font, $size ) = @_;
$font ||= $self->{font};
$size ||= $font->{size};
$self->setfont($font, $size);
# $text = encode( "cp1250", $text ) unless $font->{file}; # #### TODO ???
$text =~ s/'/â/g; # '/;
$text =~ s/\x{2007}/ /g; # Figure space.
if ( 0 ) {
warn( "TEXT: ",
'"', $text, '" [ ',
defined $x ? "x=$x " : "",
defined $y ? "y=$y " : "",
$font->{name} ? "font=".($font->{name})." " : "",
$size ? "size=$size " : "",
"]\n" );
}
$self->{pdftext}->translate( $x, $y );
if ( $align > 0 ) {
$self->{pdftext}->text_right($text);
}
elsif ( $align < 0 ) {
$self->{pdftext}->text($text);
}
else {
$self->{pdftext}->text_center($text);
}
}
sub setfont {
my ( $self, $font, $size ) = @_;
$self->{font} = $font;
$self->{fontsize} = $size ||= $font->{size};
$self->{pdftext}->font( $self->_getfont($font), $size );
}
sub _getfont {
my ( $self, $font ) = @_;
$self->{font} = $font;
if ( $font->{file} ) {
return $fonts{$font->{file}} if $fonts{$font->{file}};
my $fn = $font->{file};
warn("PDF: Adding font $fn\n");
$fn =~ s;^.*/([^/]+)$;$1;;
if ( $font->{file} =~ /\.ttf$/ ) {
return $fonts{$font->{file}} =
$self->{pdf}->ttfont( $fn,
-dokern => 1 );
}
if ( $font->{file} =~ /(^.*)\.pf[ab]$/ ) {
my $metrics = "$1.afm";
return $fonts{$font->{file}} =
$self->{pdf}->psfont( $fn,
-afmfile => "$metrics",
-dokern => $font->{file} !~ /msyms/i );
}
}
else {
return $fonts{$font->{name}} ||=
$self->{pdf}->corefont( $font->{name} );
}
}
my %strwidth;
sub strwidth {
my ( $self, $text, $font, $size ) = @_;
$font ||= $self->{font};
$size ||= $font->{size};
my $key = "$text\0$font\0$size";
$strwidth{$key} ||= do {
$self->setfont( $font, $size );
$self->{pdftext}->advancewidth($text);
};
}
sub newpage {
my ( $self ) = @_;
#$self->{pdftext}->textend if $self->{pdftext};
$self->{pdfpage} = $self->{pdf}->page;
$self->{pdfpage}->mediabox( @mediabox );
lib/App/Music/PlayTab/Output/PostScript.pm view on Meta::CPAN
ps_step();
}
sub postfix { # API
my ( $self, $text ) = @_;
ps_skip(4);
$self->text( $text, $md );
}
sub text { # API
my ( $self, $text, $xxmd, $font ) = @_;
$font ||= 'SF';
my $xm = $md;
$md = $xxmd || 0;
ps_move();
print { $self->{fh} } ( $font, ' (', $text, ') show', "\n");
$md = $xm;
}
sub print_hmore {
ps_skip(4);
}
sub print_less {
ps_skip(-4);
}
lib/App/Music/PlayTab/Output/PostScript/Preamble.pm view on Meta::CPAN
tabdict begin
/m { moveto } bind def
/glyphwidth { % name *glyphwidth* wx wy
gsave nulldevice 0 0 moveto glyphshow currentpoint grestore
} bind def
/rshow {
dup stringwidth pop 2 div neg 0 rmoveto show
} bind def
/dim {
currentpoint
/MSyms findfont 7 scalefont setfont
1 8 rmoveto /Dim glyphshow moveto } def
/hdim {
currentpoint
/MSyms findfont 7 scalefont setfont
1 8 rmoveto /HDim glyphshow moveto } def
/minus {
currentpoint
/Symbol findfont 12 scalefont setfont
1 8 rmoveto (-) show moveto } def
/plus {
currentpoint
/Symbol findfont 12 scalefont setfont
1 8 rmoveto (+) show moveto } def
/delta {
/MSyms findfont 6 scalefont setfont
1 -3 rmoveto /Major glyphshow -1 3 rmoveto } def
/sharp {
/MSyms findfont sfsz scalefont setfont
sfsz 5 gt { 2 } { 1 } ifelse 2 rmoveto
/Sharp glyphshow
sfsz 5 gt { 2 } { 1 } ifelse neg -2 rmoveto } def
/flat {
/MSyms findfont sfsz scalefont setfont
sfsz 5 gt { 2 } { 1 } ifelse 2 rmoveto
/Flat glyphshow
%sfsz 5 gt { 2 } { 1 } ifelse neg -2 rmoveto
1 -2 rmoveto } def
/natural {
/MSyms findfont 20 scalefont setfont
2 0 rmoveto /Natural glyphshow -1 0 rmoveto } def
/addn {
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/adds {
/MSyms findfont 5 scalefont setfont
1 -1 rmoveto /Sharp glyphshow 1 1 rmoveto
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/addf {
/MSyms findfont 5 scalefont setfont
1 -1 rmoveto /Flat glyphshow 1 1 rmoveto
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/root {
/Helvetica findfont 16 scalefont setfont
show
/sfsz 6 def
} def
/hroot {
/Helvetica findfont 12 scalefont setfont
show
/sfsz 4 def
} def
/slash {
/Helvetica findfont 16 scalefont setfont
2 -4 rmoveto (/) show } def
/bslash {
/Helvetica findfont 16 scalefont setfont
0 4 rmoveto (\\) show 0 3 rmoveto } def
/susp {
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto (sus) show show 0 3 rmoveto } def
/bar {
1 setlinewidth
currentpoint 0 -3 rmoveto 0 16 rlineto stroke moveto } def
/barn {
gsave /Helvetica findfont 8 scalefont setfont
% 0 14 rmoveto dup stringwidth pop 2 div neg 0 rmoveto
-2 8 rmoveto dup stringwidth pop neg 0 rmoveto
show grestore
bar
} def
/same1 {
/MSyms findfont 4 scalefont setfont
/Same2 dup glyphwidth pop 2 div neg 0 rmoveto glyphshow } def
/rest {
/Helvetica findfont 16 scalefont setfont
/endash glyphshow } def
/TF {
/Helvetica findfont 16 scalefont setfont } def
/SF {
/Helvetica findfont 12 scalefont setfont } def
end
%%EndProcSet
%%BeginProcSet: Grid 0 0
% Routines for the drawing of chords.
/griddict 10 dict def
griddict begin
/gridscale $std_gridscale def
/gridwidth gridscale 5 mul def
/gridheight gridscale 4 mul def
/half-incr gridscale 2 div def
/dot-size gridscale 0.35 mul def
/displ-font /Times-Roman findfont gridscale 1.25 mul scalefont def
/grid { % -- grid --
gsave currentpoint
6
{ 0 gridheight rlineto gridscale gridscale gridwidth sub rmoveto }
repeat
moveto
5
{ gridwidth 0 rlineto 0 gridwidth sub gridscale rmoveto }
repeat
lib/App/Music/PlayTab/Output/PostScript/Preamble.pm view on Meta::CPAN
1 setlinewidth
0 setgray
grid
% Chord offset, if greater than 1.
% offset {...} --
dup () ne
{ gsave
half-incr neg gridheight gridscale sub rmoveto
displ-font setfont
dup stringwidth pop neg half-incr rmoveto show grestore
}
{ pop }
ifelse
1 1 6
{ % fret string {...} --
exch dup
0 ne
{ dot }
lib/App/Music/PlayTab/Output/PostScript/Preamble.pm view on Meta::CPAN
%%EndProcSet
%%EndProlog
%%BeginFont: MSyms
%!PS-AdobeFont-1.0: MSyms 000.100
%%Title: MSyms
%Version: 000.100
%%CreationDate: Fri Dec 7 13:24:47 2012
%%Creator: Johan Vromans
%Copyright: Free as a bird
% 2012-12-7: Created.
% Generated by FontForge 20120731 (http://fontforge.sf.net/)
%%EndComments
10 dict begin
/FontType 1 def
/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def
/FontName /MSyms def
/FontBBox {0 -1561 2494 2089 }readonly def
/PaintType 0 def
/FontInfo 9 dict dup begin
/version (000.100) readonly def
t/50basic.ps view on Meta::CPAN
tabdict begin
/m { moveto } bind def
/glyphwidth { % name *glyphwidth* wx wy
gsave nulldevice 0 0 moveto glyphshow currentpoint grestore
} bind def
/rshow {
dup stringwidth pop 2 div neg 0 rmoveto show
} bind def
/dim {
currentpoint
/MSyms findfont 7 scalefont setfont
1 8 rmoveto /Dim glyphshow moveto } def
/hdim {
currentpoint
/MSyms findfont 7 scalefont setfont
1 8 rmoveto /HDim glyphshow moveto } def
/minus {
currentpoint
/Symbol findfont 12 scalefont setfont
1 8 rmoveto (-) show moveto } def
/plus {
currentpoint
/Symbol findfont 12 scalefont setfont
1 8 rmoveto (+) show moveto } def
/delta {
/MSyms findfont 6 scalefont setfont
1 -3 rmoveto /Major glyphshow -1 3 rmoveto } def
/sharp {
/MSyms findfont sfsz scalefont setfont
sfsz 5 gt { 2 } { 1 } ifelse 2 rmoveto
/Sharp glyphshow
sfsz 5 gt { 2 } { 1 } ifelse neg -2 rmoveto } def
/flat {
/MSyms findfont sfsz scalefont setfont
sfsz 5 gt { 2 } { 1 } ifelse 2 rmoveto
/Flat glyphshow
%sfsz 5 gt { 2 } { 1 } ifelse neg -2 rmoveto
1 -2 rmoveto } def
/natural {
/MSyms findfont 20 scalefont setfont
2 0 rmoveto /Natural glyphshow -1 0 rmoveto } def
/addn {
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/adds {
/MSyms findfont 5 scalefont setfont
1 -1 rmoveto /Sharp glyphshow 1 1 rmoveto
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/addf {
/MSyms findfont 5 scalefont setfont
1 -1 rmoveto /Flat glyphshow 1 1 rmoveto
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/root {
/Helvetica findfont 16 scalefont setfont
show
/sfsz 6 def
} def
/hroot {
/Helvetica findfont 12 scalefont setfont
show
/sfsz 4 def
} def
/slash {
/Helvetica findfont 16 scalefont setfont
2 -4 rmoveto (/) show } def
/bslash {
/Helvetica findfont 16 scalefont setfont
0 4 rmoveto (\\) show 0 3 rmoveto } def
/susp {
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto (sus) show show 0 3 rmoveto } def
/bar {
1 setlinewidth
currentpoint 0 -3 rmoveto 0 16 rlineto stroke moveto } def
/barn {
gsave /Helvetica findfont 8 scalefont setfont
% 0 14 rmoveto dup stringwidth pop 2 div neg 0 rmoveto
-2 8 rmoveto dup stringwidth pop neg 0 rmoveto
show grestore
bar
} def
/same1 {
/MSyms findfont 4 scalefont setfont
/Same2 dup glyphwidth pop 2 div neg 0 rmoveto glyphshow } def
/rest {
/Helvetica findfont 16 scalefont setfont
/endash glyphshow } def
/TF {
/Helvetica findfont 16 scalefont setfont } def
/SF {
/Helvetica findfont 12 scalefont setfont } def
end
%%EndProcSet
%%BeginProcSet: Grid 0 0
% Routines for the drawing of chords.
/griddict 10 dict def
griddict begin
/gridscale 8 def
/gridwidth gridscale 5 mul def
/gridheight gridscale 4 mul def
/half-incr gridscale 2 div def
/dot-size gridscale 0.35 mul def
/displ-font /Times-Roman findfont gridscale 1.25 mul scalefont def
/grid { % -- grid --
gsave currentpoint
6
{ 0 gridheight rlineto gridscale gridscale gridwidth sub rmoveto }
repeat
moveto
5
{ gridwidth 0 rlineto 0 gridwidth sub gridscale rmoveto }
repeat
t/50basic.ps view on Meta::CPAN
1 setlinewidth
0 setgray
grid
% Chord offset, if greater than 1.
% offset {...} --
dup () ne
{ gsave
half-incr neg gridheight gridscale sub rmoveto
displ-font setfont
dup stringwidth pop neg half-incr rmoveto show grestore
}
{ pop }
ifelse
1 1 6
{ % fret string {...} --
exch dup
0 ne
{ dot }
t/50basic.ps view on Meta::CPAN
%%EndProcSet
%%EndProlog
%%BeginFont: MSyms
%!PS-AdobeFont-1.0: MSyms 000.100
%%Title: MSyms
%Version: 000.100
%%CreationDate: Fri Dec 7 13:24:47 2012
%%Creator: Johan Vromans
%Copyright: Free as a bird
% 2012-12-7: Created.
% Generated by FontForge 20120731 (http://fontforge.sf.net/)
%%EndComments
10 dict begin
/FontType 1 def
/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def
/FontName /MSyms def
/FontBBox {0 -1561 2494 2089 }readonly def
/PaintType 0 def
/FontInfo 9 dict dup begin
/version (000.100) readonly def
t/60lilypond.ps view on Meta::CPAN
tabdict begin
/m { moveto } bind def
/glyphwidth { % name *glyphwidth* wx wy
gsave nulldevice 0 0 moveto glyphshow currentpoint grestore
} bind def
/rshow {
dup stringwidth pop 2 div neg 0 rmoveto show
} bind def
/dim {
currentpoint
/MSyms findfont 7 scalefont setfont
1 8 rmoveto /Dim glyphshow moveto } def
/hdim {
currentpoint
/MSyms findfont 7 scalefont setfont
1 8 rmoveto /HDim glyphshow moveto } def
/minus {
currentpoint
/Symbol findfont 12 scalefont setfont
1 8 rmoveto (-) show moveto } def
/plus {
currentpoint
/Symbol findfont 12 scalefont setfont
1 8 rmoveto (+) show moveto } def
/delta {
/MSyms findfont 6 scalefont setfont
1 -3 rmoveto /Major glyphshow -1 3 rmoveto } def
/sharp {
/MSyms findfont sfsz scalefont setfont
sfsz 5 gt { 2 } { 1 } ifelse 2 rmoveto
/Sharp glyphshow
sfsz 5 gt { 2 } { 1 } ifelse neg -2 rmoveto } def
/flat {
/MSyms findfont sfsz scalefont setfont
sfsz 5 gt { 2 } { 1 } ifelse 2 rmoveto
/Flat glyphshow
%sfsz 5 gt { 2 } { 1 } ifelse neg -2 rmoveto
1 -2 rmoveto } def
/natural {
/MSyms findfont 20 scalefont setfont
2 0 rmoveto /Natural glyphshow -1 0 rmoveto } def
/addn {
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/adds {
/MSyms findfont 5 scalefont setfont
1 -1 rmoveto /Sharp glyphshow 1 1 rmoveto
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/addf {
/MSyms findfont 5 scalefont setfont
1 -1 rmoveto /Flat glyphshow 1 1 rmoveto
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/root {
/Helvetica findfont 16 scalefont setfont
show
/sfsz 6 def
} def
/hroot {
/Helvetica findfont 12 scalefont setfont
show
/sfsz 4 def
} def
/slash {
/Helvetica findfont 16 scalefont setfont
2 -4 rmoveto (/) show } def
/bslash {
/Helvetica findfont 16 scalefont setfont
0 4 rmoveto (\\) show 0 3 rmoveto } def
/susp {
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto (sus) show show 0 3 rmoveto } def
/bar {
1 setlinewidth
currentpoint 0 -3 rmoveto 0 16 rlineto stroke moveto } def
/barn {
gsave /Helvetica findfont 8 scalefont setfont
% 0 14 rmoveto dup stringwidth pop 2 div neg 0 rmoveto
-2 8 rmoveto dup stringwidth pop neg 0 rmoveto
show grestore
bar
} def
/same1 {
/MSyms findfont 4 scalefont setfont
/Same2 dup glyphwidth pop 2 div neg 0 rmoveto glyphshow } def
/rest {
/Helvetica findfont 16 scalefont setfont
/endash glyphshow } def
/TF {
/Helvetica findfont 16 scalefont setfont } def
/SF {
/Helvetica findfont 12 scalefont setfont } def
end
%%EndProcSet
%%BeginProcSet: Grid 0 0
% Routines for the drawing of chords.
/griddict 10 dict def
griddict begin
/gridscale 8 def
/gridwidth gridscale 5 mul def
/gridheight gridscale 4 mul def
/half-incr gridscale 2 div def
/dot-size gridscale 0.35 mul def
/displ-font /Times-Roman findfont gridscale 1.25 mul scalefont def
/grid { % -- grid --
gsave currentpoint
6
{ 0 gridheight rlineto gridscale gridscale gridwidth sub rmoveto }
repeat
moveto
5
{ gridwidth 0 rlineto 0 gridwidth sub gridscale rmoveto }
repeat
t/60lilypond.ps view on Meta::CPAN
1 setlinewidth
0 setgray
grid
% Chord offset, if greater than 1.
% offset {...} --
dup () ne
{ gsave
half-incr neg gridheight gridscale sub rmoveto
displ-font setfont
dup stringwidth pop neg half-incr rmoveto show grestore
}
{ pop }
ifelse
1 1 6
{ % fret string {...} --
exch dup
0 ne
{ dot }
t/60lilypond.ps view on Meta::CPAN
%%EndProcSet
%%EndProlog
%%BeginFont: MSyms
%!PS-AdobeFont-1.0: MSyms 000.100
%%Title: MSyms
%Version: 000.100
%%CreationDate: Fri Dec 7 13:24:47 2012
%%Creator: Johan Vromans
%Copyright: Free as a bird
% 2012-12-7: Created.
% Generated by FontForge 20120731 (http://fontforge.sf.net/)
%%EndComments
10 dict begin
/FontType 1 def
/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def
/FontName /MSyms def
/FontBBox {0 -1561 2494 2089 }readonly def
/PaintType 0 def
/FontInfo 9 dict dup begin
/version (000.100) readonly def
t/dummy.pre view on Meta::CPAN
tabdict begin
/m { moveto } bind def
/glyphwidth { % name *glyphwidth* wx wy
gsave nulldevice 0 0 moveto glyphshow currentpoint grestore
} bind def
/rshow {
dup stringwidth pop 2 div neg 0 rmoveto show
} bind def
/dim {
currentpoint
/MSyms findfont 7 scalefont setfont
1 8 rmoveto /Dim glyphshow moveto } def
/hdim {
currentpoint
/MSyms findfont 7 scalefont setfont
1 8 rmoveto /HDim glyphshow moveto } def
/minus {
currentpoint
/Symbol findfont 12 scalefont setfont
1 8 rmoveto (-) show moveto } def
/plus {
currentpoint
/Symbol findfont 12 scalefont setfont
1 8 rmoveto (+) show moveto } def
/delta {
/MSyms findfont 6 scalefont setfont
1 -3 rmoveto /Major glyphshow -1 3 rmoveto } def
/sharp {
/MSyms findfont sfsz scalefont setfont
sfsz 5 gt { 2 } { 1 } ifelse 2 rmoveto
/Sharp glyphshow
sfsz 5 gt { 2 } { 1 } ifelse neg -2 rmoveto } def
/flat {
/MSyms findfont sfsz scalefont setfont
sfsz 5 gt { 2 } { 1 } ifelse 2 rmoveto
/Flat glyphshow
%sfsz 5 gt { 2 } { 1 } ifelse neg -2 rmoveto
1 -2 rmoveto } def
/natural {
/MSyms findfont 20 scalefont setfont
2 0 rmoveto /Natural glyphshow -1 0 rmoveto } def
/addn {
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/adds {
/MSyms findfont 5 scalefont setfont
1 -1 rmoveto /Sharp glyphshow 1 1 rmoveto
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/addf {
/MSyms findfont 5 scalefont setfont
1 -1 rmoveto /Flat glyphshow 1 1 rmoveto
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto show 0 3 rmoveto } def
/root {
/Helvetica findfont 16 scalefont setfont
show
/sfsz 6 def
} def
/hroot {
/Helvetica findfont 12 scalefont setfont
show
/sfsz 4 def
} def
/slash {
/Helvetica findfont 16 scalefont setfont
2 -4 rmoveto (/) show } def
/bslash {
/Helvetica findfont 16 scalefont setfont
0 4 rmoveto (\\) show 0 3 rmoveto } def
/susp {
/Helvetica findfont 12 scalefont setfont
0 -3 rmoveto (sus) show show 0 3 rmoveto } def
/bar {
1 setlinewidth
currentpoint 0 -3 rmoveto 0 16 rlineto stroke moveto } def
/barn {
gsave /Helvetica findfont 8 scalefont setfont
% 0 14 rmoveto dup stringwidth pop 2 div neg 0 rmoveto
-2 8 rmoveto dup stringwidth pop neg 0 rmoveto
show grestore
bar
} def
/same1 {
/MSyms findfont 4 scalefont setfont
/Same2 dup glyphwidth pop 2 div neg 0 rmoveto glyphshow } def
/rest {
/Helvetica findfont 16 scalefont setfont
/endash glyphshow } def
/ta {
/Helvetica findfont 14 scalefont setfont
(T.A.) show } def
/TF {
/Helvetica findfont 16 scalefont setfont } def
/SF {
/Helvetica findfont 12 scalefont setfont } def
end
%%EndProcSet
%%BeginProcSet: Grid 0 0
% Routines for the drawing of chords.
/griddict 10 dict def
griddict begin
/gridscale $std_gridscale def
/gridwidth gridscale 5 mul def
/gridheight gridscale 4 mul def
/half-incr gridscale 2 div def
/dot-size gridscale 0.35 mul def
/displ-font /Times-Roman findfont gridscale 1.25 mul scalefont def
/grid { % -- grid --
gsave currentpoint
6
{ 0 gridheight rlineto gridscale gridscale gridwidth sub rmoveto }
repeat
moveto
5
{ gridwidth 0 rlineto 0 gridwidth sub gridscale rmoveto }
repeat
t/dummy.pre view on Meta::CPAN
1 setlinewidth
0 setgray
grid
% Chord offset, if greater than 1.
% offset {...} --
dup () ne
{ gsave
half-incr neg gridheight gridscale sub rmoveto
displ-font setfont
dup stringwidth pop neg half-incr rmoveto show grestore
}
{ pop }
ifelse
1 1 6
{ % fret string {...} --
exch dup
0 ne
{ dot }
t/dummy.pre view on Meta::CPAN
%%EndProcSet
%%EndProlog
%%BeginFont: MSyms
%!PS-AdobeFont-1.0: MSyms 000.100
%%Title: MSyms
%Version: 000.100
%%CreationDate: Fri Dec 7 13:24:47 2012
%%Creator: Johan Vromans
%Copyright: Free as a bird
% 2012-12-7: Created.
% Generated by FontForge 20120731 (http://fontforge.sf.net/)
%%EndComments
10 dict begin
/FontType 1 def
/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def
/FontName /MSyms def
/FontBBox {0 -1561 2494 2089 }readonly def
/PaintType 0 def
/FontInfo 9 dict dup begin
/version (000.100) readonly def