Show HN: Eigendrum - Draw any shape and hear what it sounds like as a drum
baselashraf81.github.ioHow it works: * Solves -∇²u = λu using finite element analysis (Kφ = λMφ) on a triangle mesh. * Validated to <0.1% error against closed-form solutions for circles (Bessel zeros) and rectangles. * Sound model factors in strike location, Rayleigh damping, and mallet width. * Includes Kac drums I & II to demonstrate identical sound spectra from different geometries. * No frameworks, build steps, or dependencies.
Repo and tests: https://github.com/BaselAshraf81/eigendrum
Happy to answer any questions about the FEM solver or Web Audio setup!
Also you can draw your own drums! What! That's so cool
thinking about it, each drum here would have totally different ideal scales to the others.
this is cool.
You can prove that changing the material has no effect on the relative frequencies: \lambda_2 / \lambda_1, \lambda_3 / \lambda_1, etc. are completely independent of the material.
The shape is the determining factor; changing the materials (and hence the wave speed) just dilates the whole spectrum.
Ring out controls how fast the higher modes decay (basically stiff vs soft material), The mallet width controls how many modes a strike can even reach, since a real mallet can't drive the high frequency ones very hard.
No labeled presets like "wood" or "metal" though, just raw sliders. Would be a fun addition if someone wants to map a few physically sensible combos to buttons. PRs Welcome!