Virtual MIDI keyboard
A piano keyboard you play from the computer keyboard, the mouse or a touch screen. Every note sounds in the page, and one button sends the same notes to a MIDI output, so a music app hears them as a MIDI keyboard. Nothing to install, and nothing leaves the page.
Play it
- Click a key, or press A on your keyboard. That is C.
- Play the row A to J for the white keys, and W, E, T, Y and U for the black keys above them.
- Press Z or X to move an octave down or up.
- Move the Velocity slider, or press C and V, to play softer or harder.
The letter keys follow the piano: the home row is the white keys and the row above holds the black ones.
Know the key layout
- White keys. A, S, D, F, G, H, J, then K, L, the semicolon key and the quote key for the notes above.
- Black keys. W, E, then T, Y, U, then O and P.
- Octave. Z down, X up. The drawing shows three octaves and the letters play the middle one.
- Velocity. C softer, V harder, in steps of ten.
Keys are read by their position, not by the letter printed on them. On an AZERTY or Dvorak keyboard the same physical keys play the same notes.
Send the notes to a music app
- Press Send to a MIDI output and allow MIDI when the browser asks. This works in Chrome, Edge and Firefox.
- Pick an output from the menu, and a channel if the app listens to one.
- In the music app, turn on that same port as a MIDI input and arm a track.
A hardware synth or a MIDI interface shows up in the menu by itself. To reach an app on the same Mac, the page needs a virtual cable: turn on the IAC Driver in Audio MIDI Setup and pick its bus here. With an IAC bus selected, a DAW on the same Mac hears this page as a MIDI keyboard. The IAC Driver on a Mac has the four clicks that turn it on.
Light it from a real MIDI keyboard
Once MIDI is allowed, the page also listens. Notes from a connected MIDI keyboard light their keys in green and play through the page's sound, which makes this a quick way to hear a controller keyboard that has no sound of its own. Those notes are not passed on to the output, so nothing can loop. A controller keyboard with no speakers can be heard here in a few seconds. To check every key, velocity and knob one by one, use the MIDI tester.
What it cannot do
- Feel like an instrument. The sound is a plain tone made in the browser, and browser audio adds its own delay.
- Read how hard you press. A computer key is down or up, so velocity comes from the slider.
- Send MIDI from Safari. Safari does not offer MIDI to web pages. The sound still works there.
- Play in the background. The letter keys reach the page only while this tab is in front.
It is a sketchpad and a test instrument, not a replacement for a keyboard with real keys.
Make any key a MIDI key in every app
On a Mac, InputConfig, the free app I make, does this job without a browser window in front. Any keyboard key, mouse button or game controller button can send a MIDI note, a CC, pitch bend or a program change through the app's own virtual MIDI port, which music apps see whenever it runs, with no IAC Driver to set up. A game controller's buttons and sticks make a playable MIDI controller that way. MIDI output has the setup, and the MIDI note number chart names every note.
Questions
How do I use my computer keyboard as a MIDI keyboard online?
Open this page and press the letter keys. A, S, D, F, G, H and J are the white keys from C, and W, E, T, Y and U are the black keys. Z and X move down and up an octave. To reach a music app, press Send to a MIDI output and pick one.
Can a web page send MIDI to my DAW?
Yes, in Chrome, Edge and Firefox. Press Send to a MIDI output, allow MIDI, and choose an output. On a Mac, turn on the IAC Driver in Audio MIDI Setup and choose its bus, and the DAW hears this page as a MIDI keyboard.
Does the virtual MIDI keyboard work in Safari?
The sound and the on-screen keys work. Sending MIDI out does not, because Safari does not offer MIDI to web pages.
Can I play it from a real MIDI keyboard?
Yes. Press Send to a MIDI output and allow MIDI. Notes from a connected keyboard then light the keys in green and play through the page's sound.
Is it velocity sensitive?
Not from a computer keyboard, which has no way to tell how hard a key was pressed. Every note uses the Velocity slider, and C and V lower and raise it while you play.
Is there a virtual MIDI keyboard for Mac that works in every app?
InputConfig, a free Mac app, turns any key, mouse button or game controller button into a MIDI note through its own virtual MIDI port, with no browser window in front.
Related
Free. macOS 14 or later. No account, nothing leaves your Mac. Open source on GitHub.
Updated