# 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 }
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
}
@
\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,
#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;