Velocity range in Instrument.xml?

• May 5, 2019 - 17:08

I thought 127 was the max value for velocity. Some articulations defined in the default instrument.xml file have velocity values over 127?
For example,

  <Articulation name="sforzatoStaccato">
            <velocity>150</velocity>
            <gateTime>50</gateTime>
      </Articulation>

Does Musescore allow higher velocity values than 127 in instrument.xml files? If not, does it just play all specified values higher than 127 as 127?


Comments

Even worse:

      <InstrumentGroup id="marching-percussion">
            <name>Percussion - Marching</name>
            <Instrument id="marching-snare">
                  <longName>Snare Drum</longName>
...
                  <Articulation name="marcato">
                        <velocity>500</velocity>
                  </Articulation>

But IIRC this is a percentage, not an absolute value, so 5 times louder than normal.

And looking at the code it seems I did remember correctly, see:

//---------------------------------------------------------
//   updateVelocity
//---------------------------------------------------------
 
void Instrument::updateVelocity(int* velocity, int /*channelIdx*/, const QString& name)
      {
      for (const MidiArticulation& a : _articulation) {
            if (a.name == name) {
                  *velocity = *velocity * a.velocity / 100;
                  break;
                  }
            }
      }

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