A HTML5 widget for iBooks that provides an interactive audio sample pad. The implementation uses Audio Buffers to ensure low latency and a responsive user experience.
Audio files and converted by the build script to base64 data, ensuring iOS / iBooks quirks with loading audio content via XMLHttpRequest are avoided.
- Run
build.sh
- Open
build/html/index.html
in your browser
- Run
build.sh
- Drag / drop
build/SamplePad.wdgt
into your iBook (using iBook Author) - Preview on your device
Experimenting with different audio files and CSS layouts can be done directly in the browser, i.e. without building the iBook widget itself.
Modifying the audio files that are loaded onto the generated pads is as simple as editing the
contents of the src/audio
folder. One sample pad will be created per audio file.
Changing the style / layout of the widget can be achieved by editing src/html/css/styles.css
.
The container element has the class name sampler
. All pads will have the class name pad
and
e.g. pad-0
, pad-1
, pad-2
...
MIT