Viewing a saved revision (read-only)
d4c4fcf2204f49f8b364d54cc8a7720b
Tone.js - "Mary Had a Little Lamb"
This example plays the melody “Mary Had a Little Lamb” using the Tone.js library for Web Audio. It displays a Play button and a hidden “Playing” paragraph, toggled by button clicks. The code schedules individual notes with `Tone.Part` and `Tone.Transport`, using a polyphonic synth (`Tone.PolySynth`) to trigger note pairs and single notes at precise timing positions. The note sequence is hardcoded as an array of time–note pairs, based on the book "JavaScript Crash Course" by Nick Morgan.
AI-generated descriptionPlay the Pong game. Use the mouse to move the bottom paddle. Hit the ball with the edges of the paddle to change the angle and speed of the ball. The play stops when a player reaches 10 points. Visit https://github.com/ax-va/JavaScript-Crash-Course-Morgan-2024.