Comments (7)
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.
In some ways, using elements may be better for performance on low end machines.
from midi.js.
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.
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.
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.
@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.
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)
- very long notes are truncated HOT 2
- pitch bending in webaudio HOT 2
- How can i send a note to specific stereo channel? HOT 1
- tracks
- Audio Mobile App : MIDI.js or Native ? HOT 2
- k
- Is it impossible to pause when using noteon noteoff instead of player HOT 3
- How to disable sound in Player.js?
- There is no sound when I am playing my own midi file HOT 2
- Question, Piano Layout HOT 1
- Midi files with multi channels doesn't work using MIDI.Player.Loadfile HOT 3
- How to play file.mid HOT 4
- can i use midi.js to create a online piano and guitar? HOT 1
- Color piano not found in chrome web store HOT 2
- Playing midi file with the wrong tempo HOT 1
- ReferenceError: Base64Binary is not defined HOT 1
- Current Position / Event Listener
- Loading all GM instruments for midi file HOT 25
- Slow start of playing HOT 3
- Bug: MIDI events not being fired HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midi.js.