Git Product home page Git Product logo

Comments (5)

artfoundry avatar artfoundry commented on July 17, 2024

What I did was toggle a loading message on the page, so that it disappears once the plugin has finished loading. I put the Jquery toggle in the callback like this:
callback: function() {
$("#loadMessage").toggle();
}

from midi.js.

detky avatar detky commented on July 17, 2024

Hi Artfoundry,

I've also tried something like that, i don't get also any error, but anyway the sounds can be heared just a few seconds (till to 10) after the callback is made. Check this out: http://www.easychords.de/MyBeats.aspx, click play on the first demo composition and you'll see it. As last try, i'm starting making somthig like try catch until-it-works after the call back, but it looks horrible and it doesn't work correctly. But even when i get no more errors calling setvolume or playnote, i cant hear nothing without to wait at least 5 seconds :(

Regards

from midi.js.

artfoundry avatar artfoundry commented on July 17, 2024

Hmm, I'm not sure I'm seeing what you're talking about. The app seems to work fine (and looks great!). When I click play, it pops up a window saying to wait while it loads. Then the window disappears, and the beats start. I think the way you've done it is fine. If you mean you don't want the load time at all, I'm not sure there's any way to avoid that (I think there's quite a bit being loaded). It only loads once though, not for each song, so either you have to load on the first song played or when the page loads. My app loads the plugin when the page loads. You could try that - then there wouldn't be any delay in playing the song. But if you're trying to detect the exact time when loading is finished, I'm not sure - I'm not dealing with that as I don't really mind the few seconds of load time at the beginning (and I don't think most users will either as long as you tell them what's happening).

from midi.js.

detky avatar detky commented on July 17, 2024

Hi Artfoundry,

thank you!! What i mean is that the sounds come a litle bit late. If you play the composition, it sounds, BUT not all notes were played. If you start the composition again wituout to restart the page, may you note that the beginning is lost :( Thats my point

Regards

from midi.js.

mudcube avatar mudcube commented on July 17, 2024

It looks like you figured it out. Your app sounds great btw, good encoding. Closing this issue.

from midi.js.

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.