executables.
* Documentation/user/converters.itely:
* Documentation/user/invoking.itexi: Fix `invocation' node names,
in line with standard dir entries.
* Documentation/user/convert-ly.itexi
* Documentation/user/ly2dvi.itexi: Remove.
* scripts/ly2dvi.py: Add pseudo-filter (and stdout output)
support.
* lily/main.c:
* lily/paper-score.cc :
* lily/gourlay-breaking.cc: Write info to stderr.
-2002-08-14 Mats Bengtsson <mats.bengtsson@s3.kth.se>
+2002-08-14 Jan Nieuwenhuizen <janneke@gnu.org>
- * Documentation/user/{tutorial.itely, introduction.itely}:
- Small fixes.
+ * Documentation/user/lilypond.tely: Add dir entries for
+ executables.
-2002-08-14 Jan Nieuwenhuizen <janneke@gnu.org>
+ * Documentation/user/converters.itely:
+ * Documentation/user/invoking.itexi: Fix `invocation' node names,
+ in line with standard dir entries.
+
+ * Documentation/user/convert-ly.itexi
+ * Documentation/user/ly2dvi.itexi: Remove.
+
+ * scripts/ly2dvi.py: Add pseudo-filter (and stdout output)
+ support.
+
+ * lily/main.c:
+ * lily/paper-score.cc :
+ * lily/gourlay-breaking.cc: Write info to stderr.
* buildscripts/help2man.pl: Update to latest version from Debian.
Fixes generation of man pages with perl 5.6.1.
* GNUmakefile.in: Add python link to build-datadir. Fixes
generation of midi2ly man page.
+2002-08-14 Mats Bengtsson <mats.bengtsson@s3.kth.se>
+
+ * Documentation/user/{tutorial.itely, introduction.itely}:
+ Small fixes.
+
2002-08-13 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/beam.cc (least_squares): Add comment.
(arbitrary guess).
(beamed-lengths): Standard length for all beams.
(beamed-minimum-free-lengths):
-o (beamed-extreme-minimum-free-lengths): New property.
+ (beamed-extreme-minimum-free-lengths): New property.
* input/regression/beam-default-lengths.ly:
* input/regression/beam-shortened-lengths.ly: New file.
+++ /dev/null
-@c -*-texinfo-*-
@chapter Converting from other formats
@menu
-* Older LilyPond versions::
-* Importing MIDI::
-* Importing Finale :: Upgrading from older
-* Importing ABC::
-* Importing PMX::
-* Importing Musedata ::
-* Importing MUP::
+* Invoking convert-ly:: Older LilyPond versions.
+* Invoking midi2ly:: Importing MIDI.
+* Invoking etf2ly:: Importing Finale.
+* Invoking abc2ly:: Importing ABC.
+* Invoking pmx2ly:: Importing PMX.
+* Invoking musedata2ly:: Importing Musedata.
+* Invoking mup2ly:: Importing MUP.
@end menu
-@node Older LilyPond versions
-@section Older LilyPond versions
+@node Invoking convert-ly
+@section Invoking convert-ly
Convert-ly sequentially applies different conversions to upgrade a
Lilypond input file. It uses @code{\version} statements in the file to
Not all language changes are handled. Only one output options can be specified.
-@node Importing MIDI
-@section Importing MIDI
+@node Invoking midi2ly
+@section Invoking midi2ly
@cindex MIDI
@end table
-@node Importing Finale
-@section Importing Finale
+@node Invoking etf2ly
+@section Invoking etf2ly
@cindex ETF
@cindex enigma
etf2ly.
-@node Importing ABC
-@section Importing ABC
+@node Invoking abc2ly
+@section Invoking abc2ly
@cindex ABC
abc2ly ignores the ABC beaming.
-@node Importing PMX
-@section Importing PMX
+@node Invoking pmx2ly
+@section Invoking pmx2ly
PMX is a MusiXTeX preprocessor written by Don Simons. More information
on PMX is available from the following site:
@end table
-@node Importing Musedata
-@section Importing Musedata
+@node Invoking musedata2ly
+@section Invoking musedata2ly
@cindex Musedata
@cindex CCARH
musedata2ly converts only a small subset musedata.
-@node Importing MUP
-@section Importing MUP
+@node Invoking mup2ly
+@section Invoking mup2ly
MUP (Music Publisher) is a shareware music notation program by Arkkra
Enterprises. It is also the name of the input format. Mup2ly will
@chapter Invoking LilyPond
@menu
-* Reporting bugs::
-* Website::
-* Titling LilyPond scores::
+* Reporting bugs::
+* Website::
+* Invoking ly2dvi:: Titling LilyPond scores.
@end menu
@cindex Invoking LilyPond
@end example
-
When invoked with a filename that has no extension, LilyPond will try
to add @file{.ly} as an extension first. To have LilyPond read from
stdin, use a dash @code{-} for @var{file}.
website at @uref{http://www.lilypond.org/}.
-@node Titling LilyPond scores
-@section Titling LilyPond scores
+@node Invoking ly2dvi
+@section Invoking ly2dvi
Nicely titled output is created through a separate program:
@file{ly2dvi} is a script that uses LilyPond and La@TeX{} to create a
nicely titled piece of sheet music, in DVI format or PostScript.
-@subsection Invoking ly2dvi
-
-@c ly2dvi needs at least one FILE, can't act as filter yet
@example
ly2dvi [@var{option}]@dots{} @var{file}@dots{}
@end example
+To have ly2dvi read from stdin, use a dash @code{-} for @var{file}.
+
Ly2dvi supports the following options:
@table @code
<!--- @@WEB-TITLE@@=User Manual --->
@end html
+@ignore
+Distributions will want to install lilypond.info doing:
+ ./install-info --info-dir=/usr/share/info out/lilypond.info
+
+@end ignore
@dircategory GNU music project
@direntry
@c ;; prepend GNU for dir, must be unique
-* GNU LilyPond: (lilypond). The GNU music typesetter.
-@c * install-info: (texinfo)Invoking install-info. Update info/dir entries.
-@c * texi2dvi: (texinfo)Format with texi2dvi. Print Texinfo documents.
+* GNU LilyPond: (lilypond). The GNU music typesetter.
+* ly2dvi: (lilypond)Invoking ly2dvi:: Titling LilyPond scores.
+* convert-ly: (lilypond)Invoking convert-ly::
+ Older LilyPond versions.
+* midi2ly: (lilypond)Invoking midi2ly:: Importing MIDI.
+* etf2ly: (lilypond)Invoking etf2ly:: Importing Finale.
+* abc2ly: (lilypond)Invoking abc2ly:: Importing ABC.
+* pmx2ly: (lilypond)Invoking pmx2ly:: Importing PMX.
+* musedata2ly: (lilypond)Invoking musedata2ly::
+ Importing Musedata.
+* mup2ly: (lilypond)Invoking mup2ly:: Importing MUP.
@end direntry
@mbinclude refman.itely
@mbinclude internals.itely
@mbinclude invoking.itexi
-@mbinclude ly2dvi.itexi
@mbinclude lilypond-book.itely
@mbinclude converters.itely
@mbinclude literature.itely
+++ /dev/null
-@c -*-texinfo-*-
-
Another option is to enter the music using your favorite MIDI
sequencer, and then import it using midi2ly. midi2ly is described in
-@ref{Importing MIDI}.
+@ref{Invoking midi2ly}.
@c . {Relative}
@node Relative octaves
indicates for which version the input file was written. When you
compile this file, the version number will be checked, and you will
get a warning when the file is too old. This version number is also
-used by the @code{convert-ly} program (See @ref{Older
-LilyPond versions}), which is used to update the file to the latest
-lily version.
+used by the @code{convert-ly} program (See @ref{Invoking convert-ly}),
+which is used to update the file to the latest lily version.
@node A piano excerpt
}
warning (_ ("couldn't find any font satisfying "));
- scm_write (scm_list_n (point_str0, shape, series , family, rel_str0, SCM_UNDEFINED), scm_current_error_port ());
+ scm_write (scm_list_n (point_str0, shape, series , family, rel_str0,
+ SCM_UNDEFINED), scm_current_error_port ());
scm_flush (scm_current_error_port ());
return scm_makfrom0str ("cmr10");
}
if (verbose_global_b)
- printf ("Optimal demerits: %f\n", optimal_paths.top ().demerits_);
+ {
+ progress_indication (_f ("Optimal demerits: %f",
+ optimal_paths.top ().demerits_) + "\n");
+ }
if (optimal_paths.top ().demerits_ >= infinity_f)
warning (_ ("No feasible line breaking found"));
void call_constructors ();
extern Array<String> get_inclusion_names ();
extern void set_inclusion_names (Array<String>);
+
+/* FIXME: in warn.cc */
void progress_indication (String);
/* options */
ly_init_guile ();
- printf ("\n");
+ progress_indication ("\n");
call_constructors ();
all_fonts_global = new All_font_metrics (global_path.string ());
outputter_ = 0;
if (verbose_global_b)
- ly_display_scm (scm_gc_stats ());
+ {
+ scm_write (scm_gc_stats (), scm_current_error_port ());
+ scm_flush (scm_current_error_port ());
+ }
}
#include <stdio.h>
#include "string.hh"
+#include "main.hh"
void
progress_indication (String s)
verbose_p = 0
preview_p = 0
preview_resolution = 90
+pseudo_filter_p = 0
help_summary = _ ("Generate .dvi with LaTeX for LilyPond")
output_name = ''
-## docme: what does this do?
-targets = [ 'DVI', 'LATEX', 'MIDI', 'TEX']
+# List of output formats that ly2dvi should create
+# Most advanced format first.
+targets = ['DVI', 'LATEX', 'MIDI', 'TEX']
track_dependencies_p = 0
dependency_files = []
if not verbose_p:
progress ( _("Running %s...") % name)
cmd = cmd + ' 1> /dev/null 2> /dev/null'
+ elif pseudo_filter_p:
+ cmd = cmd + ' 1> /dev/null'
return system (cmd, ignore_error, quiet = 1)
-def run_lilypond (files, outbase, dep_prefix):
+def run_lilypond (files, dep_prefix):
opts = ''
-# opts = opts + '--output=%s.tex' % outbase
opts = opts + ' ' + string.join (map (lambda x : '-I ' + x,
include_path))
+ if pseudo_filter_p:
+ opts = opts + ' --output=lelie'
if paper_p:
opts = opts + ' ' + string.join (map (lambda x : '-H ' + x,
fields))
x = x + 1
if not x:
fstr = string.join (files, ', ')
- warning (_ ("no lilypond output found for %s") % fstr)
+ warning (_ ("no LilyPond output found for %s") % fstr)
return tfiles
def one_latex_definition (defn, first):
None
"""
+
latex_fn = outbase + '.latex'
wfs = find_tex_files (files, extra)
elif o == '--postscript' or o == '-P':
targets.append ('PS')
elif o == '--pdf' or o == '-p':
- targets.append ('PDF')
targets.append ('PS')
+ targets.append ('PDF')
elif o == '--keep' or o == '-k':
keep_temp_dir_p = 1
elif o == '--no-lily':
sys.exit (0)
+print 'hallo3'
# Don't convert input files to abspath, rather prepend '.' to include
# path.
include_path.insert (0, '.')
include_path = map (abspath, include_path)
-
-
+if files and (files[0] == '-' or output_name == '-'):
+ if len (files) == 1:
+ pseudo_filter_p = 1
+ output_name = 'lelie'
+ if verbose_p:
+ progress (_ ("pseudo filter"))
+ else:
+ help ()
+ user_error (_ ("pseudo filter only for single input file."), 2)
+
+
original_output = output_name
-if files and files[0] != '-':
+if files:
# Ugh, maybe make a setup () function
files = map (lambda x: strip_extension (x, '.ly'), files)
(outdir, outbase) = ('','')
if not output_name:
outbase = os.path.basename (files[0])
- outdir = abspath('.')
+ outdir = abspath ('.')
elif output_name[-1] == os.sep:
outdir = abspath (output_name)
outbase = os.path.basename (files[0])
if lily_p:
try:
- run_lilypond (files, outbase, dep_prefix)
+ run_lilypond (files, dep_prefix)
except:
# TODO: friendly message about LilyPond setup/failing?
#
targets = []
traceback.print_exc ()
+ # Our LilyPond pseudo filter always outputs to 'lelie'
+ # have subsequent stages and use 'lelie' output.
+ if pseudo_filter_p:
+ files[0] = 'lelie'
+
if 'PNG' in targets and 'PS' not in targets:
targets.append ('PS')
if 'PS' in targets and 'DVI' not in targets:
depfile = os.path.join (outdir, outbase + '.dep')
generate_dependency_file (depfile, depfile)
if os.path.isfile (depfile):
- progress (_ ("dependencies output to `%s'...") % depfile)
+ progress (_ ("dependencies output to `%s'...") %
+ depfile)
+
+ if pseudo_filter_p:
+ main_target = 0
+ for i in 'PDF', 'PS', 'PNG', 'DVI', 'LATEX':
+ if i in targets:
+ main_target = i
+ break
+ outname = outbase + '.' + string.lower (main_target)
+ if os.path.isfile (outname):
+ sys.stdout.write (open (outname).read ())
+ elif verbose_p:
+ warning (_ ("can't find file: `%s'") % outname)
+ targets = []
+
# Hmm, if this were a function, we could call it the except: clauses
for i in targets:
ext = string.lower (i)
cleanup_temp ()
else:
- # FIXME: read from stdin when files[0] = '-'
help ()
user_error (_ ("no files specified on command line."), 2)
-
-
-