Code Monkey home page Code Monkey logo

Comments (6)

asearfos avatar asearfos commented on July 21, 2024

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.

from chipper.

asearfos avatar asearfos commented on July 21, 2024

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

from chipper.

asearfos avatar asearfos commented on July 21, 2024

@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?

from chipper.

JamesPino avatar JamesPino commented on July 21, 2024

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.

from chipper.

asearfos avatar asearfos commented on July 21, 2024

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.

from chipper.

asearfos avatar asearfos commented on July 21, 2024

Changed to check file size is complete and merged.

from chipper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.