-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use midi-file instead of midi-parser-js #165
Use midi-file instead of midi-parser-js #165
Conversation
Could you check the build error first? |
Oh, I forgot to test ui. I'll fix |
135e172
to
f0c857f
Compare
218d520
to
5d3b64b
Compare
Looks like the yarn lock file still contains a lot of unrelated changes, could you try remove that file and run the upgrade task again? |
@@ -25,11 +24,8 @@ object StandardMid { | |||
|
|||
suspend fun parse(file: File): Project { | |||
val midi = Mid.parseMidi(file) | |||
if (midi == false) { | |||
throw IllegalFileException.IllegalMidiFile() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the new library handle unexpected input?
If it throws an error, we could catch it and rethrow the IllegalFileException.IllegalMidiFile()
with the original error as the cause (passed by constructor)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it throws string (not Error). I changed to catch dynamic
so that the error will be handled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Let's wait for the CI
Oh, please cherry-pick this commit: d39db5f |
Done. |
* Bump up version * Create core module * Move files * Add some JsExport * Add: Support analysis for lyrics with suffix * Add functions for TS library (#164) * Change: Use Array for better typing * Add: Add generate functions * Add: Add ability to build minimum core * Add: Add wrapper * Add: Add test * Improve: gradlew test will run deno test * Add: Add missing keys * Change: Create documentToUfData / ufDataToDocument * Fix: Fix name shadowing * Add: Add 10 tracks test * Change: Create project data * Add: add parseFile and toFile * Add: Add fromAny * Add: Add convertJapaneseLyrics * Add: Add ust * Delete: Delete deno things * Delete: Delete unused gitignore# * Change: DocumentContainer -> ProjectContainer * Change: Use KDoc * Change: Use internal to hide error * Change: Rename convertJapaneseLyrics * Change: Change visibility * Revert: webpack.config.d was required * Fix resources resolve * Use midi-file instead of midi-parser-js (#165) * Change: Use midi-file * Fix: Fix importing assets * Fix: Run kotlinUpgradeYarnLock * Fix: Fix resolver * Change: Make ESModule conditional * Delete: Delete workaround * Delete: Delete unused dependency * Revert: Re-add workaround * Revert: Revert unrelated changes * Update: Update yarn.lock * Change: Re-throw error * Fix: Fix error * Fix: It throws string, not an Error * Fix tasks about resources copy --------- Co-authored-by: colin.weng <[email protected]> * Export exceptions to JS (#167) * Update Russian translation (#168) * Change: Don't remove "っ" by default (#169) * Change: Don't remove "っ" by default * Delete: Why is there a new line? * Allow specifying default lyrics via ImportParams (#170) * Add: Allow specifying default lyrics via ImportParams * Code: gradlew ktlintFormat * Update: Update Format.kt * Allow specifying ImportParams from JS, and export pitches (#171) * Add: Support tssln (#172) * Add: Support importing tssln * Add: Add basic export * Code: gradlew ktlintFormat * Change: Use yarn * Update: Update texts for tssln (#174) * Update: Update texts * Update: kotlinUpgradeYarnLock * Fix: Fix around esm import * Code: Format * Export tssln to JS (#175) * Add: Export tssln * Change: Use val * Fix some issues (#176) * Fix: Fix some minor issues * Add: Add comment * Fix: Fix loading tssln from VST (#177) * Fix: Fix loading tssln from VST * Code: gradlew ktlintFormat --------- Co-authored-by: sevenc-nanashi <[email protected]> Co-authored-by: colin.weng <[email protected]> Co-authored-by: Dmitry Kiryanov <[email protected]>
I changed to use midi-file instead of midi-parser-js, because:
I tested and it worked for both standard midi and vocaloid midi.