Jazz-Soft.net
We make it sound!
Home » Examples » Virtual Piano

Virtual Piano

How it works

Use the mouse or touch screen and/or keyboard to play the piano.

Page source

<!DOCTYPE html>
<html>
<head>
<title>Virtual Piano</title>
<script src="JZZ.js"></script>
<script src="JZZ.synth.Tiny.js"></script>
<script src="JZZ.input.Kbd.js"></script>
</head>

<body>
<h1>Virtual Piano</h1>

<div id=piano></div>

<script><!--
JZZ.synth.Tiny.register();

JZZ.input.ASCII({
  A:'F#4', Z:'G4', S:'G#4', X:'A4', D:'Bb4', C:'B4', V:'C5', G:'C#5', B:'D5',
  H:'D#5', N:'E5', M:'F5', K:'F#5', '<':'G5', L:'G#5', '>':'A5', ':':'Bb5'
}).connect(JZZ.input.Kbd({at:'piano'}).connect(JZZ().openMidiOut()));

--></script>

</body>
</html>

See also