]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.76
authorfred <fred>
Sun, 24 Mar 2002 19:48:58 +0000 (19:48 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:48:58 +0000 (19:48 +0000)
Documentation/gnu-music.pod
bin/make-website [new file with mode: 0755]

index f487b5da8fd88bb3ae0205cb9365e5274ac63dec..fbb2d7402f864afa1bf939ec33bf3704cfaee9e0 100644 (file)
@@ -4,7 +4,29 @@ GNU Music project - manifesto
 
 =head1 DESCRIPTION
 
-Random ranting about the GNU Music project
+Random ranting about the GNU Music project. 
+
+=head2 Note
+
+The GNU Music project was started by a few people (among others Robert Strandh,
+Robert.Strandh@labri.u-bordeaux.fr), who wanted to create free software
+for music printing and composing. After its initiation, its
+development efforts slowed down.
+
+Independently, I started LilyPond. When I showed it to
+RMS, he was very enthousiastic about having LilyPond in the GNU
+project. I subsequently learned about the GNU Music project, and
+contacted them.  We (the GNU Music project people and us, LilyPond
+people) agreed that cooperation would be desirable. Although merging
+of both efforts is technically infeasible at this point, we did decide
+that LilyPond should also be part of the GNU Music project (when it is
+really released).
+
+In summary, LilyPond is part of the GNU project, and part of the (yet
+to be created) GNU Music project. LilyPond 's existence does not mean
+that other efforts for free music tools have come to a halt. In
+particular, the following document is entirely mine, and is not meant
+to reflect anyone else's opinion.
 
 =head1 GOAL
 
@@ -94,7 +116,7 @@ Emacs and TeX
 =item easy to use.
 
 That is, for technical users (that can read a manual). The learning
-curve should be as easy as possible but not at the expense of comfort
+curve should be as flat as possible but not at the expense of comfort
 of use and power.
 
 =back
@@ -106,19 +128,25 @@ of use and power.
 =item A set of music fonts
 
 Preferably in Metafont, suited to both screen display and use on
-paper;  This is because the copyright heritage of {Opus,Musix}tex is unclear.
+paper; This is needed because
+
+1. the copyright heritage of
+{Opus,Musix}tex is unclear. 
+
+2. We don't have any legal papers which make these fonts free (to use
+and alter)
 
 =item A typesetting engine
 
 A system with rules on how to set properties of items to be printed
-(up/down directions, breaking, etc) LilyPond provides one, but it is
-not yet suited to interactive typesetting
+(up/down directions, breaking, dimensoins, etc) LilyPond provides one,
+but it is not (yet) suited to interactive typesetting
 
 =item A display engine
 
 which can display clear notewriting in (say) an X-window
 
-Gsharp is there, but far from finished. Ideally the system should
+G-Sharp is there, but far from finished. Ideally the system should
 cooperate with the typesetting engine
 
 =item An ASCII language
@@ -152,7 +180,7 @@ simplifies creating a collection of music
 (difficult) A system to generate accompaniments, figured bass,
 automatic accompaniment, etc.
 
-=item an internet archive of free music
+=item An internet archive of free music
 
 The complete works by Bach, Beethoven, and any other ancient composer
 should be electronically retrievable. This might be a separate
diff --git a/bin/make-website b/bin/make-website
new file mode 100755 (executable)
index 0000000..3a38929
--- /dev/null
@@ -0,0 +1,316 @@
+#!/usr/bin/perl -w
+# stupid script to generate WWW site.
+
+use FileHandle;
+use Getopt::Long;
+my $lily_version;
+my $footstr;
+my $mw_id = "<!make_website!>";
+my $id_str = "make-website 0.2";
+
+sub get_version
+{
+    my ($vstr)=("");
+    open V, "$depth/.version";
+    while (<V>) {
+       s/#.*$//g;
+       next if (/^ *$/);
+       s/^/\$/;
+       s/= *(.*)$/=\"$1\";/;
+       $vstr .= $_;
+    }
+    eval ($vstr);
+    
+    $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
+    
+    # stupid checks.
+    $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
+
+
+    close V;
+}
+
+sub set_html_footer
+{
+    my $MAILADRESS=$ENV{MAILADRESS};
+    my @pw=(getpwuid($<));
+    my $username=$pw[6];
+
+    $footstr = 
+       "\n<hr>Please take me <a href=index.html>back to the index</a>\n<hr>
+<font size=-1>
+This page was generated by <code>" . $id_str . "</code> from lilypond-$lily_version by
+<p>
+<address><br>$username <a href=mailto:$MAILADRESS>&lt<!bla>$MAILADRESS</a>&gt</address>
+<p>" . `date` . "
+<p></font>";
+}
+    
+
+# do something, check return status
+sub my_system
+{
+    my (@cmds) = @_;
+    foreach $cmd (@cmds) {
+       my ($ignoreret)=0;
+       if ( $cmd  =~ /^-/ ) {
+           $ignoreret = 1;
+           $cmd = substr ($cmd, 1);
+       }
+       
+       my $ret =  ( system ($cmd));
+       if ($ret) {
+           if ($ignoreret) {
+               print STDERR "ignoring failed command \`$cmd\' (status $ret)\n";
+           }else {
+               print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n";
+               exit 2;
+           }
+       }
+    }
+}
+
+
+local $base="lilypond/";
+local @examples=("multi", "wohltemperirt" ,"standchen", "toccata-fuga-E", 
+                "scsii-menuetto", "collisions", "cadenza", "scales");
+
+# rhythm, scales, 
+
+
+sub gen_html
+{
+    print "generating HTML\n";
+    my_system "make -kC .. html";
+}
+
+sub ps_to_gif 
+{
+    my ($a)=@_;
+    if (! -f "$a.ps" ) {
+       my_system("gunzip -c $a.ps.gz > $a.ps");
+    }
+    my_system "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE  $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif";
+}
+
+
+sub ps_to_jpeg
+{ 
+    my ($a)=@_;
+    my $in = "$a.ps";
+    
+    my_system "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE  $in -c quit |pnmscale 0.5| cjpeg -grayscale > $a.jpeg";
+}
+
+sub gen_examples
+{
+    print "generating examples: \n";
+    foreach $a (@examples) {
+       $texfile="lelie";
+       $tex = "tex $texfile";
+       if ($a eq "standchen" || $a eq "scsii-menuetto" ) {
+           $tex = "latex $a";
+           $texfile = "$a";
+       }
+       
+       if ( ! -f "$a.ly.txt" ) {
+           my_system "ln $depth/input/$a.ly ./$a.ly.txt";
+       }
+       if (! -f "$a.dvi" ) {
+           my_system "lilypond $a;",
+           "$tex", "-mv $texfile.dvi $a.dvi";
+       }  
+       if ( ! -f "$a.ps.gz" && ! -f "$a.ps" ) {
+           my_system "dvips -o $a.ps $a.dvi";
+       }
+
+       my_system "mv lelie.midi $a.midi; " if ( -f "lelie.midi" );
+
+       # generate the pixmap at twice the size, then rescale (for antialiasing)
+       if ( ! -f "$a.gif" ) {
+           ps_to_gif($a);
+       }
+       if ( ! -f "$a.ps.gz" ) {
+           my_system "gzip -f $a.ps";
+       }   
+    }
+}
+
+my @texstuff = ("mudela-man", "mudela-course");
+
+sub gen_manuals
+{
+    print "generating TeX doco list\n";
+    open HTMLLIST, ">tex_manuals.html";
+    print HTMLLIST "<html><body><title>LilyPond manuals in TeX</title>\n" .
+       "<ul>\n";
+    foreach $a (@texstuff) {
+       my_system( "make -C $depth/Documentation out/$a.dvi");
+       my_system( "dvips $a", "gzip -9f $a.ps");
+       print HTMLLIST "<li><a href=$a.ps.gz>$a.ps.gz</a>";
+    }
+    print HTMLLIST "</ul>";
+    close HTMLLIST;
+}
+
+sub gen_list
+{
+    print "generating HTML list\n";
+    open HTMLLIST, ">example_output.html";
+    print HTMLLIST "<html><body><title>LilyPond examples</title>\n
+These example files are taken from the LilyPond distribution.\n
+LilyPond currently only outputs TeX and MIDI. The pictures and\n
+ PostScript files were generated using TeX, Ghostscript and some graphics tools. \n
+The GIF files have been scaled to eliminate aliasing.";
+    foreach $a (@examples) {
+       $name=$a;
+       print HTMLLIST "<h1>example file: $name</h1>\n<XMP>\n";
+
+       open IF, "$depth/input/$a.ly";
+       input_record_separator IF "%}";
+       
+       $desc = <IF>;
+       close IF;
+       
+       print HTMLLIST "$desc\n</XMP>";
+
+       $inputf="$a.ly.txt";
+       $giff="$a.gif";
+       $jpegf="$a.jpeg";
+       $pngf = "$a.png";
+       $psf="$a.ps.gz";
+       $midif="$a.midi";
+       
+       print HTMLLIST "<ul>";
+
+       print HTMLLIST "<li><a href=$inputf> The input file</a>"
+           if ( -f $inputf );
+       
+       print HTMLLIST "<li><a href=$giff>The output (picture)</a>"     
+           if ( -f $giff );
+
+       print HTMLLIST "<li><a href=$psf>The output (PS)</a>\n"
+           if ( -f $psf );
+               
+       print HTMLLIST "<li><a href=$midif>The output (MIDI)</a>\n" 
+           if ( -f $midif );
+       print HTMLLIST "</ul>";
+    }
+    print HTMLLIST "</BODY></HTML>";
+    close HTMLLIST;
+}
+
+sub edit_html
+{
+    print STDERR "adding footer\n";
+
+    OUTER:
+    foreach $a (<*.html>) {
+       open H, "$a";
+       my $sep="</BODY>";
+       input_record_separator H $sep;
+       my $file="";
+       
+       while (<H>) { 
+           if (/$mw_id/) {
+               close H;
+               next OUTER;
+           }
+           $file .= $_; 
+
+       }
+       close H;
+
+       my $subst =  $footstr;
+       $subst .= $back if (! $a =~ /index.html/ );
+       $file =~ s/$sep/$subst$sep/g ;
+       $file =~ s/\.gif/\.$image/g;
+       open H, ">$a";
+       print H $mw_id;
+       print H $file;
+       close H;
+    }
+}
+
+sub copy_files
+{  
+    print "copying files\n";
+    print `ln -s $depth/out ./docxx` if ( ! -x "docxx" ) ;
+    my_system "cp $depth/TODO ./TODO.txt",
+    "cp $depth/NEWS ./NEWS.txt",
+    "cp ../lelie*gif .";
+}
+
+sub set_images
+{
+    for $a (<*.gif>) {
+       if ($opt_png) {
+           my_system "gif2png -d $a";
+       }
+       if ($opt_jpeg) {
+           my $b=$a;
+           $b =~ s/.gif/.jpeg/;
+           my_system "cjpeg -o $b $a";
+       }
+    }
+}
+
+sub docxx_update
+{
+    my_system "make -C $depth doc++";
+}
+
+sub do_tar
+{
+     print "tarring.\n";
+     $files = join (' ', < *.html *.$image *.ps.gz *.txt *.midi docxx/*>);
+     my_system
+        "-tar vhcf website.tar $files;",
+        "gzip -f9 website.tar;";
+}
+
+sub identify
+{
+    print STDERR "This is " . $id_str . "\n";
+    
+}
+sub main
+{
+    identify;
+    GetOptions("jpeg", "gif", "png", "noexamples");
+
+    local $image="gif" ;
+    $image = "png" if ($opt_png);
+    $image = "jpeg" if ($opt_jpeg);
+    
+    $depth = "../";
+    my $cwd;
+    chomp($cwd = `pwd`);
+    die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
+    get_version;
+    set_html_footer;
+
+
+    $depth = "../../";
+
+    chdir ("out");
+    $ENV{"TEXINPUTS"} .= ":$depth/input/:";
+    $ENV{"LILYINCLUDE"} = "$depth/input/";
+
+
+    gen_html;
+    copy_files;
+    if (! $opt_noexamples) {
+       gen_examples;
+       gen_list;
+    }
+    gen_manuals;
+    set_images;
+
+    edit_html;
+    docxx_update;
+    do_tar;
+}
+
+main;