# yydebug
InitParser 1
-Parser 1
+Parser 0
# FlexLexer debug
Input_cursor 1
Commands_at 0
Input_command 0
-Time_description 0
\ No newline at end of file
+Time_description 0
+Melodic_req 1
+
+This license applies to all files except the included input files
+which explicitly state a different copyright
+
+
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
=item *
beams, slurs, chords, super/subscripts (accents and text),
triplets, general n-plet (triplet,
-quadruplets, etc.)
+quadruplets, etc.), lyrics
=item *
multiple scores within one input file. Each score is output to
=over 5
-=item * Describing a well-defined language for defining music. We call
+=item *
+Describing a well-defined language for defining music. We call
this language (rather arrogantly) The Musical Definition Language
(mudela for short). LilyPond reads a mudela sourcefile and outputs a
TeX file. This musical definition language should:
+pl 25
+ - other clefs added, keys typeset properly (MB)
+
pl 24:
- - Lyrics
+ - Lyrics (JCN)
- Commands in music-mode (an input feature) (there you are, Mats)
pl 23:
-
BUGS
* first clef
- * position of key acc's
-
SEVERELY LACKING:
* grace notes
* fix symbols in parser.o: `Warning: size of symbol'
- * Viola clef
-
DOC
* beam generation.
* scrap stem_request?
- * Text_pstaff/Lyric_staff
-
* put requests on barcommands
* glissando
# version info
MAJVER=0
MINVER=0
-PATCHLEVEL=24
+PATCHLEVEL=25
VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL)
CXXVER=`$(CXX) --version`
cd ../
if [ ! -f $flowertar ]
then
- echo can't find $flowertar
+ echo "can't find $flowertar"
exit 1;
fi
rm flower
#include "item.hh"
#include "varray.hh"
+struct Clef;
+
///
struct Keyitem : Item {
Array<int> pitch;
Keyitem(int cposition);
void add(int pitch, int acc);
void read(Array<int> k);
+ void read(const Clef& c);
void preprocess();
"clefs" = table {
"violin" "\violinclef" 0pt 12.8pt -10pt 18pt
"bass" "\bassclef" 0pt 11.2pt 0pt 16pt
- "viola" "\violaclef" 0pt 12.8pt 0pt 16pt
+ "alto" "\altoclef" 0pt 12.8pt 0pt 16pt
+ "tenor" "\altoclef" 0pt 12.8pt 0pt 16pt
"violin_change" "\cviolinclef" 0pt 11.2pt -12pt 12pt
"bass_change" "\cbassclef" 0pt 12.8pt 0pt 16pt
- "viola_change" "\cviolaclef" 0pt 11.2pt 0pt 16pt
+ "alto_change" "\caltoclef" 0pt 11.2pt 0pt 16pt
+ "tenor_change" "\caltoclef" 0pt 11.2pt 0pt 16pt
}
"balls" = table {
}
}
-default_table = symboltables { table_sixteen }
\ No newline at end of file
+default_table = symboltables { table_sixteen }
"clefs" = table {
"violin" "\violinclef" 0pt 16pt -12.5pt 22.5pt
"bass" "\bassclef" 0pt 16pt 0pt 20pt
- "viola" "\violaclef" 0pt 16pt 0pt 20pt
+ "alto" "\altoclef" 0pt 16pt 0pt 20pt
+ "tenor" "\altoclef" 0pt 16pt 0pt 20pt
"violin_change" "\cviolinclef" 0pt 16pt -12.5pt 22.5pt
"bass_change" "\cbassclef" 0pt 16pt 0pt 20pt
- "viola_change" "\cviolaclef" 0pt 16pt 0pt 20pt
+ "alto_change" "\caltoclef" 0pt 16pt 0pt 20pt
+ "tenor_change" "\caltoclef" 0pt 16pt 0pt 20pt
}
"balls" = table {
}
}
-default_table = symboltables { table_twenty }
\ No newline at end of file
+default_table = symboltables { table_twenty }
%
% Cadenza to Mozart Horn/3
%
+% author: unknown. Copyright: none
+%
cad = music { $
\duration { 8}
melodic
music { begeleiding } % use the declared music
commands { % commands with Staff-wide impact.
- clef bass % bass-clef
+ clef "bass" % bass-clef
}
}
vstaf = staff {
melodic
music { melodie }
- commands { clef violin }
+ commands { clef "violin" }
% default clef is violin clef
}
+% The purpose of this file is to demonstrate features of LilyPond;
+%
+% COPYRIGHT: GPL
+%
+%
+
+
+
ritme = staff {rhythmic
music {$
c8
skip 2:0
key
skip 5:0
- clef bass
+ clef "bass"
}
}
% Pavane pour une Infante d\'efunte
% by Maurice Ravel
%
-% (Ravel has been dead for over 50 years. This does not have copyright)
+% Ravel deceased in 1937, so copyright on the music will pass in 2008.
+%
+% The purpose of this file is to demonstrate features of LilyPond;
+% I hope this citation isn't beyond the bounds of "fairness"
+%
%
% (there is an accompanying LaTeX file, pavane.tex)
%
+
horn =
-staff {melodic
+staff {
+ melodic
music{ $
\octave { ' }
\duration { 8}
skip 1:0
skip 20:0
bar "|:"
- skip 9:0
- skip 1:0
+ skip 10:0
bar ":|"
meter 4* 4
skip 13:0
% st\"andchen.lily
-% Franz Schubert
+% Franz Schubert (? - ?)
%
% comments with # note missing stuff
% heu, make that %#%
[ b8._"f" 'cis16 ] 'd4^> b r
%%44
%#% [^ { > b8. fis2 } 'cis16 ] 'd4^> b >! r
+% typo?
[ b8. 'cis16 ] 'd4^> b r
%%45
%#% 'cis\grace\stemup
%%12 == 6
%#% { `d ``bes2 } `e `g `e { `g r4 } `e
[ `d `e `g `e `g `e ]
-%%13
+%13
%#% { `e ``bes2 } `e `g `e { `g r4 } `e
[ `e `e `g `e `g `e ]
%%14
{ `d2.^\fermata ``d2. }
$ }
+tekst1 = music {
+ @
+ \duration{4}
+ _ _ _
+ _ _ _
+ _ _ _
+ _ _ _
+ % 5
+ \plet{ 2/3 } Lei- se8 \plet{ 1/1 } fleh-4. en8
+ \plet{ 2/3 } mei- ne8 \plet{ 1/1 } Lie- der8 _8
+ Durch4. die8 \plet{ 2/3 } Nacht zu8 \plet{ 1/1 }
+ dir;2 _
+ _ _ _
+ _ _ _
+ % 11
+ \plet{ 2/3 } In den8 \plet{ 1/1 } stil-4. len8
+ \plet{ 2/3 } Hain her-8 \plet{ 1/1 } nie-4. der,8
+ Lieb4. chen,8 \plet{ 2/3 } komm zu8 \plet{ 1/1 }
+ mir!2 _
+ _ _ _
+ _ _ _
+
+ % 17
+ Fl\"us-8. ternd16 schlan-4. ke8
+ Wip-8. fel16 rau-4. schen8
+ \plet{ 2/3 } In des8 \plet{ 1/1 } Mon-4. des8
+ Licht;2.
+ _ _ _
+ _ _ _
+
+ % 23
+ Des8. Ver-16 r\"a-4. ters8
+ feind-8. lich16 Lau-4. schen8
+ \plet{ 2/3 } F\"urch- te,8 \plet{ 1/1 } Hol-4. de,8
+ nicht.2.
+ _ _ _
+ _ _ _
+
+ % volta 1
+ % 29
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+
+ % volta 2
+ % 37
+ La\ss8. auch16 dir8. die16 Brust8. be-16
+ we- gen, _
+ Lieb-4. chen,8 h\"o-8. re16
+ mich!2 _
+ _ _ _
+ _ _ _
+ Be-8. bend16 harr' ich8 _8
+ dir8. ent-16 ge- gen!8 _8
+ \plet{ 2/3 } Komm, be-8 \plet{ 1/1 } gl\"u4. cke8
+ mich!2.
+ % 47
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ % 57
+ _ _ _ _ _ _
+ @
+ }
+
+ tekst2 = music {
+ @
+ \duration{4}
+ _ _ _
+ _ _ _
+ _ _ _
+ _ _ _
+ % 5
+ \plet{ 2/3 } H\"orst die8 \plet{ 1/1 } Nach-4. ti-8
+ \plet{ 2/3 } gal- len8 \plet{ 1/1 } schla- gen?8 _8
+ Ach!4. sie8 \plet{ 2/3 } fleh- en8 \plet{ 1/1 }
+ dich,2 _
+ _ _ _
+ _ _ _
+
+ % 11
+ \plet{ 2/3 } Mit der8 \plet{ 1/1 } T\"o-4. ne8
+ \plet{ 2/3 } s\"u\ss- en8 \plet{ 1/1 } Kla-4. gen8
+ Fleh-4. en8 \plet{ 2/3 } sie f\"ur8 \plet{ 1/1 }
+ mich.2 _
+ _ _ _
+ _ _ _
+
+ % 17 ok tot hier
+ Sie-8. ver-16 stehn4. des8
+ Bus-8. ens16 Seh-4. nen,8
+ \plet{ 2/3 } Ken- nen8 \plet{ 1/1 } Lieb-4. es-8
+ schmerz,2.
+ _ _ _
+ _ _ _
+
+ % 23
+ R\"uh-8. ren16 mit4. den8
+ Sil-8. ber-16 t\"o-4. nen8
+ \plet{ 2/3 } Jed- es8 \plet{ 1/1 } wei-4. che8
+ Herz.2.
+ _ _ _
+ _ _ _
+
+ % volta 1
+ % 29
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+
+ % volta 2
+ % 37
+ % _ _ _ _ _ _
+ % _ _ _ _ _ _
+ % _ _ _ _ _ _
+ % _ _ _ _ _ _
+ % _ _ _ _ _ _
+ % 47
+ % _ _ _ _ _ _
+ % _ _ _ _ _ _
+ % _ _ _ _ _ _
+ % _ _ _ _ _ _
+ % _ _ _ _ _ _
+ % 57
+ % _ _ _ _ _ _
+ @
+ }
+
score {
paper {
symboltables { table_sixteen }
output "standchen.uit"
unitspace 2.4 cm
- geometric 1.4
+ % unitspace 4.0 cm % leaves all text stand free
+geometric 1.4
}
staff {
melodic music { melodie }
commands {
key $bes$
- clef violin
+ clef "violin"
}
}
+ staff {
+ lyric
+ music { tekst1 }
+ music { tekst2 }
+ }
staff {
melodic music { begeleiding }
commands {
key $bes$
- clef bass
+ clef "bass"
}
}
commands {
skip 32:0
bar ":|"
skip 22:0
+ bar "||"
}
}
@
\textstyle "roman"
When the bla- zing sun is gone,2
- When he no- thing shine- s upon,2
+ When he no- thing shines up- on,2
Then you show your lit- tle light,2
Twin- kle, twin- kle, all the night.2
Twin- kle, twin- kle, lit- tle star,2
\textstyle "roman"
Then the tra- veler in the dark2
Thanks you for your ti- ny spark;2
- He could not see which way to_go,2
+ He_could not see which way to go,2
If you did not twin- kle so.2
Twin- kle, twin- kle, lit- tle star,2
How I won- der what you are!2
mstaf = staff {
melodic
music { melodie }
- commands { clef violin }
+ commands { clef "violin" }
}
bass_staf = staff {
melodic
music { begeleiding }
- commands { clef bass }
+ commands { clef "bass" }
}
\mdef\violinclef{71}
\mdef\bassclef{73}
+\mdef\altoclef{75}
\mdef\cviolinclef{72}
\mdef\cbassclef{74}
+\mdef\caltoclef{76}
\mdef\deigthflag{45}
\mdef\dsixteenthflag{46}
clef_type = args[0];
if (clef_type == "violin") {
c0_pos=-2;
+ } else if (clef_type == "alto") {
+ c0_pos = 4;
+ } else if (clef_type == "tenor") {
+ c0_pos = 6;
} else if (clef_type == "bass") {
c0_pos = 10;
} else
type = t;
if (type == "violin")
y_off = 2;
+ if (type == "alto")
+ y_off = 4;
+ if (type == "tenor")
+ y_off = 6;
if (type == "bass")
y_off = 6;
}
#include "molecule.hh"
#include "paper.hh"
#include "lookup.hh"
+#include "clef.hh"
+const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
+const int SHARP_TOP_PITCH=4; /* ais and bis typeset in lower octave */
Keyitem::Keyitem(int c)
{
}
}
+void
+Keyitem::read(const Clef& c)
+{
+ c_position=(c.c0_pos+70)%7;
+}
+
+
void
Keyitem::add(int p, int a)
{
+ if ((a<0 && p>FLAT_TOP_PITCH) ||
+ (a>0 && p>SHARP_TOP_PITCH)) {
+ p=p-7; /* Typeset below c_position */
+ }
pitch.add(p);
acc.add(a);
}
int l = lookup_keyword(c);
if (l != -1)
return l;
+
+/* let's try passing tex's typesetting macros like \ss \alpha \c */
+ String* str_p = new String(YYText());
+ return STRING;
+
+/* and skip identifiers...
Identifier * id = lookup_identifier(c);
if (id) {
yylval.id = id;
yylval.string=sp;
return NEWIDENTIFIER;
+*/
}
<lyrics>\"[^\"]*\" {
String s (YYText()+1);
}
<lyrics>{COMMENT} {
+}
+<lyrics>[{}] {
+ return YYText()[0];
+}
+<lyrics>[()\[\]|/.^>_-] {
+ return yylval.c = YYText()[0];
}
<lyrics>[ \t\n]+ {
}
static Keyword_ent the_key_tab[]={
"bar", BAR,
- "bass", BASS,
"cadenza", CADENZA,
"clef", CLEF,
"cm", CM,
"chord", CHORD,
"multi", MULTI,
"unitspace", UNITSPACE,
- "violin", VIOLIN,
"voice", VOICE,
"voices", VOICES,
"width", WIDTH,
%token VOICE STAFF SCORE TITLE BAR NOTENAME OUTPUT
%token CM IN PT MM PAPER WIDTH METER UNITSPACE SKIP COMMANDS COMMAND
%token GEOMETRIC START_T DURATIONCOMMAND OCTAVECOMMAND
-%token KEY CLEF VIOLIN BASS MULTI TABLE CHORD VOICES
+o%token KEY CLEF MULTI TABLE CHORD VOICES
%token PARTIAL RHYTHMIC MELODIC MUSIC LYRIC GROUPING CADENZA
%token END SYMBOLTABLES TEXID TABLE NOTENAMES SCRIPT TEXTSTYLE PLET
%token MARK GOTO
%type <commandvec> score_commands_block score_commands_body
%type <commandvec> staff_commands_block staff_commands_body
%type <request> post_request pre_request
-%type <string> clef_id pitchmod
+%type <string> pitchmod
%type <music> music
%type <chord> music_chord music_chord_body
$$ = get_key_interpret_command(*$2);
delete $2;
}
- | CLEF clef_id {
+ | CLEF STRING {
$$ = get_clef_interpret_command(*$2);
delete $2;
}
|PT { $$ = "pt"; }
;
-clef_id:
- VIOLIN { $$ = new String("violin"); }
- | BASS { $$ = new String("bass"); }
- ;
/*
symbol tables
*/
#include "debug.hh"
#include "keyitem.hh"
#include "clefitem.hh"
-#include "keyitem.hh"
#include "slur.hh"
#include "localkeyitem.hh"
#include "textitem.hh"
return;
if (com->args[0] == "KEY") {
+ ((Keyitem*) i)->read(clef_);
if (oldkey_undo) {
((Keyitem*) i)->read(*oldkey_undo);
delete oldkey_undo;