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

Isseu when reset fileURL in MIDITrackView #74

Open
airakivela opened this issue Oct 13, 2023 · 3 comments
Open

Isseu when reset fileURL in MIDITrackView #74

airakivela opened this issue Oct 13, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@airakivela
Copy link

macOS Version(s) Used to Build

macOS 13 Ventura

Xcode Version(s)

Xcode 14

Description

HI.
Thanks for this wonderful Package..
I am developing MIDI mixing applictions now.
When I clcik import button to fetch midi file, this midi file tracks has been displayed in MIDITrackView.
And then I click this button again to fetch other midi file, MIDITrackView displayes first imported midi file and second file at the same time..
But after then when I do above process again (but this time, I select first midi file), MIDITrackView displays only first midi file tracks as I expected..
What waht the reason??
Thanks for your support.

Crash Logs, Screenshots or Other Attachments (if applicable)

No response

@airakivela airakivela added the bug Something isn't working label Oct 13, 2023
@emurray2
Copy link
Member

Hi, thanks for your feedback. This is likely due to the current implementation of MIDITrackView and the view not redrawing when a new file is loaded. I'm not sure why it chooses to draw the first file again, but any screenshots/code you might be able to provide would be appreciated.

I'm currently working on a new implementation of this, and any of the steps to reproduce this issue will be considered and tested during development of the new implementation.

@airakivela
Copy link
Author

airakivela commented Oct 14, 2023

Hi. @emurray2
Thanks for your reply..
We can initiate MIDITrackView with file url (optional).
So I thought if we set this url as nil, we can clear and set url with new one..
But it did not work as expected..
Seems like it works some times but almost did not work.. (Looks like as if append...)
I will add video here.
Thanks.

Screen.Recording.2023-10-14.at.12.24.18.AM.mov

@emurray2
Copy link
Member

Hi. @emurray2 Thanks for your reply.. We can initiate MIDITrackView with file url (optional). So I thought if we set this url as nil, we can clear and set url with new one.. But it did not work as expected.. Seems like it works some times but almost did not work.. (Looks like as if append...) I will add video here. Thanks.
Screen.Recording.2023-10-14.at.12.24.18.AM.mov

That makes sense, I appreciate you sharing this video. I saw when you loaded the first file it did have more tracks from the other loaded file than I expected. I suspect the issue is I didn't implement a state-management system to help the track clear when the file is either changed or set to nil. I'll play around with it a bit, see if I can replicate this and rectify it as best I can in the current implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants