|
@@ -383,6 +383,7 @@ export const onlyVisible = (xml: string, partIndex: number): string => {
|
|
|
// console.log(visiblePartInfo, partIndex)
|
|
|
// 根据后台已选择的分轨筛选出能切换的声轨
|
|
|
state.partListNames = partListNames;
|
|
|
+ // console.log('分轨名称',state.partListNames)
|
|
|
if (visiblePartInfo) {
|
|
|
const id = visiblePartInfo.getAttribute("id");
|
|
|
Array.from(parts).forEach((part: any) => {
|
|
@@ -1164,6 +1165,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
|
|
|
}
|
|
|
// console.log(note.sourceMeasure.MeasureNumberXML, note.sourceMeasure.verticalSourceStaffEntryContainers.length)
|
|
|
// console.log('👀看看endtime', nodeDetail.duration, relaEndtime, fixtime, i)
|
|
|
+ // console.log('音符时间',nodeDetail.i,nodeDetail.time)
|
|
|
tickables = tickables.filter((tickable: any) => tickable.attrs?.type !== "GhostNote")
|
|
|
const maxNum = (state.isCombineRender && note.maxNoteNum) ? note.maxNoteNum : tickables.length;
|
|
|
nodeDetail.noteLength = maxNum || 1;
|
|
@@ -1277,6 +1279,7 @@ const customizationXml = (xmlParse: any) => {
|
|
|
const credits: any = Array.from(xmlParse.querySelectorAll('credit'));
|
|
|
const creators: any = Array.from(xmlParse.querySelectorAll('creator'));
|
|
|
const graces: any = Array.from(xmlParse.querySelectorAll('grace'));
|
|
|
+ const measures: any[] = Array.from(xmlParse.getElementsByTagName("measure"));
|
|
|
if (credits && credits.length) {
|
|
|
for (const credit of credits) {
|
|
|
if (credit.getElementsByTagName("credit-type")?.[0]?.textContent === 'lyricist') {
|
|
@@ -1300,6 +1303,17 @@ const customizationXml = (xmlParse: any) => {
|
|
|
// console.log(grace,'倚音')
|
|
|
}
|
|
|
}
|
|
|
+ // 妙极客xml部分小节没有音符,只有Segno,该小节不需要渲染,表示的是反复标记
|
|
|
+ for (const measure of measures) {
|
|
|
+ const hasNote = measure.getElementsByTagName("note").length;
|
|
|
+ const hasSegno = measure.getElementsByTagName("segno").length;
|
|
|
+ const sounds = Array.from(measure.getElementsByTagName("sound"));
|
|
|
+ const hasSoundSegno = sounds.some((item: any) => item.getAttribute('segno') === 'segno' );
|
|
|
+ if (!hasNote && hasSegno && hasSoundSegno) {
|
|
|
+ const parent = measure.parentNode;
|
|
|
+ parent.removeChild(measure);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 计算evxml的起始播放时间
|