← 全部文章

How to Connect a Piano Keyboard to a Computer

Almost every digital piano made in the last fifteen years can talk to a computer, but they do it in three different ways. Identify which one you have and the setup takes about a minute.

Check the ports first. A USB-B or USB-C port connects directly with one cable and no driver. A 5-pin MIDI pair needs an audio interface or MIDI-to-USB adapter. A keyboard with only a headphone output can still be used by feeding its audio into the computer.

Work out which connection your keyboard has

Look at the back panel before you buy anything. The port tells you the whole procedure.

  • USB type B (square) or USB-C — direct to the computer, one cable
  • Two 5-pin DIN sockets labelled MIDI IN and MIDI OUT — needs an adapter or interface
  • A single 5-pin socket labelled only MIDI IN — the keyboard cannot send notes, only receive them
  • Only a headphone or line-out jack — no MIDI at all; plan on recording audio

USB MIDI: plug in and play, no driver needed

Most modern keyboards are USB class-compliant, which means Windows, macOS and Linux recognise them without any driver or installer. Connect the cable, open a browser instrument, and press a key.

If nothing responds, the browser is almost always the reason rather than the keyboard. Pages need permission to reach MIDI devices, and the keyboard will not appear until the connection is refreshed.

5-pin MIDI needs a converter

The old DIN plugs carry data but not power, and computers no longer ship with the socket. A MIDI-to-USB adapter cable is the cheapest route; an audio interface with MIDI ports is the sturdier one.

Connect MIDI OUT on the keyboard to MIDI IN on the adapter, not the other way round. The labels describe where the data is going from the perspective of the device, which is the single most common setup mistake.

No MIDI port? Use the audio output

An older home keyboard with only a headphone jack still belongs in a setup. Run a cable from the headphone or line-out socket into the computer’s audio input and record the sound the keyboard makes.

You lose the ability to edit notes afterwards, because the computer only receives sound. For practice and quick recordings that is usually an acceptable trade.

When the computer still does not see it

Check three things in order: the cable is a data cable and not a charge-only one, the keyboard is powered on with local control enabled, and the browser has been given MIDI permission for this site.

Unplugging and replugging is a legitimate fix here — some keyboards only announce themselves to the operating system after a fresh connection.

常見問題

How do I connect a piano keyboard to a computer without MIDI?
Use the keyboard’s audio output. A cable from the headphone or line-out jack into the computer’s audio input carries the sound itself, so you can record and practice without any MIDI connection.
Do I need to install drivers to use a keyboard with a browser?
Almost never. Windows, macOS and Linux treat class-compliant USB keyboards as standard MIDI devices. The only permission you need is the browser’s own MIDI access prompt.
Can a digital piano be used as a MIDI controller?
Yes, if it has a USB or 5-pin MIDI output. In that case its keys send note and velocity data exactly like a dedicated controller — only the weighted action and size distinguish the two.

繼續練習

📲 加入主畫面
將 Play Virtual Instruments 加入主畫面,隨時快速開啟。
在 Chrome 中: 點選 ⋮ 選單 →「安裝應用程式」
在 Safari 中: 點選「分享」→「加入主畫面」
在 Edge 中: 點選 ⋯ →「應用程式」→「安裝」