TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 54
+TOPLEVEL_PATCH_LEVEL = 55
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
-21/Apr/97 LilyPond 0.0.54 1
+19/Apr/97 LilyPond 0.0.53 1
=back
+=head1 BUGS
+
+Not all language changes are handled. Multiple output options won't work
+
+=head1 AUTHOR
+
+Han-Wen Nienhuys <hanwen@gnu.ai.mit.edu>
The Musical Definition Language (Mudela) S<version 2>, has a logical
structure, making use of typing and naming (using identifiers), that
-allows for flexible input, and definition reuse.
+allows for flexible input, and definition reuse. See MANIFESTO for
+reasons and design considerations.
The below included for explanatory purposes only (i.e., for a complete
and up-to-date definition, see F<lily/parser.y> and F<lily/lexer.l>):
As a related note, you should take a look at the examples and the init
-file, as this document does not cover every aspect of mudela yet.
+file, as this document does not cover every aspect of mudela yet, and
+may be out of date.
=head2 Files
=head2 Comments
-Line comments are introduced by a C<%>
+Line comments are introduced by a C<%>.
=head2 Versions
\version "0.0.50";
+A perl-script which tries to convert to newer versions
+(F<convert-mudela.pod>) is included in the LilyPond distribution.
+
=head2 Words
Keywords are preceded by a backslash "\". They contain alphabetic
This is an A flat, (just below 110 Hz concert-pitch). The C<*2/3>
signifies that this note is part of a triplet (3 in stead of 2). The
-duration is one and a half quaver (C<4.>) times 2/3.
+duration is one and a half quaver (C<4.>) times 2/3.
Notenames are just a special kind of identifiers, and can be declared
Please note that these two characters do I<not> necessarrily nest, eg:
[c8 e8(] [)g8 c'8]
+ [c8 c8 c8]2/3 % a triplet
-
-Symbols which can be put at either side of a staff are entered as follows:
+Symbols which can be put at either side (above or below) of a staff
+are entered as follows:
a-^ % marcato, direction: default
a^- % portato, direction: above note
Voice_elements which are produced in two directions: horizontal
(voice like) and vertical (chord like)
-You can start horizontal music by enclosing a sequence of notes with { and }
+A sequence of notes (horizontal) is called simple horizontal, eg
+
+ c4 c4 g4 g4
+
+
+You can also glue two pieces of simple horizontal music together with the
+concatenation operator:
+
+ horOne = \melodic { c c g g }
+ horTwo = \melodic { a a g2 }
+ twinkle = \melodic { \horOne ++ \horTwo }
+
+If you enclose simple horizontal music in braces ( { } ), then you get
+horizontal music:
{ c c g g a a g2 } % twinkle twinkle
its elements. The C<\multivoice> is a construct which is explained
below.
-You can also glue two horizontal pieces music together with
-concatenation operator:
-
- \horOne = \melodic { c c g g }
- \horTwo = \melodic { a a g2 }
- \twinkle = \melodic { \horOne ++ \horTwo }
=head2 Transposition
You can transpose horizontal music in the following way:
- \transpose { d % from c to d that's one octave up.
- { e4 f4 } % the horizontal music
+
+ \melodic {
+ c4 ++ \transpose {
+ d % from c to the d that's one octave down
+ { e4 f4 } % the horizontal music
+ } ++ g4
}
+The result is, as you can see, simple horizontal music again
+
=head2 Rhythms
Rhythms in Mudela are entered identical to Simple mudela.
A meter has this form:
- \meter { 3/4 }
+ \meter 3/4 ;
Rhythmic grouping is a concept closely associated with this. For
example, in a 5/8 meter, the counts are grouped 2+3. In mudela this is
entered as
- \grouping { 8*2 8*3 }
+ \grouping 8*2 8*3 ;
+You can start the piece with a partial measure, the command takes the
+same syntax as grouping:
+ \partial 16*3 4;
+
+Make the piece start with a partial measure [transl?] lasting 1 3/4
+quaver.
=head1 STRUCTURE
% instantiate (=create tex, midi output) the score:
\score{
- \staff{ melody }
- \staff{ accompany }
- \commands{ <score global commands> }
+ \staff{ melodicregs melody }
+ \staff{ melodicregs accompany }
\midi{ <midi definitions> }
- \paper{ <paper and layout definitions }
+ \paper{ <paper and layout definitions> }
}
=head2 Examples
on the paper than actually fits. To reflect this idea (the user asks
more than we can do), the container for this data is called Request.
-A request is done to
-the C<Staff> which contains the C<Voice_element>. The staff decides
-whether to to honor the request, ignore it, or merge it with other
-requests. Merging of requests is preferably done with other requests
-done by members of the same voicegroups (beams, brackets, stems)
+A request is done to the C<Staff> which contains the
+C<Voice_element>. The staff decides whether to to honor the request,
+ignore it, or merge it with other requests. Merging of requests is
+preferably done with other requests done by members of the same
+voicegroups (beams, brackets, stems)
+
+=head2 Staff
+
+The staff is a simple container (containing Voices). The so-called
+"registers" determine the characteristics of the Staff. At this time,
+LilyPond supports the following personalities:
+
+=over 4
+
+=item melodicregs
+
+This makes the staff into a single five line melodic staff.
+
+=item lyricregs
+This makes the staff into a staff which will only set Lyric_requests.
+
+=back
=head1 HISTORY
+pl 55
+ - staff-side robustification
+ - script-on-rest bug
+ - doc update
+ - transpose syntax
+
pl 54
- bugfix Colhpos.cc::OK assert fail.
- Inclusion of MusixTeX MF files,
IMPORTANT
+ * resolve notehead/rest ambiguities and bugs. [HWN]
+ eg, [c8 r8 c8]
+
+
+ * mi2mu man page
+
+ * use Real for y positions.
* update 20 pt table
-
+
* rename mf fonts to avoid conflicts with musixtex
* decent TeX page layout
- * per-pstaff item-widths
+ * per-pstaff item-widths [JCN]
* script priority
* check return status in make_website
- * tutorial
+ * plet.ly
+
+ * a Hands on tutorial [HKN]
This is an assorted collection of stuff that will be done, might be
done, or is an idea that I want to think about
* detect -pipe
- * redo timing stuff <-> pulk to allow \meter 2/4; e2. to work out correctly
+ * redo timing stuff <-> pulk to allow \meter 2/4; e2. to work
+ out correctly
+
+ * key transposition.
* hairpin width
* lilypond - -> crash
- * wohltemperirt.ly
SEVERELY LACKING:
use Getopt::Long;
+
+
+
sub
version_string_conv
{
{
}
+
sub conv_pl52_pl53
{
s/include \"/$1\\include \"/g;
}
+sub conv_pl53_pl54
+{
+ print STDERR "Not smart enough to convert \\transpose\n" if (/\\transpose/) ;
+}
###############################################################
-sub
- usage
+sub usage
{
print STDERR "Usage: convert-mudela\n";
print STDERR "other options: --edit --output=FILE --show-rules\n";
my %minor_conversions = (50 => \&no_conv,
52 => \&conv_pl0_0_50_pl0_0_52,
- 53 => \&conv_pl52_pl53
+ 53 => \&conv_pl52_pl53,
+ 54 => \&conv_pl53_pl54
);
sub versions
{
}
-sub
- show_rules
+sub show_rules
{
print "Rules: ", join(", ", sort keys %minor_conversions), "\n";
}
-sub
- do_conversion
+sub do_conversion
{
my ($from,$to) = @_;
print OUTLY;
}
}
-sub set_auto_from
+
+sub get_auto_from
{
my ($fn)=@_;
my ($ver);
last;
}
}
- die "can't determine mudela version." unless (defined($ver));
+ if (!defined($ver)){
+ print STDERR "can't determine mudela version in $fn.\n";
+ my $u;
+ return $u;
+ }
$ver =~ s/0\.0\.// ;
close INLY;
return $ver;
}
if (( ! -f $infile) && (! $infile =~ /\\.ly$/s ) ){
$infile .= ".ly";
- print STDERR "trying $infile";
+
}
if ($opt_edit && $infile ne "-") {
$outfile = "$infile.NEW";
$infile = "$infile";
}
+ print STDERR "Input $infile.. ";
+
+}
+
+sub do_one_arg
+{
+ set_files;
+
+ local ($from_version, $to_version);
+ $from_version = $opt_from;
+ $to_version = $opt_to;
+
+ ($from_version = get_auto_from $infile) unless defined($opt_from);
+ return if (!defined($from_version));
+
+ my @v = versions;
+ ($to_version = pop @v) unless (defined($opt_to));
+
+
+ die "can't open \`$infile\'" unless open INLY,$infile ;
+ die "can't open \`$outfile\'" unless open OUTLY, ">$outfile";
+
+ do_conversion $from_version, $to_version;
+ close INLY;
+ close OUTLY;
+
+ if ($opt_edit) {
+ rename $infile, "$infile~";
+ rename $outfile, "$infile";
+ }
}
GetOptions ("output=s", "from=i", "to=i", "minor=i", "edit", "show-rules");
}
local ( $infile,$outfile);
-set_files;
-
-
-($opt_from = set_auto_from $infile) unless defined($opt_from);
-
-my @v = versions;
-($opt_to = pop @v) unless (defined($opt_to));
+my $processed_one=0;
-
-die "can't open \`$infile\'" unless open INLY,$infile ;
-die "can't open \`$outfile\'" unless open OUTLY, ">$outfile";
-
-do_conversion $opt_from, $opt_to;
-close INLY;
-close OUTLY;
-
-if ($opt_edit) {
- rename $infile, "$infile~";
- rename $outfile, "$infile";
+while (defined($ARGV[0])) {
+ do_one_arg;
+ shift @ARGV;
+ $processed_one = 1;
}
+do_one_arg unless ($processed_one);
+
-\version "0.0.53";
+\version "0.0.54";
\include "register.ini"
\include "dynamic.ini"
%
% author: unknown. Copyright: none
%
+\version "0.0.54";
cad = \melodic {
\cadenza 1;
% test the Collision resolution
+\version "0.0.54";
two_voice_steminvert = \melodic {
< \multivoice
% when lily can handle this, i-ll type the other 304 bars
% (maybe even sooner :-)
%
+\version "0.0.54";
alto = \melodic{
-\version "0.0.53";
+\version "0.0.54";
\include "this-is-hopefully-a-nonexisting-file"
% copyright: None
%
% declare melody (which will be in *one* staff ) for the lead voice
-\version "0.0.53";
+\version "0.0.54";
melodie = \melodic {
% switch Lilypond in note-mode
% COPYRIGHT: GPL
%
%
-\version "0.0.53";
+\version "0.0.54";
globals=\melodic{
\meter 4/ 4;
c d
\clef "violin" ;
\octave c' ;
- < \transpose { d { e f } } >
+ ++ \transpose { d { e f } } ++
\octave c'' ;
c d
\duration 8 ;
\octave c' ;
|[ a a a a a a a a \! a ]6/9
\octave c'' ;
+
['c->-.-\fermata \< 'g->-.-\fermata d->-.-\fermata a->-.-\fermata
e'->-.-\fermata b'-. f''-. c'''->-.-\fermata \! g'''->-.-\fermata \> ]6/9
[g'''->-.-\fermata c'''->-.-\fermata f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata a->-.-\fermata d->-.-\fermata 'g->-.-\fermata \! 'c->-.-\fermata ]6/9
c1
\duration 8;
+ r8-"text" r8^. r8_. r8 r8 r8 r8 r8
[c-> d-> e-> f->][g-> a-> b-> c'->] % 1
\octave c'; [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
\octave c; [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
% The purpose of this file is to demonstrate features of LilyPond.
% (there is an accompanying LaTeX file, scsii-menuetto.tex)
%
-\version "0.0.53";
+\version "0.0.54";
%% Stuff from MPP version
% \lefttitle{Menuetto}
% \tempo{Moderato}
% The purpose of this file is to demonstrate features of LilyPond.
% (there is an accompanying LaTeX file, standchen.tex)
%
-\version "0.0.53";
+\version "0.0.54";
melodie = \melodic{
\meter 3/4 ;
%
% Public Domain -- typed by by HWN
%
-\version "0.0.53";
+\version "0.0.54";
global = \melodic{
\meter 4/4 ;
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 54
+PATCH_LEVEL = 55
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
/* *************** */
virtual void transpose(Melodic_req const&) const ;
virtual void set_default_group(String g);
- void add(Input_music*);
+ void add(Input_music*inmusic_p);
Complex_music();
Complex_music(Complex_music const &);
virtual void print() const ;
+++ /dev/null
-//
-// lyric-item.hh -- part of LilyPond
-//
-// copyright 1997 Jan Nieuwenhuizen <jan@digicash.com>
-
-#ifndef LYRIC_ITEM_HH
-#define LYRIC_ITEM_HH
-
-#include "text-item.hh"
-
-struct Lyric_item : Text_item {
- /* *************** */
- Lyric_item(Lyric_req* lreq_l, int voice_count_i);
- virtual void do_pre_processing();
-};
-
-
-#endif // LYRIC_ITEM_HH //
-
/// A symbol which sits along the staff
class Staff_side {
Array<Staff_elem*> support_l_arr_;
-
- Staff_symbol * staff_sym_l_;
+ int staff_size_i_;
Staff_elem * elem_l_;
Interval support_height()const;
+ Staff_symbol* staff_sym_l_;
+ void read_staff_sym();
public:
- /**
+ Real inter_f_;
+ /**
Vertical dir of symbol relative to staff. -1 = below staff?
*/
int dir_i_;
virtual void set_default_index();
Molecule* brew_molecule_p() const;
virtual void do_post_processing();
+ virtual void do_pre_processing();
};
+++ /dev/null
-#include "musical-request.hh"
-#include "paper-def.hh"
-#include "lyric-item.hh"
-#include "stem.hh"
-#include "molecule.hh"
-#include "lookup.hh"
-#include "text-def.hh"
-#include "source-file.hh"
-#include "source.hh"
-#include "debug.hh"
-
-Lyric_item::Lyric_item(Lyric_req* lreq_l, int voice_count_i)
- : Text_item(lreq_l)
-{
- pos_i_ = -voice_count_i * 4 ; // 4 fontsize dependant. TODO
- dir_i_ = -1;
-}
-
-void
-Lyric_item::do_pre_processing()
-{
-
- // test context-error
- if ( tdef_l()->text_str_.index_i( "Gates" ) >=0)// :-)
- tdef_l()->warning( "foul word");
-}
#include "staff-walker.hh"
#include "lyric-register.hh"
-#include "lyric-item.hh"
#include "musical-request.hh"
+#include "text-item.hh"
Lyric_register::Lyric_register()
{
void
Lyric_register::process_requests()
{
- Lyric_item * last_item_l =0;
+ Text_item * last_item_l =0;
for (int i=0; i < lreq_arr_.size(); i++) {
- Lyric_item *lp = new Lyric_item(lreq_arr_[i],i);
+ Text_item *lp = new Text_item(lreq_arr_[i]);
+ lp->dir_i_ = -1;
if (last_item_l)
lp->add_support(last_item_l);
last_item_l = lp;
top_head_l = bot_head_l;
if (!bot_head_l)
bot_head_l = top_head_l;
- assert(bot_head_l && top_head_l);
+ //assert(bot_head_l && top_head_l);
Item *support_l=top_head_l;
int j;
for (j = 0; j < 2; j++ ) {
for (int i=0; i < placed_l_arr_a[j].size(); i++) {
- placed_l_arr_a[j][i]->add_support(support_l);
+ if (support_l)
+ placed_l_arr_a[j][i]->add_support(support_l);
support_l = placed_l_arr_a[j][i];
}
}
support_l=bot_head_l;
for (; j < 4; j++ ) {
for (int i=0; i < placed_l_arr_a[j].size(); i++) {
- placed_l_arr_a[j][i]->add_support(support_l);
+ if (support_l)
+ placed_l_arr_a[j][i]->add_support(support_l);
support_l = placed_l_arr_a[j][i];
}
}
%{ // -*-Fundamental-*-
#include <iostream.h>
-#define MUDELA_VERSION "0.0.53"
+#define MUDELA_VERSION "0.0.54"
#include "script-def.hh"
#include "symtable.hh"
%type <midi> midi_block midi_body
%type <moment> duration_length
%type <music> init_music
+%type <mvoice> simple_horizontal_music horizontal_music horizontal_music_body
%type <mvoice> transposed_music_voice init_lyrics_voice
-%type <mvoice> music_voice_body music_voice init_music_voice concat_body
+%type <mvoice> music_voice_body init_music_voice
%type <paper> paper_block paper_body
%type <real> dim real
%type <real> unit
init_lyrics_voice:
LYRIC { THIS->lexer_p_->push_lyric_state(); }
- music_voice { $$ = $3; THIS->lexer_p_->pop_state(); }
+ horizontal_music { $$ = $3; THIS->lexer_p_->pop_state(); }
;
init_music_voice:
MELODIC { THIS->lexer_p_->push_note_state(); }
- /* cont*/ music_voice
+ /* cont*/ horizontal_music
{ $$=$3; THIS->lexer_p_->pop_state(); }
;
+
init_music_chord:
{ THIS->lexer_p_->push_note_state(); }
/* cont*/ music_chord
MUSIC
*/
-
-
-transposed_music_voice:
- steno_melodic_req music_voice {
+horizontal_music:
+ '{' horizontal_music_body '}' {
$$ = $2;
- $$->transpose(*$1);
- delete $1;
}
;
-music_voice: '{' concat_body '}' { $$ = $2; }
- | TRANSPOSE '{' transposed_music_voice '}' {
- $$ = $3;
+horizontal_music_body:
+ simple_horizontal_music {
+ $$ = $1;
+ }
+ | horizontal_music_body CONCAT simple_horizontal_music {
+ $$->add($3);/* niet echt */
}
;
-concat_body:
- music_voice_body {
+simple_horizontal_music:
+ TRANSPOSE '{' transposed_music_voice '}' {
+ $$ = $3;
+ }
+ | VOICE_IDENTIFIER {
+ $$ = $1->mvoice(true);
+ }
+ | music_voice_body {
$$ = $1;
}
- | concat_body CONCAT music_voice_body {
- $$->add($3);/* niet echt */
+ ;
+
+
+transposed_music_voice:
+ steno_melodic_req horizontal_music {
+ $$ = $2;
+ $$->transpose(*$1);
+ delete $1;
}
;
+
music_voice_body:
- VOICE_IDENTIFIER {
- $$ = $1->mvoice(true);
- }
- | /* */ {
+ /* */ {
$$ = new Music_voice;
}
| music_voice_body full_element {
| MULTIVOICE {
$$ = new Multi_voice_chord;
}
- | music_chord_body music_voice {
+ | music_chord_body horizontal_music {
$$->add($2);
}
| music_chord_body full_element {
void
Script::do_pre_processing()
{
- set_default_dir();
+ if (!dir_i_)
+ set_default_dir();
set_symdir();
}
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
+#include "dimen.hh"
#include "staff-side.hh"
#include "staff-sym.hh"
#include "debug.hh"
Staff_side::Staff_side(Staff_elem * elem_l)
{
+ inter_f_ = 2 PT;
+ staff_size_i_ = 0;
+ staff_sym_l_=0;
elem_l_ = elem_l;
dir_i_ =0;
- staff_sym_l_ =0;
inside_staff_b_ =false;
}
+void
+Staff_side::read_staff_sym()
+{
+ if (! staff_sym_l_)
+ return ;
+ inter_f_ = staff_sym_l_->inter_note_f();
+ staff_size_i_ = staff_sym_l_->steps_i();
+}
+
Interval
Staff_side::support_height() const return r;
{
+
for (int i=0; i < support_l_arr_.size(); i++)
r.unite(support_l_arr_[i]->height());
+ if (r.empty_b()) {
+ r = Interval(0,0);
+ }
}
void
int
Staff_side::get_position_i()const
{
- if (!staff_sym_l_)
- return 0;
+ ((Staff_side*)this)->read_staff_sym();
if (!dir_i_) {
- warning("Staff_side::get_position_i(): returning -20");
+ warning("Staff_side::get_position_i(): "
+ "somebody forgot to set my vertical direction, returning -20");
return -20;
}
- Real inter_f = staff_sym_l_->inter_note_f();
- int staff_size_i = staff_sym_l_->steps_i();
+
Real y=0;
if (!inside_staff_b_) {
- y = (dir_i_ > 0) ? staff_size_i + 2: -2;
- y *=inter_f;
+ y = (dir_i_ > 0) ? staff_size_i_ + 2: -2;
+ y *=inter_f_;
Interval v= support_height();
if (dir_i_ > 0) {
- y = y >? (v.max() + 2*inter_f);
+ y = y >? (v.max() + 2*inter_f_);
} else if (dir_i_ < 0) {
- y = y <? (v.min() - 2*inter_f);
+ y = y <? (v.min() - 2*inter_f_);
}
} else {
Interval v= support_height();
- y = v[dir_i_] + 2*dir_i_*inter_f; // ugh
+ y = v[dir_i_] + 2*dir_i_*inter_f_; // ugh
}
- return int(rint(Real(y)/inter_f)); // should ret a float?
+ return int(rint(Real(y)/inter_f_)); // should ret a float?
}
int
Staff_side::get_position_i(Interval sym_dim) const
{
- if (!staff_sym_l_)
- return 0;
- if (!dir_i_) {
- warning("Staff_side::get_position_i(): returning -20");
- return -20;
- }
-
- Real inter_f = staff_sym_l_->inter_note_f();
-
int i= get_position_i();
- return i+ int(rint(- sym_dim[dir_i_] / inter_f));
+ return i+ int(rint(- sym_dim[dir_i_] / inter_f_));
}
}
void
-Text_item::do_post_processing()
+Text_item::do_pre_processing()
{
if (!dir_i_)
dir_i_ = -1;
- set_default_index();
+}
+
+void
+Text_item::do_post_processing()
+{
+ set_default_index();
}
# build and config stuff: (could make this generic default rule...)
#
%/.build:
- echo 0 >$@
+ echo 0 > $@
+
+
+%.text: check-doc-deps
+ rm -f $@
+ ln `find ${depth}/Documentation -name $@|head -1` .
Begin3
Title: LilyPond
-Version: 0.0.54
-Entered-date: 04/22/97
+Version: 0.0.55
+Entered-date: 04/23/97
Description: LilyPond is a program which converts a music-script (mudela) into
TeX output, or MIDI to produce multi-staff scores. Features include multiple
meters, clefs, keys, lyrics, versatile input-language, cadenzas
jan@digicash.com (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: pcnov095.win.tue.nl /pub/lilypond/
- 300k lilypond-0.0.54.tar.gz
+ 300k lilypond-0.0.55.tar.gz
Alternate-site:
Original-site:
Platform: unix/win32, GNU C++
Name: lilypond
-Version: 0.0.54
+Version: 0.0.55
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.54.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.55.tar.gz
Summary: A preprocessor to make TeX typeset music.
URL: http://www.stack.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@stack.nl>
*os_p_ << "% from input file: ";
*os_p_ << midi_parser_l_g->filename_str_;
*os_p_ << "\n\n";
+ *os_p_ << "\\version \"0.0.54\";\n";
}
/*
snapnie: dit kan toch automaties? Zie ook dstream.