Tone.js

[Prepare for fun.]

The Tone.js documentation succinctly describes the functionality of the Tone.js javascript library:

Tone.js is a framework for creating interactive music in the browser. It provides advanced scheduling capabilities, synths and effects, and intuitive musical abstractions built on top of the Web Audio API.

With HTML5 comes many web enhancements including the Web Audio API. The Tone.js library makes use of the Web Audio API and provides a javascript API of those features. It is possible to work directly with the Web Audio API but the Tone.js library provides a nice interface into that functionality. There are several links to Tone.js resources listed below that you'll want handy. If you want to get a copy of the Tone.js source code (highly suggested) go to the github account.

The examples site provide a glimpse into the capabilites of Tone.js and provide sample code to get started. The Tone.js basics and Tone.js wiki page also provide example code for getting started using this library. Details of the full library are found at the API documents.

I'd like to thank Yotam Mann for creating Tone.js.

The best way to get started with using Tone.js is to read through and explore the example code in the documents listed above. Copy and paste the example code into your own pages and make exploratory changes. In the documents you'll find links to several interesting projects that are using Tone.js.

Throughout this course we'll explore many of the capabilities of Tone.js as we use it to play examples of the music theory concepts we study. Interestingly we'll find that the playing of the notes (the Tone.js part) is the easy part. The more complicated aspect is properly dealing with the naming conventions in standard music notation. Most of our code will be focused on getting the correct names for display. If we were to treat the interval structures as numbers and then name them with whatever enharmonic equilvalent name is convenient, the code would be considerably smaller. It leads to the inevitable conclusions:

Below are links to our explorations of using Tone.js with our music theory concepts.

  1. Discussing the 12 Tones
  2. Play Note
  3. Play Major Scale
  4. Pick the Correct Enharmonic
  5. Define the Scale structure
  6. Play Rhythms
  7. Play Minor Scales
  8. Play Intervals
  9. Play Intervals - part 2
  10. Play Intervals - part 3
  11. Play Modes
  12. Play Chords
  13. Play Expressive Melody
  14. Play Parts
  15. Editing Synths with Tone.js
  16. Play Live Update
  17. Play Scale Degrees
  18. Play Chord Voicings
  19. Blues Improv
  20. Practice Combo
  21. Mozart Dice Game
  22. Blues Dice Game
  23. Using Lilypond format as input
  24. Creating Melody from melodic contours
  25. Play Colors
  26. Creating Rhythms from rhythmic outlines
  27. Animated Circle of Fifths
  28. Play Arpeggios
  29. Phrase Modifications