Slurs don't always work.

• Feb 16, 2018 - 03:40

Mostly, slurs and ties are working beautifully for me. but sometimes I do a slur (stringing together multiple notes of different tones) and they still play as single notes.

I have tried so many different approaches to making this slur work, even deleting all the notes in the measure and re-adding them so I could do the slur in note entry mode (and with Ctrl and Shift in edit mode)

Am I missing something or is this a bug? Measure # 63 in the attached file.

Thanks in advance.

Attachment Size
Alle, Alle, Alle.mscz 16.78 KB

Comments

In reply to by Jojo-Schmitz

Hi Jojo,

I would like to peek at the sources trying to understand how this would be implemented some day. Can you point me at some source files/headers, or functions inside, that would be affected by this kind of change in the playback? just the name of them.

In reply to by mdi1972

An implementation would need to know the difference between e.g. a Piano and a Flute, and skip the attack for the latter but not the former. Or have different samples in the SounfFont for normal vs. slurred. No idea whether or how that could be done

In reply to by Jojo-Schmitz

Thanks, I prefer the first one approach. As said, I would like to know which files contains the functions/code that would implement these changes. Do I have to peek over all the MuseScore sources anyway?

Maybe just understanding and checking "rendermidi.cpp" ? I see this code there (https://github.com/musescore/MuseScore/blob/master/libmscore/rendermidi…) :

void Score::createPlayEvents(Chord* chord)
{
int gateTime = 100;

  int tick = chord->tick();
  Slur* slur = 0;
  for (auto sp : _spanner.map()) {
        if (sp.second->type() != ElementType::SLUR || sp.second->staffIdx() != chord->staffIdx())
              continue;
        Slur* s = toSlur(sp.second);
        if (tick >= s->tick() && tick < s->tick2()) {
              slur = s;
              break;
              }
        }
  // gateTime is 100% for slured notes    
  if (!slur) {
        Instrument* instr = chord->part()->instrument(tick);
        instr->updateGateTime(&gateTime, 0, "");
        }

.
.

In reply to by Jojo-Schmitz

Jojo,

Is it possible to redefine gateTime for (for example) for the "Strings" instruments in instruments.xml ? I see other instruments gatetime are tweaked via the Articulation section or explicitely.

Please, can you or any developer explain about this? if for example strings plays with a default gatetime < 100, would it be possible to tweak instruments.xml to put it to 100 for this instrument?

In reply to by mdi1972

Jojo,

Nothing, I tested higher values of gateTime (from 100 to 140) by means of direct edit of the .mscx "tenuto" articulation gateTime (sample attached, where the violins and cellos (Strings instr.) have slurs all the measures and an explicit tenuto in their last 2 bars) - and the audible result is that the note duration is lengthened by a rate, something like an "echo", or reverb effect (seems the "noteoff" event of the previous note is delayed).

But the next note attack is clearly audible, it's not supressed of course.

Well...

Attachment Size
test_legato.mscx 24.37 KB

In reply to by Jojo-Schmitz

Thanks Jojo - I actually misinterpreted your other reply, although I see now what you meant. This explanation, and some of the programming notes here make it much clearer what I'm hearing. I've got some slurs that kind of sound like they're working but it is just timing combined with an aural illusion.

I appreciate you taking the time to answer again.

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