Adding 'c.' to tempo markings

• Sep 9, 2024 - 15:42

I like to include a 'c.' in my tempo markings, and I know I'm not alone in this. Unfortunately, adding it means that MuseScore can no longer read the written tempo, and if I want to change the tempo after it's there, I need to override the written tempo. I'm not exactly sure what the solution is, but I think it would be worth coming up with one.

Thanks for your consideration.


Comments

In reply to by Jojo-Schmitz

And indeed is, current code:

void TempoText::updateTempo()
{
    // cache regexp, they are costly to create
    static std::unordered_map<String, std::regex> regexps;
    static std::unordered_map<String, std::regex> regexps2;
    String s = plainText();
    s.replace(u",", u".");
    s.replace(u"<sym>space</sym>", u" ");
    s.replace(u"≒", u"=");
    s.replace(u"≈", u"=");
    s.replace(u"~", u"=");
    s.replace(u"ca.", u"");
    s.replace(u"approx.", u"");
    std::string su8 = s.toStdString();
    for (const TempoPattern& pa : tp) {
        String pattern = String::fromUtf8(pa.pattern);
        std::regex re;
        if (!muse::contains(regexps, String::fromUtf8(pa.pattern))) {
            re = std::regex(String(u"%1\\s*=\\s*(\\d+[.]{0,1}\\d*)\\s*").arg(pattern).toStdString());
            regexps[pattern] = re;
        }
 
...

In reply to by Jojo-Schmitz

Why not simply search for a number in this string?

Behavior 3.7 (and 3.6.2): First I had to set an element from the palette. Then I change the tempo value of this element. So the new value works.
Then I change it in a second step by adding random text. Then this text has no influence on the original value.

In reply to by bobjp

"What does the c. do?".

Currently it seems to stop Musescore recognising that the number following it is something other than 80.

To a player it indicates that the tempo indication is to be interpreted loosely. "c." is a widely used abbreviation for "circa" which (as any British public schoolboy knows) translates from Latin as "about". "ca." is another widely used abbreviation for the same thing.

In reply to by SteveBlower

That's what I thought. As I write for playback only, approximate tempo markings like this and allegro are of no use to me. For real musicians? Sure. I prefer exact metronome marks for my work. Should a real player try some of my music ( no idea why they would) they will play the tempo they want anyway.

Do you still have an unanswered question? Please log in first to post your question.