add accents to dynamics palette

This commit is contained in:
ws 2013-08-12 13:15:46 +02:00
parent 9d85d3ef3d
commit 41b0fcfe72
4 changed files with 48 additions and 3 deletions

View file

@ -34,6 +34,7 @@ struct Dyn {
const char* text; // utf8 text of dynamic
};
#if 0
static Dyn dynList[] = {
// dynamic:
{ -1, true, "other-dynamics", "" },
@ -68,6 +69,45 @@ static Dyn dynList[] = {
{ 0, true, "s", u8"\U0001d18d"},
{ 0, true, "z", u8"\U0001d18e"},
};
#endif
// bravura version:
static Dyn dynList[] = {
// dynamic:
{ -1, true, "other-dynamics", "" },
{ 1, false, "pppppp", u8"\U0000e567" },
{ 5, false, "ppppp", u8"\U0000e568" },
{ 10, false, "pppp", u8"\U0000e569" },
{ 16, false, "ppp", u8"\U0000e56a" },
{ 33, false, "pp", u8"\U0000e56b" },
{ 49, false, "p", u8"\U0000e560" },
{ 64, false, "mp", u8"\U0000e56c" },
{ 80, false, "mf", u8"\U0000e56d" },
{ 96, false, "f", u8"\U0000e562" },
{ 112, false, "ff", u8"\U0000e56e" },
{ 126, false, "fff", u8"\U0000e56f" },
{ 127, false, "ffff", u8"\U0000e570" },
{ 127, false, "fffff", u8"\U0000e571" },
{ 127, false, "ffffff", u8"\U0000e572" },
// accents:
{ 0, true, "fp", u8"\U0000e573" },
{ 0, true, "sf", u8"\U0000e575" },
{ 0, true, "sfz", u8"\U0000e578"},
{ 0, true, "sff", u8"\U0000e575\U0000e562"},
{ 0, true, "sffz", u8"\U0000e579"},
{ 0, true, "sfp", u8"\U0000e576"},
{ 0, true, "sfpp", u8"\U0000e577"},
{ 0, true, "rfz", u8"\U0000e57b"},
{ 0, true, "rf", u8"\U0000e57a"},
{ 0, true, "fz", u8"\U0000e574"},
{ 0, true, "m", u8"\U0000e561"},
{ 0, true, "r", u8"\U0000e563"},
{ 0, true, "s", u8"\U0000e564"},
{ 0, true, "z", u8"\U0000e565"},
{ 0, true, "n", u8"\U0000e566"}
};
//---------------------------------------------------------
// Dynamic
@ -175,6 +215,7 @@ void Dynamic::setDynamicType(const QString& tag)
return;
}
}
qDebug("setDynamicType: other <%s>", qPrintable(tag));
setDynamicType(DYNAMIC_OTHER);
setText(tag);
}

View file

@ -363,7 +363,7 @@ void Score::updateHairpin(Hairpin* h)
int tick = h->tick();
int velo = st->velocities().velo(tick);
int incr = h->veloChange();
int tick2 = h->tick2() - 1;
int tick2 = h->tick2();
//
// If velocity increase/decrease is zero, then assume

View file

@ -276,7 +276,7 @@ void initStyle(MStyle* s)
ALIGN_LEFT | ALIGN_TOP, QPointF(), OA, QPointF()));
AS(TextStyle(
TR( "Dynamics"), ff, 12, false,
TR( "Dynamics"), "Bravura", 12, false,
false, // italic?
false,
ALIGN_LEFT | ALIGN_BASELINE, QPointF(0.0, 8.0), OS, QPointF(), true));

View file

@ -172,7 +172,11 @@ Palette* MuseScore::newDynamicsPalette()
sp->setGrid(42, 28);
sp->setDrawGrid(true);
const char* array[8] = { "ppp", "pp", "p", "mp", "mf", "f", "ff", "fff" };
const char* array[] = {
"ppp", "pp", "p", "mp", "mf", "f", "ff", "fff",
"fp", "sf", "sfz", "sff", "sffz", "sfp", "sfpp",
"rfz", "rf", "fz", "m", "r", "s", "z", "n"
};
for (const char* c : array) {
Dynamic* dynamic = new Dynamic(gscore);
dynamic->setDynamicType(c);