You will find the MEDIACOLLEGE website useful for the background theory of audio.

You can output sounds either by generating them with oscillators or by playing existing sound files. The Smart Pascal versions of Morse Code and Invader use an oscillator and sound file, respectively. BounceBlocks has background music with AAC compression and sound effects. Our tutorial examples on the following pages are designed to demonstrate audio and keep other code familiar and brief.

The examples show the syntax for the use of these types of node: audio buffer, delay, compressor, filter, gain, oscillator and panner.

Supplied Demonstrations

Find three demonstrations in the Projects\Featured Demos\API\Web Audio folder:
  1. Lesson 1 - Check Availability is a very short program showing you how to check the availability of audio in the browser.
  2. Lesson 2 - Sine Generator is a form-based application that enables the user to change the frequency and volume of a note (produced by an oscillator) with TW3Sliders. Change the colour of the sliders using the Property Inspector.
  3. WebAudio ABX Test is a form-based application to that implements the ABX test to determine whether or not you can distinguish any differences between two sound files. Press the A and B buttons enough times for you to be able to identify and remember any differences between the two files. For the test you need to press (fifteen times) the X button followed by the button of your decision (X=A or X=B). After your 15 attempts you see a pie chart of the correct and incorrect responses.

    The second file has in its name CBR (constant bit rate), so presumably the first is a VBR (variable bit rate) file. You can, of course, use this application to see if you can distinguish pairs of your own sound files.

Version 2.2 Beta 5 of Smart Mobile Studio has additional examples.


Programming - a skill for life!

Developing graphical web pages including 3D, input from keyboard and mouse and storing and loading data