Skip to content
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

Fix SMF handling for some MIDIs #183

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

sevenc-nanashi
Copy link
Contributor

Fixes #182 .

parseTrack(index, timeDivision, tickPrefix, midiTrack, params.defaultLyric)
}.toMutableList()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can just filter all tracks to remove empty ones?

        val tracks = midiTracks.mapIndexed { index, midiTrack ->
            parseTrack(index, timeDivision, tickPrefix, midiTrack, params.defaultLyric)
        }.filter { it.notes.isNotEmpty() }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to keep old behaviors as much as possible. Is it okay to remove all empty tracks?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, let's keep the original behavior 👍

@sdercolin sdercolin changed the title Fix UTAU/OpenUtau pitch import for very close pitch points Fix SMF handling for some MIDIs Aug 8, 2024
@sdercolin sdercolin merged commit 7b64121 into sdercolin:develop Aug 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants