Skip to content

Instantly share code, notes, and snippets.

@atilafm
atilafm / piano.js
Created August 23, 2023 17:42 — forked from felippe-regazio/piano.js
Turns your keyboard into a Piano
/*
Put this code on a page or paste on your console, then focus on the page
and try to press keys from q...p and a...l
*/
const getKeyFrequency = n => Math.pow(2, (n - 49) / 12) * 440;
const audioCtx = new AudioContext();
const playing = {};
window.addEventListener('keydown', e => {
public interface IRtdClient
{
object GetValue(params object[] args);
}
public class RtdClient : IRtdClient
{
readonly string _rtdProgId;
static IRtdServer _rtdServer;