# Piano > How about playing the piano right here? Play a two-octave piano with the mouse, touch, your computer keyboard or a MIDI keyboard, with sustain and note names. Play a piano in your browser with mouse, multi-touch or computer keys in the tracker layout (Z–M, Q–U). Sustain pedal, octaves, note names and MIDI keyboards. - Page: https://how.box/piano/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/piano/?v={v}&o={o}&l={l}&n={n} - `v` (piano, organ, marimba or xylophone): Sound: piano, organ, marimba or xylophone. Example: `piano`. - `o` (whole number 1 to 6): Octave of the lower C on the keyboard, 1–6. Example: `3`. - `l` (both, notes, keys or none): Key labels: both, notes, keys or none. Example: `both`. - `n` (whole number 0 to 127): The note shown in the result, as a MIDI number 0–127. Example: `69`. Example answer: https://how.box/piano/?v=piano&o=3&l=both&n=69 The page computes the answer in the browser: read results from the agent tools below, not from the page HTML. ## Agent tools - `piano_note`: Looks up a musical note: its MIDI number, frequency, names and whether it is a black key. - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"piano_note","arguments":{"note":69}}}` - GET: https://how.box/mcp/run/piano_note?note=69 - `piano_nearest_note`: Finds the equal-tempered note nearest to a frequency and how far off it is in cents (positive = sharp). - MCP: POST https://how.box/mcp `tools/call` with `{"name":"piano_nearest_note","arguments":{…}}`; input schema in https://how.box/agent-tools.json. ## How it works Each key is a note one semitone above the key to its left: twelve keys, seven white and five black, make an octave, where the frequency doubles. Notes are named by letter and octave number, and middle C is C4. In Finnish and German the note B is called H, and B flat is called B. The pitch of every key follows equal temperament: f = 440 Hz × 2^((n − 69) / 12), where n is the key's MIDI number (A4 = 69, middle C = 60) and 440 Hz is the standard tuning note A4 (ISO 16). For example, middle C is 440 × 2^(−9/12) ≈ 261.63 Hz. The sounds are made in your browser from a few pure tones per note, each fading at its own rate. A piano string's overtones are slightly stretched, while a marimba bar is tuned so its first overtone is two octaves up and a xylophone bar's an octave and a fifth up (HyperPhysics). They are simple imitations, not recordings. The computer keys follow the layout of music trackers such as ProTracker and FastTracker 2, which turned the letter rows into two piano octaves. Speakers, the browser and Bluetooth add a small delay; wired headphones are quickest. ## FAQ **Why is there a delay before the sound?** Every device needs a moment to turn a key press into sound. Wired headphones or speakers add the least; Bluetooth headphones can add a clearly noticeable delay. **Can I play chords with the computer keyboard?** Yes, hold several keys at once. Some keyboards cannot report every combination of three or more keys, so a note may now and then stay silent. **Which MIDI keyboards work?** Most USB and Bluetooth MIDI keyboards work in browsers that support Web MIDI, such as Chrome and Edge. The keys, their strength and the sustain pedal are read on this device only. **Why do notes keep ringing after I release a key?** Sustain may be on. Release Space or the MIDI pedal and turn off the Sustain button. A sound’s natural fade can still continue briefly. **Do the computer keys work on AZERTY or QWERTZ keyboards?** Yes. The keys follow physical positions rather than the letters typed. The on-screen labels use US keyboard letters, so the labels on your keys may differ. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)