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

split really long songs #26

Closed
asearfos opened this issue Jan 17, 2019 · 6 comments
Closed

split really long songs #26

asearfos opened this issue Jan 17, 2019 · 6 comments
Assignees

Comments

@asearfos
Copy link
Owner

flag for too large of file; split really long songs, subsequently stitch back together before writing (@asearfos can integrate kivy popup to warn users not to change the sliders between songs)

@JamesPino JamesPino self-assigned this Jan 23, 2019
@asearfos
Copy link
Owner Author

Can we add a catch for really long songs? Not a complete fix on how to handle them but at least let the user skip before it crashes chipper.

@asearfos
Copy link
Owner Author

Added a catch for long songs, allowing user to not load but skip if recommended it is too long. #39

@asearfos
Copy link
Owner Author

@JamesPino So, I merged the changes and closed this issue today because it seemed like we had everything working. However, as I worked on other issues I realized that by checking the number of columns we are having to create the sonogram first which means we still have chipper crash if someone puts in a super long song they have not split up yet. Would it be difficult to change the catch to look at size of the wav file rather than column number of the sonogram?

@asearfos asearfos reopened this Jun 24, 2019
@JamesPino
Copy link
Collaborator

The easy answer is to just hard code a file size (basically what we did not now but do it right before the load). I can do this today.
I was trying to come up with a good, robust solution, where I was thinking of figuring out how much memory is free and compare it to the file size. But then I was thinking that we make a few manipulations/copies of the file and images, so we'd have to calculate the size needed per file to analyze, which seems like it could be different. Also, from what I understand Mac and Windows do this swap space with memory, so it isn't always easy to get a number of how much memory is free.
That's when I figured that it should be possible to load in a file, since it was just using a small amount of memory compared to what it will eventually use if it continued onto the analysis. I figured it would be safe, but I suppose there are still people with 4gb of ram or less? I'll move the logic above where it is now and see how it comes out.

@asearfos
Copy link
Owner Author

I agree I think the easy answer is enough. I will send you a file that is even longer so you can see how someone might try to load a full recording rather than a small clip which makes it crash.

When I started using the first way you fixed it I realized I was more controlling what looked "good" on chipper not what was technically manageable by the computer to load. I think we should go after the second (by file size) and let the user have the discretion to what looks adequate to parse.

@asearfos
Copy link
Owner Author

Changed to check file size is complete and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants