Personal tools
You are here: Home documentation FAQ for Pd How do I make MIDI work?
Document Actions

How do I make MIDI work?

Up to Table of Contents

This FAQ applies to: Any version.

I want to receive MIDI data from my keyboard ... How do I do that?

Making Basic Connections

By default, Pure Data has 1 MIDI input and 1 MIDI output.

To connect to one of these ports, first plug in the MIDI device (or start your MIDI software). Next, start Pure Data and choose the device in the MIDI Settings dialog: Preferences->MIDI Settings...

You can test that MIDI I/O is working with the Test Audio and MIDI patch: Media->Test Audio and MIDI. Input and output channels are 1-16.

Note: You will have to restart PD in order to connect to new devices that were plugged in after it was last started.

Using Multiple Devices

If you want to connect multiple MIDI devices/streams to PD, you can enable the "use multiple devices" option in the MIDI Settings dialog which enables 4 inputs and 2 outputs.

With multiple input and output ports, the extra channels are accessed beyond the usual MIDI 1-16 channel numbering:

  • Port 1: 1-16
  • Port 2: 17-32
  • Port 3: 33-48
  • Port 4: 49-64

MIDI Routing

Another more useful option is to use Operating System specific MIDI mixing/routing software. This allows you to route external MIDI streams into PD as opposed to selecting them manually through the MIDI Settings dialog and most routing software also allows you to save connection settings.

Mac OS X

Use the Audio-MIDI in /Applications/Utilities to create virtual ports for Pure Data to use through the IAC Driver. Open the MIDI window and double click on the IAC Driver. Click on the little "+" icon below the Ports list and add two ports: "Pure Data In" and "Pure Data Out". Next, open PD and select "IAC Driver Pure Data In" for the input port and "IAC Driver Pure Data Out" for the output port.

Now that Pure Data has 2 virtual ports, you can route MIDI data from devices and other software into and out of Pure Data. To make connections, try the following software: MidiPatchBay or, if you're already using Jack OSX, Patchage.


As Pure Data uses ALSA MIDI, by default, it creates 2 virtual ports: 1 input and 1 output. You can then use tools which allow you to make connections between ALSA MIDI streams: aconnect, aconnectgui, and qjackctl (if you are using Jack). aconnect is a simple commandline program that comes with ALSA, aconnectgui provides a simple gui around aconnect, and qjackctl includes a nice visual routing system for ALSA MIDI.


The Windows MIDI implementation does not include virtual midi ports and you will need an "loopback" application that allows you to create them in order to route MIDI data between software. Currently, the options are MIDI-OX , LoopBe1 , Maple Virtual Midi Cable and loopMIDI.

by IOhannes last modified 2012-12-26 03:12 AM

Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser