Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a virtual MIDI device

Tags:

port

midi

virtual

I have to write an application (like a step sequencer or arpeggiator) that sends MIDI note to a generic DAW , so I think that only way to implement such thing is to create a virtual MIDI device that should be recognised as a MIDI input/output interface by the OS.

I was wondering if this could be developed using Portmidi or if I need something more complicated.

OS X support is a must, Linux and Windows support is a nice to have.

like image 534
Kill KRT Avatar asked Dec 19 '15 20:12

Kill KRT


People also ask

What is a virtual MIDI?

Virtual MIDI Piano Keyboard is a MIDI events generator and receiver. It doesn't produce any sound by itself, but can be used to drive a MIDI synthesizer (either hardware or software, internal or external). You can use the computer's keyboard to play MIDI notes, and also the mouse.

How do I create a virtual MIDI port on a Mac?

Virtual MIDI on MacLaunch the "Audio MIDI Setup" application which you can find in the Applications > Utilities directory. Open the MIDI Studio Window. Double click the IAC Driver icon and enable the driver by checking the option "Device is online". Now you can add, remove and rename Ports to your preferences.


1 Answers

Portmidi's design is based on the Windows MIDI API, which does not allow applications to create virtual ports (without installing a separate driver).

On OS X, you can create a virtual port with MIDISourceCreate; on Linux, by creating a port with the (SUBS_)READ/WRITE flags.

If you want to use a portable library, try RtMidi, which supports virtual ports on all platforms that have them.

like image 103
CL. Avatar answered Oct 25 '22 17:10

CL.