ASCII script input, with identifiers (for music reuse),
customizable notenames, customizable fontset
+=item *
+MIDI output lets you check if you have entered the correct notes.
+
=item *
Multiple staffs in one score. Each staff can have a different meters.
=item *
multiple voices within one staff; beams optionally shared
-between voices. (well, more than 2 voices won't look pretty)
+between voices. (well, more than 2 voices won't look pretty --yet.)
=item *
multiple scores within one input file. Each score is output to
used interactively. LilyPond writes output to a file. It will not be
extended to play music, or to recognize music.
-It will output MIDI, though (at some stage)
-
=item *
LilyPond is intended to run on Unix platforms, but it should
be portable to any platform which can run TeX and the GNU tools
=over 5
-=item B<-I,--include>=F<FILE>
+=item B<-I,--include>=F<FILE>,
add F<FILE> to the search path for input files.
-=item B<-d,--debug>,
+=item B<-d,--debug>,
Turn debugging info. LilyPond will read the file F<.dstreamrc>, which
tells for what functions and classes may produce copious debugging
output.
-=item B<-w,--warranty>,
+=item B<-w,--warranty>,
Show the warranty with which LilyPond comes. (It comes with B<NO WARRANTY>!)
-=item B<-o,--output=>F<FILE>,
+=item B<-o,--output=>F<FILE>,
Set the default output file to F<FILE>.
=item B<-i,--init=>F<FILE>
-set init file (default: F<symbol.ini>)
+set init file to F<FILE> (default: F<symbol.ini>)
-=item B<--include, -I>
-add to file search path.
+=item B<--include, -I>=F<DIRECTORY>
+add F<DIRECTORY> to the search path for input files.
=back
=head1 PREREQUISITES
-Compilation:
+For compilation you need.
=over 5
GNU make.
=item *
-flex (2.5.1 or better)
+Flex (2.5.1 or better)
=item *
Bison.
=item *
The "Flower" library, which should be available from the same
-source you got this from.
+source you got this from. The version of flower lib should match the
+one which is found in the F<configure> script.
=item *
-perl. The Makefile uses perl for trivial operations, and you
+Perl. The Makefile uses Perl for trivial operations, and you
could tinker with it to use sed or awk.
=back
=over 5
=item *
-a fast computer (well; full page of music typically takes 1
-minute on my 486/66, using the DEBUG compile)
+a fast computer (a full page of music typically takes 1 minute
+on my 486/66, using the DEBUG compile. It's lot slower than most
+MusiXTeX preprocessors)
=item *
TeX
=item *
-The MusixTeX fonts. (I use version T.59)
+The MusixTeX fonts. (I use version those found in MusixTeX
+Taupin version T.59)
=back
make
You might want to edit Variables.make to tailor the compilation flags.
-why G++ >= 2.7? LilyPond & flower lib uses:
+why G++ >= 2.7? LilyPond & FlowerLib uses:
=over 5
hw:~/musix/spacer$ xdvi test&
[1] 855
-Check out F<kortjakje.ly>, it has some comments
+Check out the input files, some of them have comments
=head1 PROBLEMS
-If LilyPond bombs out, then please recompile using B<-g>, and send a
-copy of the input which causes the error and a gdb stacktrace of the
-crash. It also helps if you can print the values of the objects. So if
-your trace is
+If LilyPond bombs out, then please recompile using with debugging info
+turned on, and send a copy of the input which causes the error and a
+gdb stacktrace of the crash. It also helps if you can print the values
+of the objects. So if your trace is
(gdb) backtrace 12
#0 Interval::operator+= (this=0x11fffec60..)
LilyPond has no connection with the music package RoseGarden, other
than the names being similar :-)
-
=head1 HISTORY
(for a detailed changelog, see F<NEWS>)
#include "misc.hh"
#include "lexer.hh"
#include "paperdef.hh"
+#include "mididef.hh"
#include "inputscore.hh"
#include "main.hh"
#include "keyword.hh"
String *string;
const char *consstr;
Paperdef *paper;
+ Mididef* midi;
Input_music *music;
Music_general_chord *chord;
Music_voice *mvoice;
%token PARTIAL MUSIC GROUPING CADENZA
%token END SYMBOLTABLES TEXID TABLE NOTENAMES SCRIPT TEXTSTYLE PLET
%token GOTO
+%token MIDI TEMPO
%token <id> IDENTIFIER
%token <string> PITCHMOD DURATION RESTNAME
%token <i> DOTS INT
%type <real> unit
%type <melreqvec> pitch_list
-%type <c> open_request_parens close_request_parens
+%type <c> open_request_parens close_request_parens close_plet_parens
%type <id> declaration
%type <string> declarable_identifier
%type <paper> paper_block paper_body
+%type <midi> midi_block midi_body
%type <real> dim real
%type <ii> default_duration explicit_duration notemode_duration mudela_duration
%type <ii> notename
$$->set($4);
}
| score_body paper_block { $$->set($2); }
+ | score_body midi_block { $$->set($2); }
| score_body error {
}
}
;
+/*
+ MIDI
+*/
+midi_block:
+ MIDI
+
+ '{' midi_body '}' { $$ = $3; }
+ ;
+
+midi_body: {
+ $$ = new Mididef;
+ }
+ | midi_body OUTPUT STRING {
+ $$->outfile_str_ = *$3;
+ delete $3;
+ }
+ | midi_body TEMPO mudela_duration ':' int {
+ $$->set_tempo( wholes( $3[0], $3[1] ), $5 );
+ }
+ | midi_body error {
+
+ }
+ ;
+
/*
STAFFs
*/
$$ = new Input_staff(*$1);
delete $1;
}
+ | MIDI {
+ $$ = new Input_staff("midi");
+ }
;
staff_body:
;
-
/*
VOICE ELEMENTS
*/
add_requests($2, post_reqs);
$$ = $2;
}
- | lyrics_elt
+ | pre_requests lyrics_elt post_requests {
+ add_requests($2, pre_reqs);
+ add_requests($2, post_reqs);
+ $$ = $2;
+ }
| command_elt
;
command_elt:
- command_req {
+/* empty */ {
$$ = new Voice_element;
- $$->add($1);
- $1-> defined_ch_c_l_ = lexer->here_ch_c_l();
+ $$-> defined_ch_c_l_ = lexer->here_ch_c_l();
+ }
+/* cont: */
+ command_req {
+ $2-> defined_ch_c_l_ = $$->defined_ch_c_l_;
+ $$->add($2);
+
}
-/* can't do this, since "| |" has shift/reduce conflict. :
- command_elt command_req { .. }
-*/
;
command_req:
'|' {
$$ = new Barcheck_req;
}
- | BAR STRING {
+ | BAR STRING {
$$ = new Bar_req(*$2);
delete $2;
}
m->set($3,$5);
$$ = m;
}
- | SKIP duration_length {
+ | SKIP '{' duration_length '}' {
Skip_req * skip_p = new Skip_req;
- skip_p->duration_ = *$2;
- delete $2;
+ skip_p->duration_ = *$3;
+ delete $3;
$$ = skip_p;
}
- | CADENZA int {
- $$ = new Cadenza_req($2);
+ | CADENZA '{' int '}' {
+ $$ = new Cadenza_req($3);
}
- | PARTIAL duration_length {
- $$ = new Partial_measure_req(*$2);
- delete $2;
+ | PARTIAL '{' duration_length '}' {
+ $$ = new Partial_measure_req(*$3);
+ delete $3;
}
| STEM '{' int '}' {
$$ = get_stemdir_req($3);
$2->defined_ch_c_l_ = lexer->here_ch_c_l();
post_reqs.push($2);
}
+ | post_requests close_plet_parens INT '/' INT {
+ post_reqs.push( get_request($2) );
+ req_defined_ch_c_l = lexer->here_ch_c_l();
+ post_reqs.push( get_plet_request( $2, $3, $5 ) );
+ }
;
post_request:
| textscript_req
;
+close_plet_parens:
+ ']' {
+ req_defined_ch_c_l = lexer->here_ch_c_l();
+ $$ = ']';
+ }
+ ;
+
close_request_parens:
'(' {
$$='(';
set_default_octave(*$3);
delete $3;
}
- | TEXTSTYLE STRING {
+ | TEXTSTYLE STRING {
set_text_style(*$2);
delete $2;
}
lexer = new My_flex_lexer;
#ifdef YYDEBUG
- yydebug = !monitor.silence("InitParser") && check_debug;
- lexer->set_debug( !monitor.silence("InitLexer") && check_debug);
+ yydebug = !monitor->silence("InitParser") && check_debug;
+ lexer->set_debug( !monitor->silence("InitLexer") && check_debug);
#endif
lexer->new_input(init);
yyparse();
#ifdef YYDEBUG
- yydebug = !monitor.silence("Parser") && check_debug;
- lexer->set_debug( !monitor.silence("Lexer") && check_debug);
+ yydebug = !monitor->silence("Parser") && check_debug;
+ lexer->set_debug( !monitor->silence("Lexer") && check_debug);
#endif
lexer->new_input(s);