|
|
@@ -69,9 +69,9 @@ const processOutput = (xmlData: string) => { |
|
|
|
}; |
|
|
|
|
|
|
|
export const GET: APIRoute = async ({ params }) => { |
|
|
|
console.log('asdfasdf'); |
|
|
|
const verovioModule = await createVerovioModule(); |
|
|
|
verovioModule.FS_createDataFile('', 'bravura', 'asdfasdf', true, false, true); |
|
|
|
const score = await readFile(`src/assets/${params.asset}.musicxml`, 'utf-8'); |
|
|
|
const score = await readFile(`public/scores/${params.asset}.musicxml`, 'utf-8'); |
|
|
|
const verovioToolkit = new VerovioToolkit(verovioModule); |
|
|
|
const filteredScore = filter(score); |
|
|
|
const isSuccessful = verovioToolkit.loadData(filteredScore); |
|
|
@@ -107,7 +107,7 @@ export const GET: APIRoute = async ({ params }) => { |
|
|
|
}; |
|
|
|
|
|
|
|
export const getStaticPaths: GetStaticPaths = async () => { |
|
|
|
const files = await readdir('src/assets'); |
|
|
|
const files = await readdir('public/scores'); |
|
|
|
return files |
|
|
|
.filter((f) => f.endsWith('.musicxml')) |
|
|
|
.map((f) => ({ |