< Back to IRCAM Forum

A problem with subst-rhythm and xml export

Hello!

I have a problem with the subst-rhythm function and I’m not sure if it’s a bug or if I’m just not getting how it’s supposed to be used :sweat_smile:

As you can see in the picture, when specifying that a pulse be subdivided with subst-rhythm, an additional level of nesting is introduced in the outputted rhythm tree, resulting in incorrect ratios when exporting to XML. These discrepancies are not visible in the score editor, where everything appears correct; the problem only appears when importing the XML into MuseScore (I don’t know if other score editors have the same issue).

Any known workaround? I based an entire piece on this technique, and just when I started exporting snippets of music, I encountered this unpleasant surprise haha! :grimacing:

Here’s the patch in case the picture is too small:

subst-rhythm export problem.omp (18.8 KB)

Thanks in advance!

Dear zeracpsaitam1,

Yes i can see that. However, this is not a bug from subst-rhythm. Its’ algorithm does this whenever you substitute (ie embedding) the whole tree into a group. We can of course re-write the algorithm so it doesn’t do that gbut it will take some time to do so.

No, the problem comes from the export-musicxml.lisp alogrithm. I’ll see what i can do to fix it without breaking it for other proprietary mxml parsers. You need to know that each of them doesn’t parse rhythm in the same manner keeping it difficult to satisfy all (Finale, Sibelius, MuseScore, etc.)

I will see what i can do with this but AFTER the workshops. I am preparing a new release for now and it is not a time to add more bugs :slight_smile:

Best
K

1 Like

Ok so here is a new simplified version which should work on musescore.
Will clean it up and include it in a future version.

newsubst.lisp (755 Bytes)

BEst
K

1 Like

Hi K!

First of all thank you for the quick replies despite your busy days, really appreciate it :slight_smile:

The fix works great, thank you.

Good luck with those workshops :+1:

Hi zera,

I included the fix in the upcoming version 7.6 soon to be released :slight_smile:
Thank you for reporting it. However, there will still be some fixes to be made in the musicxml export.

Best
K

1 Like

Hi again K,

Just a heads-up (maybe you already knew this) but I just realized that newsubst.lisp only inputs and outputs rhythm trees, and it doesn’t work with the self inputs. It’s not a problem for me, but I noticed this difference compared to the older version and wanted to mention it just in case. Cheers!

dear Zera,

Yes indeed. It’s not a problem. It’s just because i didn’t define the method concerning (voice) as an input. But in the new release it will work as usual, ie it’s just an updated version of subst-rhythm with the correct methods (coming very soon)…

Best
K

1 Like