🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

flash-piano

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flash-piano

A web component for rendering interactive piano keyboards

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Flash Piano

Screenshot 2023-08-14 at 7 12 27 PM

The "Flash Piano" is the modern successor to a Macromedia Flash-based piano I built in 1999. Now that Flash is gone, I've rebuilt it on top of modern browser technology, making use of Web Components, the Web Audio API, and Web MIDI.

The Flash Piano is a web component, meaning you can use it in any website from any framework - it works just like a normal HTML component:

<!doctype html>
<html lang="">
  <head>
    <script src="https://unpkg.com/flash-piano"></script>
  </head>
  <body>
    <flash-piano></flash-piano>
  </body>
</html>

There are no attributes to configure. There are two CSS variables you can use to customize the piano:

flash-piano {
  --piano-key-width: 50px;
  --piano-keybed-color: blue;
}

Setting --piano-key-width will scale the entire piano up or down.

If you have a MIDI keyboard connected, you can play the piano with it while the piano is focused (click on it first).

FAQs

Package last updated on 15 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts