FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Building a Browser Piano That Actually Sounds Good
How-ToWeb Development

Building a Browser Piano That Actually Sounds Good

via Dev.to JavaScriptMichael Lip2h ago

The Web Audio API shipped in Chrome in 2013. Thirteen years later, most browser-based pianos still sound like they're running through a tin can connected to a dial-up modem. There's a reason for that, and it's not the API's fault. Why browser pianos sound bad The naive approach to a browser piano is to generate a sine wave at the correct frequency. A4 is 440 Hz. Each semitone up multiplies the frequency by 2^(1/12), approximately 1.05946. So you create an oscillator, set its frequency, connect it to the audio context's destination, and you're done. The result sounds nothing like a piano. It sounds like a hearing test. A real piano string doesn't produce a single frequency. It produces a fundamental frequency plus a series of overtones (harmonics) at integer multiples of the fundamental. The second harmonic is twice the fundamental, the third is three times, and so on. The relative amplitudes of these harmonics give each instrument its characteristic timbre. A piano's timbre is further

Continue reading on Dev.to JavaScript

Opens in a new tab

Read Full Article
0 views

Related Articles

Flutter Mistakes That Make Apps Slow ⚡
How-To

Flutter Mistakes That Make Apps Slow ⚡

Medium Programming • 39m ago

Welcome Thread - v370
How-To

Welcome Thread - v370

Dev.to • 40m ago

How to Calculate Your Final Grade When the Syllabus Uses Weighted Categories
How-To

How to Calculate Your Final Grade When the Syllabus Uses Weighted Categories

Dev.to Beginners • 1h ago

How Word Scramble Solvers Use the Same Algorithm as Spell Checkers
How-To

How Word Scramble Solvers Use the Same Algorithm as Spell Checkers

Dev.to Beginners • 1h ago

USD to INR Conversion: Why the Rate You See Is Not the Rate You Get
How-To

USD to INR Conversion: Why the Rate You See Is Not the Rate You Get

Dev.to Beginners • 1h ago

Discover More Articles