Hello wonderful Hype Forum community!
I am in the process of creating an interactive iBook for a client, but a big glitch and possibly performance issues are showing up. I’m very much hoping I can somehow fix these issues. Otherwise, I’m afraid the project may not be viable for release.
Short project description:
I am building an interactive sheet music player for practicing (sight-reading) bass players. It allows the user to selectively mute tracks from duos, trios, and quartets so that the user can practice the parts at various speeds and play the parts along with the rest of the (virtual) ensemble.
In targeting this as an iBooks release, I was very much hoping that the iBooks Author Widgets I’m building would work well across mobile, tablet and desktop platforms. Unfortunately, this does not seem to be the case. Each platform is showing some different behavior while running in iBooks.
to download a folder that contains the iBooks Author file (that has all of the completed works so far), as well two Hype files (one duo and one quartet). Presumably, the quartet would be more taxing on each given platform than a duo or trio due to more audio being loaded/played back and more animated graphics layers, so I figured I’d include both a duo and a quartet to test both extremes.
Here are the issues I’m finding (and not finding) on each platform:
While running a proof in iBooks on macOS, the iBook (and all included Hype Pro widgets) runs flawlessly with no perceivable glitches.
This was tested on my 2015 MacBook Pro.
While running a proof within iBooks my (2nd generation 12.9 inch) iPad Pro exhibits a puzzling glitch.
The first time one of the Hype widgets is run, a rather horrible glitch appears where the audio is distorted. The audio plays back in sync as expected, but the audio is garbled and static-filled to the point of being unlistenable. However, once I ‘x’ out of the widget and reopen it, it plays back flawlessly. As long as I don’t put the iPad to sleep (and as long as the screen doesn’t go black from inactivity), I can quit and restart the app, reopen the widget that first had the glitch, or even choose another widget and playback seems to be very good and glitch free. It seems that it’s the act of putting the iPad to sleep that resets things and the glitch again re-appears on whichever widget I choose to playback first.
This led me to think that it was an issue with how (and when/where) the audio was being preloaded, however, now I’m not so sure. I experimented with numerous variations on where I preloaded the sounds, but this seemed to have no effect.
In looking for potential solutions, I happened across this article from Daniel Morgan:
From reading this article, I started to think: is there perhaps a way that I might be able to harness ‘Widget Events’ in order to trick iBooks into thinking that the widget had been played once and then reloaded in order to bypass the glitchy first-run and then get on with correct playback? A very hacky-solution, but nonetheless I’m now at the point where I am willing to try anything to get it to work glitch-free.
While testing on my iPhone X running iBooks an audio glitch appears, however it seems like a different glitch than the iPad. The audio has pops and clicks occurring at regular intervals, however it’s much less pronounced that the iPad. It’s as if iBooks is struggling to playback the audio without pops and clicks occurring due being maxed out.
When I ‘x’ out of the widget and reopen it in order to reproduce the action that got rid of the glitch on the iPad, the minor pops and clicks happen again as they did on first open of the widget. In other words, re-opening the widget does not fix the clicks and pops problem like it does on the iPad. Also worth mentioning is that the pops and clicks seem much less prevalent when playing a duo and more prevalent when playing a quartet (making me think that it is indeed a processing power issue on the iPhone).
So, that’s the scope of the audio glitches I’m finding on the various platforms.
I should also mention that (in an effort to determine whether iBooks running the widgets is the problem or my widgets themselves are the problem), I exported the two widget examples as an HTML5 folder and placed them on my server so that I could test the widgets directly running on a web browser on each device. Interestingly, running on a web browser, it seemed like I got no glitches whatsoever on all devices – desktop, iPad Pro and iPhone X seem to work fine! In short, when running on the web, bypassing iBooks altogether, it seems to run great (I noticed only the slightest occasional audio pop, but it was acceptable performance-wise).
Here are links to the duo and quartet on the web to test against the same files running in iBooks:
Given all of that background, here are my specific questions for anyone who may be able to help:
- Is there a way to fix the startup glitch that appears on my iPad Pro? Perhaps by harnessing Apple’s ‘Widget Events’?
- Am I just pushing it too far to run in iBooks? To many audio tracks? Too many animated layers?
- Would it be possible (and if so, how hard would it be) to make this work as a Phone Gap App?
- How would a phone gap app perform compared to an iBooks eBook? Could it handle the load better as a phone gap app since it runs so much better directly on a web browser?
- If a phone gap app is indeed a better way to go, could I follow some of the various Hype to phonegap tutorials available online and would it work ‘out of the box’, or would their be extra hoops to jump through because of my audio requirements (multiple synched audio tracks being triggered by howler.js)?
In conclusion, I should mention that the notation images I’m working with are all SVG’s. I have not yet tried PNG versions for the animated notation.
Also, the audio I’m working with has a sample rate of 48k with a standard 128 kbps bit rate as specified as acceptable in Apple support docs:
I would so very much appreciate anyone’s input on whether or not these glitches can be fixed.
If they can’t be fixed, what are my other options? Phonegap?
Thanks so much!