@setfilename programs.info
@settitle Programs
-@node Top, , midi2ly Authors, (dir)
+@node Top, , , (dir)
@top
@menu
* Programs:: Your Softs-
-* convert-mudela:: convert-mudela to newer versions
* Ly2dvi:: Python utility to convert mudela to DVI
* midi2ly:: convert MIDI to -mudela-
@end menu
-@node Programs, convert-mudela, , Top
+@node Programs, , , Top
@chapter Programs
-@node Ly2dvi, Ly2dvi DESCRIPTION, LilyPond Authors, Top
+@node Ly2dvi, , , Top
@menu
* Ly2dvi DESCRIPTION:: Ly2dvi DESCRIPTION
* Ly2dvi SYNOPSIS:: Ly2dvi SYNOPSIS
@end menu
@chapter Ly2dvi
-@node Ly2dvi DESCRIPTION, Ly2dvi SYNOPSIS, Ly2dvi, Ly2dvi
+@node Ly2dvi DESCRIPTION, , , Ly2dvi
@section DESCRIPTION
ly2dvi is a Python script which creates input file for LaTeX,
based on information from the output files from LilyPond.
The majority of this utility came from a bourne script written by Jan
Arne Fagertun name @file{ly2dvi}.
-@node Ly2dvi SYNOPSIS, Ly2dvi OPTIONS, Ly2dvi DESCRIPTION, Ly2dvi
+@node Ly2dvi SYNOPSIS, , , Ly2dvi
@section SYNOPSIS
ly2dvi [options] inputfile[.ly] [....]
-@node Ly2dvi OPTIONS, Ly2dvi Features, Ly2dvi SYNOPSIS, Ly2dvi
+@node Ly2dvi OPTIONS, , , Ly2dvi
@section OPTIONS
@table @samp
DVI file for each.
@end table
-@node Ly2dvi Features, Ly2dvi Environment, Ly2dvi OPTIONS, Ly2dvi
+@node Ly2dvi Features, , , Ly2dvi
@section Features
ly2dvi responds to several parameters specified in the mudela
Specify name of papersize.
@end table
-@node Ly2dvi Environment, Ly2dvi Files, Ly2dvi Features, Ly2dvi
+@node Ly2dvi Environment, , , Ly2dvi
@section Environment
@table @samp
Temporary directory name. Default is /tmp
@end table
-@node Ly2dvi Files, Ly2dvi Initialization Sequence, Ly2dvi Environment, Ly2dvi
+@node Ly2dvi Files, , , Ly2dvi
@section Files
@file{titledefs.tex} is inspected for definitions used to extract
writable to the user.
@end table
-@node Ly2dvi Initialization Sequence, Ly2dvi See Also, Ly2dvi Files, Ly2dvi
+@node Ly2dvi Initialization Sequence, , , Ly2dvi
@section Initialization Sequence
The initialization process reads inputs for several sources. Below is
a list of priorities for lowest to hightest proirity.
Note that this differs slightly from the original bourne shell
version.
-@node Ly2dvi See Also, Ly2dvi Bugs, Ly2dvi Initialization Sequence, Ly2dvi
+@node Ly2dvi See Also, , , Ly2dvi
@section See Also
lilypond(1), tex(1), latex(1)
-@node Ly2dvi Bugs, Ly2dvi Remarks, Ly2dvi See Also, Ly2dvi
+@node Ly2dvi Bugs, , , Ly2dvi
@section Bugs
If you have found a bug, you should send a bugreport.
to this mailinglist).
@end itemize
-@node Ly2dvi Remarks, Ly2dvi Authors, Ly2dvi Bugs, Ly2dvi
+@node Ly2dvi Remarks, , , Ly2dvi
@section Remarks
Many papersizes are now supported. Information on other sizes
archE, b0, b1, b2, b3, b4, b5, flsa, flse, halfletter, ledger, legal,
letter, note
-@node Ly2dvi Authors, midi2ly, Ly2dvi Remarks, Ly2dvi
+@node Ly2dvi Authors, , , Ly2dvi
@section Authors
Python Version author:
@email{daboys@@austin.rr.com, Jeffrey B. Reed},
-@node midi2ly, midi2ly DESCRIPTION, Ly2dvi Authors, Top
+@node midi2ly, , , Top
@menu
* midi2ly DESCRIPTION:: midi2ly DESCRIPTION
* midi2ly OPTIONS:: midi2ly OPTIONS
-* midi2ly DISCLAIMER:: midi2ly DISCLAIMER
-* midi2ly SEE ALSO:: midi2ly SEE ALSO
-* midi2ly Authors:: midi2ly Authors
@end menu
@chapter midi2ly
-@node midi2ly DESCRIPTION, midi2ly OPTIONS, midi2ly, midi2ly
+@node midi2ly DESCRIPTION, , , midi2ly
@section DESCRIPTION
midi2ly translates a MIDI input file to Mudela (GNU LilyPond source
format). midi2ly is part of the GNU LilyPond music typesetting package.
midi2ly [options] midi-file
-@node midi2ly OPTIONS, midi2ly DISCLAIMER, midi2ly DESCRIPTION, midi2ly
+@node midi2ly OPTIONS, , , midi2ly
@section OPTIONS
@table @samp
Assume no double dotted notes.
@end table
-@node midi2ly DISCLAIMER, midi2ly SEE ALSO, midi2ly OPTIONS, midi2ly
-@section DISCLAIMER
-
-midi2ly is copyright 1996, 1997 by its authors. midi2ly is distributed
-as part of GNU LilyPond, under the terms of the GNU General Public
-License. midi2ly is provided without any warranty what so ever.
-midi2ly may be freely distributed. For further information consult
-the GNU General Public License, from the file @file{COPYING}.
-
-@node midi2ly SEE ALSO, midi2ly Authors, midi2ly DISCLAIMER, midi2ly
-@section SEE ALSO
-
-@table @samp
-@item @strong{lilypond}(1)
- The GNU LilyPond music typesetter.
-@end table
-
-@node midi2ly Authors, Top, midi2ly SEE ALSO, midi2ly
-@section Authors
-
-Please consult the documentation file @file{AUTHORS} for more detailed
-information, and small contributions.
-
-@email{janneke@@gnu.org, Jan Nieuwenhuizen}, @uref{http://www.xs4all.nl/~jantien}
-
-
-
-
-
@bye
@item use @file{.dvi}, for the tutorial and reference manual. Do
@example
- make -C Documentation/tex/ dvi
+ make -C Documentation/user/ dvi
@end example
@item use ASCII. Do
using @example
- make -C Documentation/
+ make -C doc
@end example
@end itemize
{
if (dur.ticks_i_)
return dur.ticks_i_;
- return dur2_mom (dur) * Moment (Duration::division_1_i_s);
+ return dur2_mom (dur) * Rational (Duration::division_1_i_s);
}
int
return 1 << type;
}
-Moment
+Rational
Duration_convert::dur2_mom (Duration dur)
{
if (dur.ticks_i_)
- return Moment (dur.ticks_i_, Duration::division_1_i_s);
+ return Rational (dur.ticks_i_, Duration::division_1_i_s);
// or simply assert?
if (dur.durlog_i_<-10)
- return Moment (0);
- Moment mom;
+ return Rational (0);
+ Rational mom;
if (dur.durlog_i_<0)
- mom = Moment (type2_i (-dur.durlog_i_), 1);
+ mom = Rational (type2_i (-dur.durlog_i_), 1);
else
- mom = Moment (1 , type2_i (dur.durlog_i_));
+ mom = Rational (1 , type2_i (dur.durlog_i_));
- Moment delta = mom;
+ Rational delta = mom;
while (dur.dots_i_--)
{
delta /= 2.0;
}
Duration
-Duration_convert::mom2_dur (Moment mom)
+Duration_convert::mom2_dur (Rational mom)
{
if (!mom)
{
// dur.set_plet (type_mom, Duration::division_1_i_s / 4);
- // Moment as_plet_mom = mom / dur.mom ();
- Moment as_plet_mom = mom / dur.length_mom ();
+ // Rational as_plet_mom = mom / dur.mom ();
+ Rational as_plet_mom = mom / dur.length_mom ();
as_plet_mom *= dur.plet_.mom ();
long num = as_plet_mom.num ();
long den = as_plet_mom.den ();
}
Duration
-Duration_convert::mom2standardised_dur (Moment mom)
+Duration_convert::mom2standardised_dur (Rational mom)
{
// if (!dur_array_s.length_i ())
if (!dur_array_s.size ())
assert (dur_array_s.size ());
for (int i = 0; i < dur_array_s.size () - 1; i++)
{
- Moment lower_mom = dur2_mom (dur_array_s[ i ]);
+ Rational lower_mom = dur2_mom (dur_array_s[ i ]);
if (mom <= lower_mom)
{
// all arbitrary, but 3/4 will get rid of the noise...
// kinda ok
- if (i || (mom / lower_mom > Moment (3, 4)))
+ if (i || (mom / lower_mom > Rational (3, 4)))
return dur_array_s[ i ];
else
{
return d;
}
}
- Moment upper_mom = dur2_mom (dur_array_s[ i + 1 ]);
+ Rational upper_mom = dur2_mom (dur_array_s[ i + 1 ]);
if ((mom < upper_mom)
&& ((mom - lower_mom) / lower_mom
< (upper_mom - mom) / upper_mom))
}
-Moment
+Rational
Duration_convert::plet_factor_mom (Duration dur)
{
return dur.plet_.mom ();
}
Real
-Duration_convert::sync_f (Duration dur, Moment mom)
+Duration_convert::sync_f (Duration dur, Rational mom)
{
return mom / dur2_mom (dur);
}
Duration
Duration_convert::ticks2_dur (int ticks_i)
{
- Moment mom (ticks_i, Duration::division_1_i_s);
+ Rational mom (ticks_i, Duration::division_1_i_s);
if (midi_as_plet_b_s)
return mom2_dur (mom);
Duration
Duration_convert::ticks2standardised_dur (int ticks_i)
{
- Moment mom (ticks_i, Duration::division_1_i_s);
+ Rational mom (ticks_i, Duration::division_1_i_s);
Duration dur = mom2standardised_dur (mom);
return dur;
}
bool
Duration_iterator::ok ()
{
- return cursor_dur_.length_mom () <= Moment (4);
+ return cursor_dur_.length_mom () <= Rational (4);
}
#include "string.hh"
#include "source-file.hh"
#include "source.hh"
-#include "moment.hh"
+#include "rational.hh"
#include "duration.hh"
#include "duration-convert.hh"
#include "duration-iter.hh"
}
void
-Duration::compress (Moment m)
+Duration::compress (Rational m)
{
plet_.iso_i_ *= m.num_i ();
plet_.type_i_ *= m.den_i ();
}
-Moment
+Rational
Duration::length_mom () const
{
return Duration_convert::dur2_mom (*this);
/*
- duration-convert.hh -- declare
+ duration-convert.hh -- declare Duration_convert
source file of the LilyPond music typesetter
#define DURATION_CONVERT_HH
#include "duration.hh"
#include "string.hh"
-//#include "array.hh"
#include "array.hh"
/**
That is including (integer + division) representation for MIDI,
and conversion from unexact time representation (best guess :-).
- A Moment (mom) is a Rational that holds the time fraction
+ A Rational (mom) is a Rational that holds the time fraction
compared to a whole note (before also called wholes).
- SUGGESTION: currently a moment in time is called moment too;
- let-s typedef Rational When too, so that we get
- When Staff_column::when (), Moment Voice_element::mom ().
-
[todo]
move all statics to real members, instantiate Duration_convert
object (s).
/// Return 0 if longer than whole note.
static int type2_i (int type);
- /// Return Moment representation (fraction of whole note).
- static Moment dur2_mom (Duration dur );
+ /// Return Rational representation (fraction of whole note).
+ static Rational dur2_mom (Duration dur );
/// Return Mudela string representation.
static String dur2_str (Duration dur );
- /// Return duration from Moment (fraction of whole) representation.
- static Duration mom2_dur (Moment mom );
+ /// Return duration from Rational (fraction of whole) representation.
+ static Duration mom2_dur (Rational mom );
/// Return standardised duration, best guess if not exact.
- static Duration mom2standardised_dur (Moment mom );
+ static Duration mom2standardised_dur (Rational mom );
- /// Return plet factor (not a Moment: should use Rational?).
- static Moment plet_factor_mom (Duration dur );
+ /// Return plet factor (not a Rational: should use Rational?).
+ static Rational plet_factor_mom (Duration dur );
static void set_array ();
/** Return synchronisation factor for mom, so that
mom2_dur (mom / sync_f ) will return the duration dur.
*/
- static Real sync_f (Duration dur, Moment mom );
+ static Real sync_f (Duration dur, Rational mom );
/// Return exact duration, in midi-ticks if not-exact.
static Duration ticks2_dur (int ticks_i );
#define DURATION_HH
#include "fproto.hh"
-#include "moment.hh"
+#include "rational.hh"
#include "plet.hh"
/**
bool plet_b ();
String str () const;
void set_plet (int,int );
- void compress (Moment);
+ void compress (Rational);
static bool duration_type_b (int t);
void set_ticks (int ticks_i );
- Moment length_mom () const ;
+ Rational length_mom () const ;
static int division_1_i_s;
/// Logarithm of the base duration.
#ifndef PLET_HH
#define PLET_HH
-#include "moment.hh"
+#include "rational.hh"
/**
The type and replacement value of a plet (triplet, quintuplet.) Conceptually the same as a rational, but 4/6 != 2/3.
*/
struct Plet {
Plet ();
- Moment mom () const;
+ Rational mom () const;
bool unit_b () const;
int iso_i_; // 2/3; 2 is not duration, maar of count!
int type_i_;
iso_i_ = 1;
}
-Moment
+Rational
Plet::mom () const
{
- return Moment (iso_i_, type_i_);
+ return Rational (iso_i_, type_i_);
}
bool
SCM ly_append (SCM a, SCM b);
SCM ly_eval (SCM a);
SCM ly_func_o (char const* name);
+SCM ly_parse_scm (char const* s, int* n);
SCM ly_quote_scm (SCM s);
void ly_display_scm (SCM s);
String ly_scm2string (SCM s);
#include "array.hh"
-#include "scalar.hh"
-
void read_lily_scm_file (String);
void init_lily_guile ();
#include "ly-symbols.hh"
-/*
- Do It Yourself GC protection.
- */
-SCM ly_protect_scm (SCM s);
-SCM ly_unprotect_scm (SCM s);
void init_ly_protection ();
+unsigned int ly_scm_hash (SCM s);
SCM index_cell (SCM cellp, Direction d);
+
+/*
+ snarfing.
+ */
+void add_scm_init_func (void (*)());
+
+#define ADD_SCM_INIT_FUNC(name, func)\
+class name ## _scm_initter { \
+public:\
+ name ## _scm_initter () \
+ { \
+ add_scm_init_func (func); \
+ } \
+} _ ## name ## _scm_initter; \
+/* end define */
+
+
#endif // LILY_GUILE_HH
struct Break_align_item;
struct Break_req;
struct CHyphen_req;
-struct Chord_tremolo;
-struct Chord_tremolo_engraver;
-struct Chord_tremolo_req;
struct Cadenza_req;
struct Change_iterator;
struct Change_translator;
struct Chord;
struct Chord_name_engraver;
+struct Chord_tremolo;
+struct Chord_tremolo_engraver;
+struct Chord_tremolo_req;
struct Clef_change_req;
struct Clef_engraver;
struct Clef_item;
struct Line_group_engraver;
struct Line_of_score;
struct Line_of_staff;
-struct Simple_spacer;
struct Linestaff;
struct Local_key;
struct Local_key_engraver;
struct Separating_group_spanner;
struct Sequential_music;
struct Simple_music;
+struct Simple_spacer;
struct Simultaneous_music;
struct Single_malt_grouping_item;
struct Skip_req;
struct Vertical_brace;
struct Vertical_spanner;
struct Volta_spanner;
+struct Moment;
-typedef Rational Moment;
-typedef Scope Header;
#endif // LILY_PROTO_HH
#ifndef PAPER_STREAM_HH
#define PAPER_STREAM_HH
-#include <iostream.h>
#include "string.hh"
/** Paper output
Paper_stream (String filename);
/// delegate conversion to scalar class
- Paper_stream &operator <<(Scalar);
+ Paper_stream &operator <<(String);
/// close the file
~Paper_stream();
#include "notename-table.hh"
#include "interval.hh"
#include "identifier.hh"
+#include "lily-guile.hh"
#include "parser.hh"
#include "keyword.hh"
#include "my-lily-lexer.hh"
#include "main.hh"
#include "scope.hh"
#include "input.hh"
+#include "moment.hh"
static Keyword_ent the_key_tab[]={
{"autochange", AUTOCHANGE},
{"repeat", REPEAT},
{"repetitions", REPETITIONS},
{"addlyrics", ADDLYRICS},
- {"scm", SCM_T},
- {"scmfile", SCMFILE},
{"score", SCORE},
{"script", SCRIPT},
{"shape", SHAPE},
// print string. don't forget indent.
Paper_stream&
-Paper_stream::operator << (Scalar s)
+Paper_stream::operator << (String s)
{
for (char const *cp = s.ch_C (); *cp; cp++)
{
default:
-do-doc: $(OUTTXT_FILES)
-
local-WWW: $(OUTHTML_FILES)
echo $^ > $(depth)/wwwlist
-doc: do-doc
-
+local-web:
+ $(MAKE) CONFIGSUFFIX=www local-WWW
footify:
$(footify) $(sort $(wildcard $(outdir)/*.html out/*.html out-www/*.html))
footify-all-command=$(footify) `$(FIND) . -name '*.html' -print`
-#
-YO_FILES := $(wildcard *.yo)
-POD_FILES := $(wildcard *.pod)
-TEXINFO_FILES := $(wildcard *.texinfo)
-OUTYO_FILES = $(addprefix $(outdir)/,$(YO_FILES))
-OUTPOD_FILES = $(addprefix $(outdir)/,$(POD_FILES))
-OUTTEXINFO_FILES = $(addprefix $(outdir)/,$(TEXINFO_FILES))
-
-#
-ALL_DOC_FILES = $(POD_FILES) $(TEXINFO_FILES) $(YO_FILES)
-OUTTXT_FILES = $(OUTYO_FILES:.yo=.txt) $(OUTIN_FILES:.yo=.txt)
-OUTHTML_FILES = $(OUTYO_FILES:.yo=.html) $(OUTIN_FILES:.yo=.html)
-
-OUTREADME_TXT_FILES=$(addprefix $(outdir)/,$(addsuffix .txt, $(README_TOP_FILES)))
-OUTREADME_HTML_FILES=$(addprefix $(outdir)/,$(addsuffix .html, $(README_TOP_FILES)))
-
-ALL_SOURCES += $(ALL_DOC_FILES)
local-help:
-doc:
-#UGH
- true # $(MAKE) -C $(depth)/Documentation all
+doc: local-doc
+ $(LOOP)
+local-doc:
# Ugh. C++ specific.
doc++:
--- /dev/null
+
+POD_FILES := $(wildcard *.pod)
+OUTPOD_FILES = $(addprefix $(outdir)/,$(POD_FILES))
$(outdir)/%.texi: %.texi
cp $< $@
+
# empty
local-WWW: $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.html))
+
+local-doc: $(OUTTXT_FILES)
--- /dev/null
+
+YO_FILES := $(wildcard *.yo)
+OUTYO_FILES = $(addprefix $(outdir)/,$(YO_FILES))
+
+OUTTXT_FILES = $(OUTYO_FILES:.yo=.txt) $(OUTIN_FILES:.yo=.txt)
+OUTHTML_FILES = $(OUTYO_FILES:.yo=.html) $(OUTIN_FILES:.yo=.html)