Piano keys playing in Three.js

Starting up!

Special Thanks to Keith William Horwood and Nick Berry, for the masterpieces!

If Some Special One teaches me how to change the colors of the THREE.MeshNormalMaterial, the appearance would be much better!

The link:



Jose Roberto Lazzareschi

PS: TTTTT is Thanks To The Three.js Team

1 Like

Looks nice. It is possible to play more complex music with chords (several keys pressed at the same time)?

Just use another material, that allows to control the color.

Hello Pavel,

Unfortunately one note at a time…
I’m going to try to create a clone of js functions to synthesize another note at the same time.

I tried changing the material of THREE.ExtrudeGeometry, but I only got one color per key, not six colors for each key.

In PC I like the sounds result, but in my android Chrome I hated;

Maybe the mp3 works better in smartphones, but the current piano sound in PC is good because the choice of duration effect

I will continue with the experiences

Thank you for visiting

You can add vertex colors based on the normal vectors.

Thanks for the sugestion :wink: