Sfoglia il codice sorgente

Merge branch 'feature-mutliTrack' into klx-test

TIANYONG 2 mesi fa
parent
commit
ea7d191875

File diff suppressed because it is too large
+ 0 - 0
dist/css/instrument-f8ff6f88.css


+ 10 - 0
dist/instrument.html

@@ -41,8 +41,13 @@
       })
     }
   </script>
+<<<<<<< HEAD
   <script type="module" crossorigin src="./js/instrument-bc3eaa81.js"></script>
   <link rel="stylesheet" href="./css/instrument-ba2d8d1c.css">
+=======
+  <script type="module" crossorigin src="./js/instrument-9c068536.js"></script>
+  <link rel="stylesheet" href="./css/instrument-f8ff6f88.css">
+>>>>>>> feature-mutliTrack
   <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};window.__vite_is_modern_browser=true;</script>
   <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
 </head>
@@ -65,8 +70,13 @@
     var vConsole = new window.VConsole();
   </script>   -->
   <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
+<<<<<<< HEAD
   <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-1f76d399.js"></script>
   <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-ca1c7c39.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+=======
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-7ea27e1e.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-f808dbc5.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+>>>>>>> feature-mutliTrack
 </body>
 
 </html>

File diff suppressed because it is too large
+ 0 - 0
dist/js/index-0f7aded9.js


+ 1 - 0
dist/js/index-4c56b42f.js

@@ -0,0 +1 @@
+import{d as i,g as l,r as d,E as e,o as r,s as c,b as s,M as u}from"./instrument-9c068536.js";const f="_skeleton_vtlsh_1",m="_detail_vtlsh_12",p="_container_vtlsh_20",a={skeleton:f,detail:m,container:p},y=i({name:"music-list",setup(){const n=l(),t=d({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:e.staff,base64:""},{state:!1,name:"首调",type:e.firstTone,base64:""},{state:!1,name:"固定调",type:e.fixedTone,base64:""}]});r(()=>{window.appName="colexiu",c.xmlUrl=n.xmlUrl,t.isLoading=!1});const o=async()=>{console.log("渲染完成")};return()=>s("div",{class:a.detail},[s("div",{id:"scrollContainer",class:[a.container,"hideCursor"]},[!t.isLoading&&s(u,{onRendered:o},null)])])}});export{y as default};

File diff suppressed because it is too large
+ 0 - 0
dist/js/index-cacbaeff.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/index-d43fb3b2.js


+ 1 - 0
dist/js/index-legacy-659827c1.js

@@ -0,0 +1 @@
+System.register(["./instrument-legacy-f808dbc5.js"],(function(e,t){"use strict";var i,n,a,o,r,s,l,d,c=document.createElement("style");return c.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(c),{setters:[e=>{i=e.d,n=e.g,a=e.r,o=e.E,r=e.o,s=e.s,l=e.b,d=e.M}],execute:function(){const t="_detail_vtlsh_12",c="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=a({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});r((()=>{window.appName="colexiu",s.xmlUrl=e.xmlUrl,i.isLoading=!1}));const h=async()=>{console.log("渲染完成")};return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[c,"hideCursor"]},[!i.isLoading&&l(d,{onRendered:h},null)])])}}))}}}));

File diff suppressed because it is too large
+ 0 - 0
dist/js/index-legacy-a47607a0.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/index-legacy-ba4194c7.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/index-legacy-d14cc06a.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/instrument-9c068536.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/instrument-legacy-f808dbc5.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/modeView-2326059c.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/modeView-legacy-6d65e86b.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/polyfills-legacy-7ea27e1e.js


+ 1 - 1
src/helpers/calcSpeed.ts

@@ -116,7 +116,7 @@ export type GradualItem = {
  * @param xml 始终按照第一分谱进行减慢速度的计算
  */
 export const getGradualLengthByXml = (xml: string) => {
-	const firstPartXml = onlyVisible(xml, 0)
+	const firstPartXml = onlyVisible(xml, 0, 'calc')
 	const xmlParse = new DOMParser().parseFromString(firstPartXml, "text/xml");
 	const measures = Array.from(xmlParse.querySelectorAll("measure"));
 	const notes = Array.from(xmlParse.querySelectorAll("note"));

+ 12 - 2
src/helpers/formateMusic.ts

@@ -361,7 +361,7 @@ export const isRepeatWord = (text: string): boolean => {
 	return false;
 };
 
-export const onlyVisible = (xml: string, partIndex: number): string => {
+export const onlyVisible = (xml: string, partIndex: number, resourceType?: string): string => {
 	if (!xml) return "";
 	// console.log('原始xml')
 	const detailId = state.examSongId + "";
@@ -497,6 +497,16 @@ export const onlyVisible = (xml: string, partIndex: number): string => {
 
 			// 最后一个小节的结束线元素不在最后 调整
 			if (part && part.getAttribute("id") === id) {
+				if (!resourceType) {
+					const backups = Array.from(part.getElementsByTagName('backup')) || []
+					for (let backup of backups) {
+						// @ts-ignore
+						if (backup && backup?.getElementsByTagName('duration')?.length) {
+							state.isSingleMutliTrack = true;
+							break;
+						}
+					}
+				}				
 				const barlines = part.getElementsByTagName("barline");
 				const lastParent = barlines[barlines.length - 1]?.parentElement;
 				if (lastParent?.lastElementChild?.tagName !== "barline") {
@@ -1463,7 +1473,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 			// console.log('👀看看endtime', nodeDetail.duration, relaEndtime, fixtime, i)
 			// console.log('音符时间',nodeDetail.i,nodeDetail.time,nodeDetail.endtime)
 			tickables = tickables.filter((tickable: any) => tickable.attrs?.type !== "GhostNote")
-			let maxNum = (state.isCombineRender && note.maxNoteNum) ? note.maxNoteNum : tickables.length;
+			let maxNum = (state.isCombineRender && note.maxNoteNum) || state.isSingleMutliTrack ? note.maxNoteNum : tickables.length;
 			// 妙极客的曲子,一个休止小节内可能有多个休止符,此时maxNum是0,需要针对这种情况作处理
 			if (note.isRestFlag && maxNum === 0) {
 				maxNum = note.maxNoteNum;

+ 2 - 0
src/state.ts

@@ -618,6 +618,8 @@ const state = reactive({
   providerType: "PLATFORM" as "PLATFORM" | "TENANT",
   /** 后台审核 */
   isWebAudit: false,
+  /** 是否是单声轨多声部的声轨 */
+  isSingleMutliTrack: false,
 });
 const browserInfo = browser();
 let offset_duration = 0;

File diff suppressed because it is too large
+ 1 - 0
stats.html


Some files were not shown because too many files changed in this diff