2012-05-26 14:26:10 +02:00
|
|
|
//=============================================================================
|
|
|
|
// MuseScore
|
|
|
|
// Music Composition & Notation
|
|
|
|
//
|
|
|
|
// Copyright (C) 2008-2011 Werner Schweer
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License version 2
|
|
|
|
// as published by the Free Software Foundation and appearing in
|
|
|
|
// the file LICENCE.GPL
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
#include "score.h"
|
|
|
|
#include "tempotext.h"
|
|
|
|
#include "tempo.h"
|
|
|
|
#include "system.h"
|
|
|
|
#include "measure.h"
|
2014-04-09 16:09:21 +02:00
|
|
|
#include "xml.h"
|
2012-05-26 14:26:10 +02:00
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
namespace Ms {
|
|
|
|
|
2015-10-07 16:36:57 +02:00
|
|
|
#define MIN_TEMPO 5.0/60
|
|
|
|
#define MAX_TEMPO 999.0/60
|
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// TempoText
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
TempoText::TempoText(Score* s)
|
|
|
|
: Text(s)
|
|
|
|
{
|
2012-07-25 11:49:34 +02:00
|
|
|
_tempo = 2.0; // propertyDefault(P_TEMPO).toDouble();
|
2012-05-26 14:26:10 +02:00
|
|
|
_followText = false;
|
2016-05-09 14:58:47 +02:00
|
|
|
_relative = 1.0;
|
|
|
|
_isRelative = false;
|
2014-06-24 17:27:58 +02:00
|
|
|
setPlacement(Element::Placement::ABOVE);
|
2014-05-30 10:13:29 +02:00
|
|
|
setTextStyleType(TextStyleType::TEMPO);
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// write
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
void TempoText::write(Xml& xml) const
|
|
|
|
{
|
|
|
|
xml.stag("Tempo");
|
|
|
|
xml.tag("tempo", _tempo);
|
|
|
|
if (_followText)
|
|
|
|
xml.tag("followText", _followText);
|
|
|
|
Text::writeProperties(xml);
|
|
|
|
xml.etag();
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// read
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2013-01-11 18:10:18 +01:00
|
|
|
void TempoText::read(XmlReader& e)
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
2013-01-11 18:10:18 +01:00
|
|
|
while (e.readNextStartElement()) {
|
|
|
|
const QStringRef& tag(e.name());
|
2012-05-26 14:26:10 +02:00
|
|
|
if (tag == "tempo")
|
2015-10-07 16:36:57 +02:00
|
|
|
setTempo(e.readDouble());
|
2012-05-26 14:26:10 +02:00
|
|
|
else if (tag == "followText")
|
2013-01-11 18:10:18 +01:00
|
|
|
_followText = e.readInt();
|
2012-05-26 14:26:10 +02:00
|
|
|
else if (!Text::readProperties(e))
|
2013-01-11 18:10:18 +01:00
|
|
|
e.unknown();
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
2016-05-13 06:55:03 +02:00
|
|
|
if (score()->mscVersion() <= 114) {
|
2012-05-26 14:26:10 +02:00
|
|
|
//
|
|
|
|
// Reset text in old version to
|
|
|
|
// style.
|
|
|
|
//
|
2014-05-30 10:13:29 +02:00
|
|
|
//TODO if (textStyle() != TextStyleType::INVALID) {
|
2012-05-26 14:26:10 +02:00
|
|
|
// setStyled(true);
|
|
|
|
// styleChanged();
|
|
|
|
// }
|
|
|
|
}
|
2014-12-03 13:53:13 +01:00
|
|
|
// check sanity
|
2015-04-27 12:59:30 +02:00
|
|
|
if (xmlText().isEmpty()) {
|
2015-05-29 09:28:30 +02:00
|
|
|
setXmlText(QString("<sym>metNoteQuarterUp</sym> = %1").arg(lrint(60 * _tempo)));
|
2014-12-03 13:53:13 +01:00
|
|
|
setVisible(false);
|
|
|
|
}
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// TempoPattern
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
struct TempoPattern {
|
|
|
|
const char* pattern;
|
|
|
|
qreal f;
|
2014-04-30 22:25:14 +02:00
|
|
|
TDuration d;
|
|
|
|
TempoPattern(const char* s, qreal v, TDuration::DurationType val, int dots = 0) : pattern(s), f(v), d(val) { d.setDots(dots); }
|
2012-05-26 14:26:10 +02:00
|
|
|
};
|
2014-05-04 21:48:03 +02:00
|
|
|
|
|
|
|
// note: findTempoDuration requires the longer patterns to be before the shorter patterns in tp
|
|
|
|
|
2014-04-30 22:25:14 +02:00
|
|
|
static const TempoPattern tp[] = {
|
2015-06-11 22:20:46 +02:00
|
|
|
TempoPattern("<sym>metNoteQuarterUp</sym>\\s*<sym>metAugmentationDot</sym>\\s*<sym>metAugmentationDot</sym>", 1.75/60.0, TDuration::DurationType::V_QUARTER, 2), // double dotted 1/4
|
|
|
|
TempoPattern("<sym>metNoteQuarterUp</sym>\\s*<sym>metAugmentationDot</sym>", 1.5/60.0, TDuration::DurationType::V_QUARTER, 1), // dotted 1/4
|
2016-05-18 12:24:22 +02:00
|
|
|
TempoPattern("<sym>metNoteQuarterUp</sym>", 1.0/60.0, TDuration::DurationType::V_QUARTER), // 1/4
|
|
|
|
TempoPattern("<sym>metNoteHalfUp</sym>\\s*<sym>metAugmentationDot</sym>\\s*<sym>metAugmentationDot</sym>", 1.75/30.0, TDuration::DurationType::V_HALF, 2), // double dotted 1/2
|
|
|
|
TempoPattern("<sym>metNoteHalfUp</sym>\\s*<sym>metAugmentationDot</sym>", 1.5/30.0, TDuration::DurationType::V_HALF, 1), // dotted 1/2
|
|
|
|
TempoPattern("<sym>metNoteHalfUp</sym>", 1.0/30.0, TDuration::DurationType::V_HALF), // 1/2
|
2015-06-11 22:20:46 +02:00
|
|
|
TempoPattern("<sym>metNote8thUp</sym>\\s*<sym>metAugmentationDot</sym>\\s*<sym>metAugmentationDot</sym>", 1.75/120.0, TDuration::DurationType::V_EIGHTH, 2), // double dotted 1/8
|
2015-05-25 15:42:21 +02:00
|
|
|
TempoPattern("<sym>metNote8thUp</sym>\\s*<sym>metAugmentationDot</sym>", 1.5/120.0, TDuration::DurationType::V_EIGHTH, 1), // dotted 1/8
|
2016-03-25 09:06:56 +01:00
|
|
|
TempoPattern("<sym>metNote8thUp</sym>", 1.0/120.0, TDuration::DurationType::V_EIGHTH), // 1/8
|
2016-05-18 12:24:22 +02:00
|
|
|
TempoPattern("<sym>metNoteWhole</sym>\\s*<sym>metAugmentationDot</sym>", 1.5/15.0, TDuration::DurationType::V_WHOLE, 1), // dotted whole
|
|
|
|
TempoPattern("<sym>metNoteWhole</sym>", 1.0/15.0, TDuration::DurationType::V_WHOLE), // whole
|
|
|
|
TempoPattern("<sym>metNote16thUp</sym>\\s*<sym>metAugmentationDot</sym>", 1.5/240.0, TDuration::DurationType::V_16TH, 1), // dotted 1/16
|
2015-06-29 18:33:37 +02:00
|
|
|
TempoPattern("<sym>metNote16thUp</sym>", 1.0/240.0, TDuration::DurationType::V_16TH), // 1/16
|
2016-05-18 12:24:22 +02:00
|
|
|
TempoPattern("<sym>metNote32ndUp</sym>\\s*<sym>metAugmentationDot</sym>", 1.5/480.0, TDuration::DurationType::V_32ND, 1), // dotted 1/32
|
2015-06-29 18:33:37 +02:00
|
|
|
TempoPattern("<sym>metNote32ndUp</sym>", 1.0/480.0, TDuration::DurationType::V_32ND), // 1/32
|
2016-05-18 12:24:22 +02:00
|
|
|
TempoPattern("<sym>metNoteDoubleWholeSquare</sym>", 1.0/7.5, TDuration::DurationType::V_BREVE), // longa
|
|
|
|
TempoPattern("<sym>metNoteDoubleWhole</sym>", 1.0/7.5, TDuration::DurationType::V_BREVE), // double whole
|
2015-06-29 18:33:37 +02:00
|
|
|
TempoPattern("<sym>metNote64thUp</sym>", 1.0/960.0, TDuration::DurationType::V_64TH), // 1/64
|
2016-05-18 12:24:22 +02:00
|
|
|
TempoPattern("<sym>metNote128thUp</sym>", 1.0/1920.0,TDuration::DurationType::V_128TH), // 1/128
|
2014-04-30 22:25:14 +02:00
|
|
|
};
|
2014-12-03 13:53:13 +01:00
|
|
|
|
2014-04-30 22:25:14 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// findTempoDuration
|
|
|
|
// find the duration part (note + dot) of a tempo text in string s
|
|
|
|
// return the match position or -1 if not found
|
|
|
|
// set len to the match length and dur to the duration value
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
int TempoText::findTempoDuration(const QString& s, int& len, TDuration& dur)
|
|
|
|
{
|
|
|
|
len = 0;
|
|
|
|
dur = TDuration();
|
|
|
|
|
2014-12-03 13:53:13 +01:00
|
|
|
for (const auto& i : tp) {
|
|
|
|
QRegExp re(i.pattern);
|
2014-04-30 22:25:14 +02:00
|
|
|
int pos = re.indexIn(s);
|
|
|
|
if (pos != -1) {
|
|
|
|
len = re.matchedLength();
|
2014-12-03 13:53:13 +01:00
|
|
|
dur = i.d;
|
2014-04-30 22:25:14 +02:00
|
|
|
return pos;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
2014-12-03 13:53:13 +01:00
|
|
|
|
2014-05-10 11:07:29 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// duration2tempoTextString
|
|
|
|
// find the tempoText string representation for duration
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
QString TempoText::duration2tempoTextString(const TDuration dur)
|
|
|
|
{
|
2015-04-27 12:59:30 +02:00
|
|
|
for (const TempoPattern& pa : tp) {
|
|
|
|
if (pa.d == dur) {
|
|
|
|
QString res = pa.pattern;
|
2014-05-10 11:07:29 +02:00
|
|
|
res.remove("\\s*");
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return "";
|
|
|
|
}
|
2012-05-26 14:26:10 +02:00
|
|
|
|
2016-05-09 14:58:47 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// updateScore
|
|
|
|
//---------------------------------------------------------
|
|
|
|
void TempoText::updateScore()
|
|
|
|
{
|
|
|
|
if (segment())
|
|
|
|
score()->setTempo(segment(), _tempo);
|
|
|
|
score()->fixTicks();
|
|
|
|
score()->setPlaylistDirty();
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// updateRelative
|
|
|
|
//---------------------------------------------------------
|
|
|
|
void TempoText::updateRelative()
|
|
|
|
{
|
|
|
|
qreal tempoBefore = score()->tempo(tick() - 1);
|
|
|
|
setTempo(tempoBefore * _relative);
|
|
|
|
}
|
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// textChanged
|
|
|
|
// text may have changed
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
void TempoText::textChanged()
|
|
|
|
{
|
|
|
|
if (!_followText)
|
|
|
|
return;
|
2015-06-04 16:11:42 +02:00
|
|
|
QString s = plainText();
|
2015-04-27 12:59:30 +02:00
|
|
|
s.replace(",", ".");
|
2016-05-18 12:24:22 +02:00
|
|
|
s.replace("<sym>space</sym>"," ");
|
2015-04-27 12:59:30 +02:00
|
|
|
for (const TempoPattern& pa : tp) {
|
2015-10-07 16:36:57 +02:00
|
|
|
QRegExp re(QString(pa.pattern)+"\\s*=\\s*(\\d+[.]{0,1}\\d*)\\s*");
|
2012-05-26 14:26:10 +02:00
|
|
|
if (re.indexIn(s) != -1) {
|
|
|
|
QStringList sl = re.capturedTexts();
|
|
|
|
if (sl.size() == 2) {
|
2015-04-27 12:59:30 +02:00
|
|
|
qreal nt = qreal(sl[1].toDouble()) * pa.f;
|
2012-05-26 14:26:10 +02:00
|
|
|
if (nt != _tempo) {
|
2015-10-07 16:36:57 +02:00
|
|
|
setTempo(qreal(sl[1].toDouble()) * pa.f);
|
2016-05-09 14:58:47 +02:00
|
|
|
_relative = 1.0;
|
|
|
|
_isRelative = false;
|
|
|
|
updateScore();
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2016-05-09 14:58:47 +02:00
|
|
|
else {
|
|
|
|
for (const TempoPattern& pa2 : tp) {
|
|
|
|
QRegExp re(QString("%1\\s*=\\s*%2\\s*").arg(pa.pattern).arg(pa2.pattern));
|
|
|
|
if (re.indexIn(s) != -1) {
|
|
|
|
_relative = pa2.f / pa.f;
|
|
|
|
_isRelative = true;
|
|
|
|
updateRelative();
|
|
|
|
updateScore();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-07 16:36:57 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// setTempo
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
void TempoText::setTempo(qreal v)
|
|
|
|
{
|
|
|
|
if (v < MIN_TEMPO)
|
|
|
|
v = MIN_TEMPO;
|
|
|
|
else if (v > MAX_TEMPO)
|
|
|
|
v = MAX_TEMPO;
|
|
|
|
_tempo = v;
|
|
|
|
}
|
|
|
|
|
2012-07-25 11:49:34 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// undoSetTempo
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
void TempoText::undoSetTempo(qreal v)
|
|
|
|
{
|
2016-06-09 09:26:13 +02:00
|
|
|
undoChangeProperty(P_ID::TEMPO, v);
|
2012-07-25 11:49:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// undoSetFollowText
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
void TempoText::undoSetFollowText(bool v)
|
|
|
|
{
|
2016-06-09 09:26:13 +02:00
|
|
|
undoChangeProperty(P_ID::TEMPO_FOLLOW_TEXT, v);
|
2012-07-25 11:49:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// getProperty
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
QVariant TempoText::getProperty(P_ID propertyId) const
|
|
|
|
{
|
|
|
|
switch(propertyId) {
|
2014-05-26 18:18:01 +02:00
|
|
|
case P_ID::TEMPO: return _tempo;
|
|
|
|
case P_ID::TEMPO_FOLLOW_TEXT: return _followText;
|
2012-07-25 11:49:34 +02:00
|
|
|
default:
|
2012-10-31 10:15:45 +01:00
|
|
|
return Text::getProperty(propertyId);
|
2012-07-25 11:49:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// setProperty
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
bool TempoText::setProperty(P_ID propertyId, const QVariant& v)
|
|
|
|
{
|
2016-06-14 10:32:34 +02:00
|
|
|
switch (propertyId) {
|
2014-05-26 18:18:01 +02:00
|
|
|
case P_ID::TEMPO:
|
2015-10-07 16:36:57 +02:00
|
|
|
setTempo(v.toDouble());
|
2013-03-27 14:35:20 +01:00
|
|
|
score()->setTempo(segment(), _tempo);
|
2016-03-20 11:46:52 +01:00
|
|
|
score()->fixTicks();
|
2012-07-25 11:49:34 +02:00
|
|
|
break;
|
2014-05-26 18:18:01 +02:00
|
|
|
case P_ID::TEMPO_FOLLOW_TEXT:
|
2012-07-25 11:49:34 +02:00
|
|
|
_followText = v.toBool();
|
|
|
|
break;
|
|
|
|
default:
|
2012-10-31 10:15:45 +01:00
|
|
|
if (!Text::setProperty(propertyId, v))
|
2012-07-25 11:49:34 +02:00
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
}
|
2016-06-14 10:32:34 +02:00
|
|
|
triggerLayout();
|
2012-07-25 11:49:34 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// propertyDefault
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
QVariant TempoText::propertyDefault(P_ID id) const
|
|
|
|
{
|
|
|
|
switch(id) {
|
2014-12-03 13:53:13 +01:00
|
|
|
case P_ID::TEMPO: return 2.0;
|
2014-05-26 18:18:01 +02:00
|
|
|
case P_ID::TEMPO_FOLLOW_TEXT: return false;
|
2014-06-24 17:27:58 +02:00
|
|
|
case P_ID::PLACEMENT: return int(Element::Placement::ABOVE);
|
2014-12-03 13:53:13 +01:00
|
|
|
default:
|
|
|
|
return Text::propertyDefault(id);
|
2012-07-25 11:49:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-10-30 09:06:24 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// layout
|
2016-05-02 13:41:41 +02:00
|
|
|
// called after Measure->stretchMeasure()
|
2012-10-30 09:06:24 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
void TempoText::layout()
|
|
|
|
{
|
2016-08-18 09:15:08 +02:00
|
|
|
if (autoplace())
|
|
|
|
setUserOff(QPointF());
|
2014-08-11 21:53:48 +02:00
|
|
|
setPos(textStyle().offset(spatium()));
|
|
|
|
Text::layout1();
|
2016-05-02 13:41:41 +02:00
|
|
|
|
|
|
|
// tempo text on first chordrest of measure should align over time sig if present
|
|
|
|
//
|
2014-08-11 21:53:48 +02:00
|
|
|
Segment* s = segment();
|
|
|
|
if (s && !s->rtick()) {
|
|
|
|
Segment* p = segment()->prev(Segment::Type::TimeSig);
|
|
|
|
if (p) {
|
|
|
|
rxpos() -= s->x() - p->x();
|
|
|
|
Element* e = p->element(staffIdx() * VOICES);
|
|
|
|
if (e)
|
|
|
|
rxpos() += e->x();
|
|
|
|
}
|
|
|
|
}
|
2016-05-02 13:41:41 +02:00
|
|
|
|
|
|
|
if (placement() == Element::Placement::BELOW)
|
2012-10-30 09:06:24 +01:00
|
|
|
rypos() = -rypos() + 4 * spatium();
|
2016-08-18 09:15:08 +02:00
|
|
|
|
|
|
|
if (s && autoplace()) {
|
|
|
|
Shape s1 = s->staffShape(staffIdx()).translated(s->pos());
|
|
|
|
Shape s2 = shape().translated(s->pos());
|
|
|
|
qreal d = s2.minVerticalDistance(s1);
|
|
|
|
if (d > 0)
|
|
|
|
setUserOff(QPointF(0.0, -d));
|
|
|
|
}
|
|
|
|
if (!autoplace())
|
|
|
|
adjustReadPos();
|
2012-10-30 09:06:24 +01:00
|
|
|
}
|
2012-07-25 11:49:34 +02:00
|
|
|
|
2016-08-18 09:15:08 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// duration2userName
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-05-18 12:24:22 +02:00
|
|
|
QString TempoText::duration2userName(const TDuration t)
|
|
|
|
{
|
|
|
|
QString dots;
|
|
|
|
switch (t.dots()) {
|
|
|
|
case 1: dots = tr("Dotted %1").arg(t.durationTypeUserName());
|
|
|
|
break;
|
|
|
|
case 2: dots = tr("Double dotted %1").arg(t.durationTypeUserName());
|
|
|
|
break;
|
|
|
|
case 3: dots = tr("Triple dotted %1").arg(t.durationTypeUserName());
|
|
|
|
break;
|
2016-06-01 12:35:20 +02:00
|
|
|
case 4: dots = tr("Quadruple dotted %1").arg(t.durationTypeUserName());
|
|
|
|
break;
|
2016-05-18 12:24:22 +02:00
|
|
|
default:
|
|
|
|
dots = t.durationTypeUserName();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return dots;
|
|
|
|
}
|
|
|
|
|
2014-12-03 13:53:13 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// accessibleInfo
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-02-04 17:06:32 +01:00
|
|
|
QString TempoText::accessibleInfo() const
|
2014-07-10 14:13:37 +02:00
|
|
|
{
|
2016-05-18 12:24:22 +02:00
|
|
|
TDuration t1;
|
|
|
|
TDuration t2;
|
|
|
|
int len1;
|
|
|
|
int len2;
|
|
|
|
QString text = plainText();
|
|
|
|
QString firstPart = text.split(" = ").first();
|
|
|
|
QString secondPart = text.split(" = ").back();
|
|
|
|
int x1 = findTempoDuration(firstPart, len1, t1);
|
|
|
|
int x2 = -1;
|
|
|
|
if (_relative)
|
|
|
|
x2 = findTempoDuration(secondPart, len2, t2);
|
|
|
|
|
|
|
|
if (x1 != -1) {
|
|
|
|
QString dots1;
|
|
|
|
QString dots2;
|
|
|
|
dots1 = duration2userName(t1);
|
|
|
|
if (x2 != -1) {
|
|
|
|
dots2 = duration2userName(t2);
|
|
|
|
return QString("%1: %2 %3 = %4 %5").arg(Element::accessibleInfo()).arg(dots1).arg(tr("note")).arg(dots2).arg(tr("note"));
|
2014-08-19 20:09:43 +02:00
|
|
|
}
|
2016-05-18 12:24:22 +02:00
|
|
|
else
|
|
|
|
return QString("%1: %2 %3 = %4").arg(Element::accessibleInfo()).arg(dots1).arg(tr("note")).arg(secondPart);
|
2014-08-19 20:09:43 +02:00
|
|
|
}
|
2014-07-10 14:13:37 +02:00
|
|
|
else
|
|
|
|
return Text::accessibleInfo();
|
|
|
|
}
|
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
}
|
|
|
|
|