2 Getting Started with JavaScript and the Web Audio API
Hello Sound Program
In an introduction to a programming language, the first program you write is often called “Hello World,” which prints the words “Hello World” on the screen. Because we are using the Web Audio API to create sounds, this section explains how to create a “Hello Sound” application that immediately plays a sound when you run it.
Copy the folder web audio template from the last chapter to a new directory, and rename the copy to hello_sound.
Type the code below into the app.js file that is present within the hello_sound folder. Save it and then launch the index.html file ...
Get JavaScript for Sound Artists now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.