Git Product home page Git Product logo

Comments (7)

kusog avatar kusog commented on August 16, 2024

I believe this is due to CPU overload. When used on lower end PCs I get odd problems. When used on the Mac with Safari or Chrome, the CPU is hit and the more sounds playing at once the more the sound quality is impacted. Removed the gain node helps significantly. I believe that when using web audio api, anything that requires sound processing like the gain will eat CPU. Works fantastic on Chrome for my quad core i7, but not so good on Chrome on my Acer Iconia W500 with the C50 atom cpu.

from midi.js.

kusog avatar kusog commented on August 16, 2024

In some ways, using elements may be better for performance on low end machines.

from midi.js.

mudcube avatar mudcube commented on August 16, 2024

Hi @kusog, Good point, there should be an option to turn on/off any special WebAudioAPI features, like gain support (and future effects) to support Mobile browsers more effectively. I'll take a look into this and add to the list for next release. Also, browser support for MIDI.js listed on the project page would be a boon.

from midi.js.

mudcube avatar mudcube commented on August 16, 2024

In the meantime, it'd be easy for you to detect iOS, and then have a conditional in the plugin.js that prevents linearRampToValueAtTime, and the createGain function from being run in the WebAudioAPI portion of the script.

from midi.js.

kusog avatar kusog commented on August 16, 2024

I discovered that the version of MIDI-js I am running will set gain volume above 1, yet the docs say the value should be between 0 and 1 as a decimal. When I did some tests and just hard coded the volume to 50, I get the bad scratchy sound on Safari. A test I made just working with web audio API works great on safari >6.0 with many sounds playing even with gain and no problems.

From: Michael Deal [mailto:[email protected]]
Sent: Tuesday, February 18, 2014 12:47 AM
To: mudcube/MIDI.js
Cc: kusog
Subject: Re: [MIDI.js] Safari on iPad fails to play multiple tracks (#64)

Hi @kusog https://github.com/kusog , Good point, there should be an option to turn on/off any special WebAudioAPI features, like gain support (and future effects) to support Mobile browsers more effectively. I'll take a look into this and add to the list for next release. Also, browser support for MIDI.js listed on the project page would be a boon.


Reply to this email directly or view it on GitHub #64 (comment) . https://github.com/notifications/beacon/1085858__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwODIzNTIzMCwiZGF0YSI6eyJpZCI6MjU3NjIyMTd9fQ==--1584e23d93d3f2d74eb6cb40bad77f6514a084c4.gif

from midi.js.

mudcube avatar mudcube commented on August 16, 2024

@kusog I noticed in the docs it says between 0-1 also but for some reason it requires -1 in order to turn the volume completely off... so I mapped from -1.0 to 1.0 for the MIDIPlayer demo. I've added an upwards constraint for values more than 1.0 in the latest push to prevent accidentally going out of range.

from midi.js.

montulli avatar montulli commented on August 16, 2024

The iPad is still a problem. I was using an older version of your library from Feb and your library worked reasonably well on the iPad in both safari and chrome. I just upgraded to the latest version and there are significant performance issues on Safari.

Let me know if I can help in any way. Unfortunately I don't have a Mac, so I can't debug anything on an Ipad. (Silly platform)

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.