Keywords: Mac OS X MacOS X MacOSX
          CoreMIDI
          Virtual Endpoint
          Virtual MIDI Source
          Virtual MIDI Endpoint
          Virtual MIDI Source Endpoint
          Sample Code Source Code Sourcecode
          Reason Reason 2.0 Reason 2.5 Propellerheads

2003.08.16 Turns out that it's exceedingly easy to write a little
command line application that sends MIDI to Reason 2.5 (or, presumably,
other software synthesizers).

The program below publishes a virtual MIDI source named "dumb"
that shows up in Reason's preferences for both basic MIDI input
and advanced MIDI Setup. Then it sends random notes at random
velocities on all 16 channels.

There's no quit; just control-C out of it on the command line.

I built and ran on Mac OS X 10.2, with the dev tools from uhh april 2003 I think.

dumb_virtual_source.cpp

Build the program using:

    gcc dumb_virtual_source.cpp \
            -framework CoreMIDI \
            -framework CoreServices \
            -l stdc++

Here's a dumb Reason 2.0 setup that works well
if you assign MIDI Bus A to the dumb virtual MIDI endpoint.
(Has most of the 16 channels assigned to different-sounding
Subtractor synths and NN-XT's and such.)

correspondence to: poly@omino.com, subject line must start with "midi".

 -- dvb

----------------------------------------------------
OK. Here's your first exercise. Take the above program,
and modify it so that it also sends out random
MIDI controller messages.

If you hook it up to a Reason setup like
this, with a bunch of Subtractor synths, it'll just keep spinning
on random parameter changes.

Kind of interesting!
----------------------------------------------------