From 30c7641b15bb094371b4d6c129849d7c05ffb08c Mon Sep 17 00:00:00 2001 From: rettinghaus Date: Mon, 22 Sep 2025 13:08:12 +0200 Subject: [PATCH 1/2] replace open tie with lv --- .../internal/musicxml/import/importmusicxmlpass2.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/importexport/musicxml/internal/musicxml/import/importmusicxmlpass2.cpp b/src/importexport/musicxml/internal/musicxml/import/importmusicxmlpass2.cpp index 527bec4041e51..b1d1e5ea2e5e8 100644 --- a/src/importexport/musicxml/internal/musicxml/import/importmusicxmlpass2.cpp +++ b/src/importexport/musicxml/internal/musicxml/import/importmusicxmlpass2.cpp @@ -1882,6 +1882,11 @@ static void cleanupUnterminatedTie(Tie* tie, const Score* score, bool fixForCros // Delete unterminated ties pending fully featured l.v. ties & ties over repeats unterminatedTieNote->remove(tie); delete tie; + + // Add Laissez Vibrer instead + LaissezVib* lvTie = Factory::createLaissezVib(unterminatedTieNote); + lvTie->setParent(unterminatedTieNote); + unterminatedTieNote->score()->undoAddElement(lvTie); } //--------------------------------------------------------- From 163eab5c0a43531e78aa1559424549e89fbdedcd Mon Sep 17 00:00:00 2001 From: rettinghaus Date: Mon, 22 Sep 2025 15:54:45 +0200 Subject: [PATCH 2/2] update tests --- .../musicxml/tests/data/importTie1_ref.mscx | 61 +-- .../data/testBackupRoundingError_ref.mscx | 493 +++++++++--------- .../tests/data/testUnterminatedTies_ref.mscx | 94 ++-- 3 files changed, 336 insertions(+), 312 deletions(-) diff --git a/src/importexport/musicxml/tests/data/importTie1_ref.mscx b/src/importexport/musicxml/tests/data/importTie1_ref.mscx index 5da121d223af4..ad456cc481148 100644 --- a/src/importexport/musicxml/tests/data/importTie1_ref.mscx +++ b/src/importexport/musicxml/tests/data/importTie1_ref.mscx @@ -303,6 +303,9 @@ down o_o + + p_p + 62 16 @@ -317,27 +320,27 @@ F F 1 - p_p + q_q - q_q + r_r 1 - r_r + s_s 3 4 - s_s + t_t 1 half up - t_t + u_u - u_u + v_v up @@ -353,12 +356,12 @@ - v_v + w_w 1 half down - w_w + x_x 50 16 @@ -368,11 +371,11 @@ - x_x + y_y half up - y_y + z_z @@ -385,11 +388,11 @@ - z_z + 0_0 quarter up - 0_0 + 1_1 57 17 @@ -397,21 +400,21 @@ - 1_1 + 2_2 half down - 2_2 + 3_3 47 19 - 3_3 + 4_4 quarter down - 4_4 + 5_5 50 16 @@ -421,66 +424,66 @@ - 5_5 + 6_6 quarter up - 6_6 + 7_7 59 19 - 7_7 + 8_8 quarter up - 8_8 + 9_9 57 17 - 9_9 + +_+ quarter up - +_+ + /_/ 54 20 - /_/ + AB_AB - AB_AB + BB_BB quarter down - BB_BB + CB_CB 47 19 - CB_CB + DB_DB quarter down - DB_DB + EB_EB 48 14 - EB_EB + FB_FB quarter down - FB_FB + GB_GB 50 16 diff --git a/src/importexport/musicxml/tests/data/testBackupRoundingError_ref.mscx b/src/importexport/musicxml/tests/data/testBackupRoundingError_ref.mscx index 085b66b9817d5..115cfdd8ba876 100644 --- a/src/importexport/musicxml/tests/data/testBackupRoundingError_ref.mscx +++ b/src/importexport/musicxml/tests/data/testBackupRoundingError_ref.mscx @@ -1125,113 +1125,122 @@ eighth yC_yC + + zC_zC + 69 17 - zC_zC + 0C_0C mid eighth - 0C_0C + 1C_1C 60 14 - 1C_1C + 2C_2C mid eighth - 2C_2C + 3C_3C accidentalSharp - 3C_3C + 4C_4C + + 5C_5C + 58 24 - 4C_4C + 6C_6C eighth - 5C_5C + 7C_7C accidentalNatural - 6C_6C + 8C_8C + + 9C_9C + 45 17 - 7C_7C + +C_+C 0 eighth - 8C_8C + /C_/C 0 eighth - 9C_9C + AD_AD 0 1 quarter - +C_+C + BD_BD 0 - /C_/C + CD_CD 0 1 1 quarter - AD_AD + DD_DD 0 - BD_BD + ED_ED 0 1 1 quarter - CD_CD + FD_FD 0 - DD_DD + GD_GD 0 1 1 quarter - ED_ED + HD_HD 0 - FD_FD + ID_ID 0 1 1 quarter - GD_GD + JD_JD 0 - HD_HD + KD_KD 0 1 quarter @@ -1240,23 +1249,23 @@ fermataAbove - ID_ID + LD_LD - JD_JD + MD_MD 0 eighth - KD_KD + ND_ND 1 quarter up - LD_LD + OD_OD - MD_MD + PD_PD @@ -1272,13 +1281,13 @@ - ND_ND + QD_QD 0 down - OD_OD + RD_RD @@ -1287,14 +1296,17 @@ - PD_PD + SD_SD whole - QD_QD + TD_TD accidentalNatural - RD_RD + UD_UD + + VD_VD + 88 18 @@ -1314,41 +1326,41 @@ 1/2 - SD_SD + WD_WD 2 3 eighth - TD_TD + XD_XD down 14 16 - UD_UD + YD_YD begin 1 eighth - VD_VD + ZD_ZD accidentalNatural - WD_WD + aD_aD 79 15 - XD_XD + bD_bD mid 1 eighth - YD_YD + cD_cD - ZD_ZD + dD_dD 1 88 @@ -1356,14 +1368,14 @@ - aD_aD + eD_eD 1 eighth - bD_bD + fD_fD accidentalSharp - cD_cD + gD_gD 78 20 @@ -1371,51 +1383,51 @@ - dD_dD + hD_hD 2 3 eighth - eD_eD + iD_iD down 66 74 - fD_fD + jD_jD begin 1 eighth - gD_gD + kD_kD 79 15 - hD_hD + lD_lD mid 1 eighth - iD_iD + mD_mD 78 20 - jD_jD + nD_nD 1 eighth - kD_kD + oD_oD accidentalNatural - lD_lD + pD_pD - mD_mD + qD_qD 5 52 @@ -1427,7 +1439,7 @@ 1 down - nD_nD + rD_rD @@ -1443,7 +1455,7 @@ 1.9 rit. - oD_oD + sD_sD @@ -1457,41 +1469,41 @@ - pD_pD + tD_tD 2 3 eighth - qD_qD + uD_uD down 46 54 - rD_rD + vD_vD begin 1 eighth - sD_sD + wD_wD accidentalNatural - tD_tD + xD_xD 67 15 - uD_uD + yD_yD mid 1 eighth - vD_vD + zD_zD - wD_wD + 0D_0D 4 88 @@ -1499,18 +1511,18 @@ - xD_xD + 1D_1D 1 eighth articStaccatoAbove - yD_yD + 2D_2D - zD_zD + 3D_3D accidentalSharp - 0D_0D + 4D_4D 61 21 @@ -1518,50 +1530,50 @@ - 1D_1D + 5D_5D 2 3 eighth - 2D_2D + 6D_6D down 14 14 - 3D_3D + 7D_7D begin 1 eighth articStaccatoAbove - 4D_4D + 8D_8D - 5D_5D + 9D_9D 1 accidentalFlat - 6D_6D + +D_+D 82 12 - 7D_7D + /D_/D mid 1 eighth articStaccatoAbove - 8D_8D + AE_AE - 9D_9D + BE_BE - +D_+D + CE_CE 1 79 @@ -1576,7 +1588,7 @@ - /D_/D + DE_DE 1 eighth @@ -1589,12 +1601,12 @@ articStaccatoAbove - AE_AE + EE_EE - BE_BE + FE_FE - CE_CE + GE_GE 2 88 @@ -1604,7 +1616,7 @@ end - DE_DE + HE_HE @@ -1616,21 +1628,21 @@ F F 1 - EE_EE + IE_IE - FE_FE + JE_JE -5 major 1 - GE_GE + KE_KE 4 4 - HE_HE + LE_LE 0 measure 1/1 @@ -1638,12 +1650,12 @@ - IE_IE + ME_ME 1 half down - JE_JE + NE_NE 60 14 @@ -1653,56 +1665,56 @@ - KE_KE + OE_OE half up - LE_LE + PE_PE 60 14 - ME_ME + QE_QE accidentalNatural - NE_NE + RE_RE 64 18 - OE_OE + SE_SE quarter up - PE_PE + TE_TE accidentalNatural - QE_QE + UE_UE 55 15 - RE_RE + VE_VE 58 12 - SE_SE + WE_WE accidentalNatural - TE_TE + XE_XE 62 16 - UE_UE + YE_YE accidentalNatural - VE_VE + ZE_ZE 69 17 @@ -1713,7 +1725,7 @@ - WE_WE + aE_aE 4 5 16th @@ -1723,18 +1735,18 @@ - XE_XE + bE_bE up -56 -56 - YE_YE + cE_cE begin 16th - ZE_ZE + dE_dE @@ -1743,55 +1755,55 @@ - aE_aE + eE_eE accidentalNatural - bE_bE + fE_fE 69 17 - cE_cE + gE_gE mid 16th - dE_dE + hE_hE accidentalNatural - eE_eE + iE_iE 67 15 - fE_fE + jE_jE mid 16th - gE_gE + kE_kE accidentalNatural - hE_hE + lE_lE 71 19 - iE_iE + mE_mE mid 16th - jE_jE + nE_nE 67 15 - kE_kE + oE_oE 16th @@ -1801,10 +1813,10 @@ - lE_lE + pE_pE accidentalNatural - mE_mE + qE_qE 59 19 @@ -1812,7 +1824,7 @@ - nE_nE + rE_rE 4 5 16th @@ -1822,18 +1834,18 @@ - oE_oE + sE_sE up -56 -56 - pE_pE + tE_tE begin 16th - qE_qE + uE_uE @@ -1842,47 +1854,47 @@ - rE_rE + vE_vE accidentalNatural - sE_sE + wE_wE 64 18 - tE_tE + xE_xE mid 16th - uE_uE + yE_yE 67 15 - vE_vE + zE_zE mid 16th - wE_wE + 0E_0E 67 15 - xE_xE + 1E_1E mid 16th - yE_yE + 2E_2E 71 19 - zE_zE + 3E_3E 16th @@ -1892,14 +1904,14 @@ - 0E_0E + 4E_4E 59 19 - 1E_1E + 5E_5E 4 5 16th @@ -1909,18 +1921,18 @@ - 2E_2E + 6E_6E up -56 -56 - 3E_3E + 7E_7E begin 16th - 4E_4E + 8E_8E @@ -1929,47 +1941,47 @@ - 5E_5E + 9E_9E accidentalNatural - 6E_6E + +E_+E 62 16 - 7E_7E + /E_/E mid 16th - 8E_8E + AF_AF 67 15 - 9E_9E + BF_BF mid 16th - +E_+E + CF_CF 71 19 - /E_/E + DF_DF mid 16th - AF_AF + EF_EF 67 15 - BF_BF + FF_FF 16th @@ -1979,14 +1991,14 @@ - CF_CF + GF_GF 59 19 - DF_DF + HF_HF 4 5 16th @@ -1996,18 +2008,18 @@ - EF_EF + IF_IF up -56 -56 - FF_FF + JF_JF begin 16th - GF_GF + KF_KF @@ -2016,43 +2028,43 @@ - HF_HF + LF_LF 64 18 - IF_IF + MF_MF mid 16th - JF_JF + NF_NF 64 18 - KF_KF + OF_OF mid 16th - LF_LF + PF_PF 71 19 - MF_MF + QF_QF mid 16th - NF_NF + RF_RF 67 15 - OF_OF + SF_SF 16th @@ -2062,7 +2074,7 @@ - PF_PF + TF_TF 59 19 @@ -2071,41 +2083,41 @@ - QF_QF + UF_UF quarter down - RF_RF + VF_VF 69 17 - SF_SF + WF_WF quarter down - TF_TF + XF_XF 64 18 - UF_UF + YF_YF quarter down - VF_VF + ZF_ZF 62 16 - WF_WF + aF_aF quarter down - XF_XF + bF_bF 67 15 @@ -2115,15 +2127,18 @@ - YF_YF + cF_cF half down - ZF_ZF + dF_dF accidentalSharp - aF_aF + eF_eF + + fF_fF + 42 20 @@ -2135,7 +2150,7 @@ 1 - bF_bF + gF_gF @@ -2148,36 +2163,36 @@ fermataBelow - cF_cF + hF_hF below - dF_dF + iF_iF quarter up - eF_eF + jF_jF accidentalSharp - fF_fF + kF_kF 30 20 - gF_gF + lF_lF accidentalNatural - hF_hF + mF_mF 45 17 - iF_iF + nF_nF accidentalNatural - jF_jF + oF_oF 50 16 @@ -2199,27 +2214,27 @@ fermataAbove - kF_kF + pF_pF - lF_lF + qF_qF eighth - mF_mF + rF_rF 0 half fermataAbove - nF_nF + sF_sF - oF_oF + tF_tF whole - pF_pF + uF_uF 0 half @@ -2228,13 +2243,13 @@ gClef - qF_qF + vF_vF 103/1024 - rF_rF + wF_wF 0 @@ -2242,7 +2257,7 @@ - sF_sF + xF_xF 2 3 eighth @@ -2252,33 +2267,33 @@ - tF_tF + yF_yF 1 eighth - uF_uF + zF_zF up 10 8 - vF_vF + 0F_0F begin 1 eighth - wF_wF + 1F_1F accidentalNatural - xF_xF + 2F_2F - yF_yF + 3F_3F 5 - zF_zF + 4F_4F 3 43 @@ -2286,14 +2301,14 @@ - 0F_0F + 5F_5F 1 eighth - 1F_1F + 6F_6F accidentalNatural - 2F_2F + 7F_7F 45 17 @@ -2301,7 +2316,7 @@ - 3F_3F + 8F_8F 2 3 eighth @@ -2311,62 +2326,62 @@ - 4F_4F + 9F_9F up 8 10 - 5F_5F + +F_+F begin 1 eighth - 6F_6F + /F_/F accidentalNatural - 7F_7F + AG_AG 47 19 - 8F_8F + BG_BG mid 1 eighth - 9F_9F + CG_CG 45 17 - +F_+F + DG_DG 1 eighth - /F_/F + EG_EG 43 15 - AG_AG + FG_FG 1 1 quarter up - BG_BG + GG_GG accidentalSharp - CG_CG + HG_HG - DG_DG + IG_IG 1 53 @@ -2374,23 +2389,23 @@ - EG_EG + JG_JG no 1 eighth up - FG_FG + KG_KG accidentalNatural - GG_GG + LG_LG - HG_HG + MG_MG 5 - IG_IG + NG_NG 1 50 @@ -2398,12 +2413,12 @@ - JG_JG + OG_OG 1 quarter - KG_KG + PG_PG @@ -2414,10 +2429,10 @@ up - LG_LG + QG_QG accidentalNatural - MG_MG + RG_RG 62 16 @@ -2425,16 +2440,16 @@ fermataAbove - NG_NG + SG_SG - OG_OG + TG_TG half up - PG_PG + UG_UG - QG_QG + VG_VG 2 25 @@ -2442,7 +2457,7 @@ - RG_RG + WG_WG 0 quarter @@ -2451,41 +2466,41 @@ fClef - SG_SG + XG_XG 1/12 end - TG_TG + YG_YG - UG_UG + ZG_ZG 1 half down - VG_VG + aG_aG accidentalSharp - WG_WG + bG_bG 25 21 - XG_XG + cG_cG quarter up - YG_YG + dG_dG accidentalNatural - ZG_ZG + eG_eG 38 16 @@ -2493,37 +2508,37 @@ fermataBelow - aG_aG + fG_fG - bG_bG + gG_gG half down - cG_cG + hG_hG accidentalSharp - dG_dG + iG_iG 41 25 - eG_eG + jG_jG accidentalNatural - fG_fG + kG_kG 67 15 - gG_gG + lG_lG 0 - hG_hG + mG_mG 0 half diff --git a/src/importexport/musicxml/tests/data/testUnterminatedTies_ref.mscx b/src/importexport/musicxml/tests/data/testUnterminatedTies_ref.mscx index 9b1d234978a25..2e8cfd40e0437 100644 --- a/src/importexport/musicxml/tests/data/testUnterminatedTies_ref.mscx +++ b/src/importexport/musicxml/tests/data/testUnterminatedTies_ref.mscx @@ -248,6 +248,9 @@ up b_b + + c_c + 69 17 @@ -255,197 +258,200 @@ - c_c + d_d - d_d + e_e quarter down - e_e + f_f + + g_g + 76 18 - f_f + h_h quarter - g_g + i_i half - h_h + j_j - i_i + k_k quarter down - j_j + l_l - k_k + m_m 74 16 - l_l + n_n quarter - m_m + o_o half - n_n + p_p - o_o + q_q quarter up - p_p + r_r 60 14 - q_q + s_s quarter - r_r + t_t half - s_s + u_u - t_t + v_v quarter up - u_u + w_w 65 13 - v_v + x_x quarter - w_w + y_y half - x_x + z_z - y_y + 0_0 measure 1/1 - z_z + 1_1 - 0_0 + 2_2 quarter up - 1_1 + 3_3 67 15 - 2_2 + 4_4 quarter - 3_3 + 5_5 half - 4_4 + 6_6 - 5_5 + 7_7 quarter up - 6_6 + 8_8 69 17 - 7_7 + 9_9 quarter - 8_8 + +_+ half - 9_9 + /_/ - +_+ + AB_AB quarter up - /_/ + BB_BB 65 13 - AB_AB + CB_CB quarter up - BB_BB + DB_DB 67 15 - CB_CB + EB_EB quarter up - DB_DB + FB_FB 65 13 - EB_EB + GB_GB quarter up - FB_FB + HB_HB - GB_GB + IB_IB 67 15 @@ -453,7 +459,7 @@ end - HB_HB + JB_JB