music-encoding / sibmei

Sibelius MEI Plugin
MIT License
40 stars 16 forks source link

broken export of tuplets within beams #210

Closed aseipelt closed 1 year ago

aseipelt commented 1 year ago

Maybe it is related to issue #74, I am not sure. When multiple tuplets are connected to a beam, it is not exported correctly and the notes and tuplets are duplicated. Also, the nesting of beam and tuplets is wrong. If the tuplets are not connected to a beam, there are no problems (see code).

Bildschirmfoto 2023-06-07 um 12 21 59
                    <measure xml:id="m-94" n="3">
                        <staff xml:id="m-95" n="1">
                            <layer xml:id="m-96" n="1">
                                <beam xml:id="m-98">
                                    <note xml:id="m-97" dur="8" dur.ppq="128" oct="5" pname="a" pnum="81" stem.dir="down" tstamp.real="00:00:01.8" vel="0"/>
                                    <note xml:id="m-99" dur="8" dur.ppq="128" oct="5" pname="a" pnum="81" stem.dir="down" tstamp.real="00:00:02.1" vel="0"/>
                                    <note xml:id="m-100" dur="8" dur.ppq="128" oct="5" pname="b" pnum="82" stem.dir="down" tstamp.real="00:00:02.4" vel="0">
                                        <accid xml:id="m-101" accid.ges="f"/>
                                    </note>
                                </beam>
                            </layer>
                        </staff>
                        <staff xml:id="m-102" n="2">
                            <layer xml:id="m-103" n="1">
                                <tuplet xml:id="m-107" dur.ppq="256" endid="#m-111" num="5" num.format="count" numbase="4" startid="#m-104">
                                    <beam xml:id="m-106">
                                        <note xml:id="m-104" dur="16" dur.ppq="51" oct="2" pname="b" pnum="46" stem.dir="up" tstamp.real="00:00:01.8" vel="0">
                                            <accid xml:id="m-105" accid.ges="f"/>
                                        </note>
                                        <note xml:id="m-108" dur="16" dur.ppq="51" oct="3" pname="c" pnum="48" stem.dir="up" tstamp.real="00:00:01.919" vel="0"/>
                                        <note xml:id="m-109" dur="16" dur.ppq="51" oct="3" pname="d" pnum="50" stem.dir="up" tstamp.real="00:00:02.039" vel="0"/>
                                        <note xml:id="m-110" dur="16" dur.ppq="51" oct="3" pname="c" pnum="48" stem.dir="up" tstamp.real="00:00:02.158" vel="0"/>
                                        <note xml:id="m-111" dur="16" dur.ppq="51" oct="2" pname="b" pnum="46" stem.dir="up" tstamp.real="00:00:02.278" vel="0">
                                            <accid xml:id="m-112" accid.ges="f"/>
                                        </note>
                                    </beam>
                                </tuplet>
                                <tuplet xml:id="m-116" dur.ppq="128" endid="#m-118" num="3" num.format="count" numbase="2" startid="#m-113">
                                    <beam xml:id="m-115">
                                        <note xml:id="m-113" dur="16" dur.ppq="43" oct="2" pname="b" pnum="46" stem.dir="up" tstamp.real="00:00:02.4" vel="0">
                                            <accid xml:id="m-114" accid.ges="f"/>
                                        </note>
                                        <note xml:id="m-117" dur="16" dur.ppq="43" oct="3" pname="c" pnum="48" stem.dir="up" tstamp.real="00:00:02.498" vel="0"/>
                                        <note xml:id="m-118" dur="16" dur.ppq="43" oct="2" pname="b" pnum="46" stem.dir="up" tstamp.real="00:00:02.599" vel="0">
                                            <accid xml:id="m-119" accid.ges="f"/>
                                        </note>
                                    </beam>
                                </tuplet>
                            </layer>
                        </staff>
                    </measure>
rettinghaus commented 1 year ago

@aseipelt From what I see, they are the same. Could you please add your case (and a test file) to #74? Closing this in favor of #74.