Problem: One of the annoying things about my MIDI setup is
that I have to be running Cakewalk in order to get any sound out of my
keyboard at all (except for its unimpressive built-in sounds), even
when I'm not recording. This is because the MIDI Out of my keyboard is
plugged into my Sound Blaster's MIDI In, and the SB MIDI Out to my
sound module's MIDI In. Cakewalk is necessary to send MIDI events from
the SB MIDI In to Out. This makes spontaneous practice sessions somewhat
painful, especially since my 16-bit Cakewalk 3.0 slows my whole computer
down considerably.
This is because there's no "Through" port on the Sound Blaster, nor
any option to emulate this in software.
Solution: Software emulation of MIDI Passthrough. This 13k
program will run quietly and transmit standard MIDI events (not SysEx, though
this functionality could be added relatively easily) which it receives from
the chosen input device to the chosen output device. Easy.
Simply select the In device and the Out device. Close the program when
you're done playing (or need another program to use the MIDI devices). It
allows you to switch between devices on the fly without restarting.
In addition, to expedite automatic startup, you can specify device
indices on the command line. Changing the shortcut properties (mine
pictured):
The parameter I've given is 0=1 which means to take all
input from MIDI In device 0 and shoot it over to MIDI Out Device
1. When in the program, the devices are listed in order in the
listboxes, starting at 0.
Minimize the program and play away!
Program: This program runs under Windows 98. It surely works
fine under Win 95, and probably under Windows NT. I am not personally
interested in making it work for anyone other than myself, but you can
feel free to download the source code (below) and make it work under
any unsupported platforms.
Source Code: This is source code for Microsoft Visual C++
5.0. It was built with Developer Studio 97, and while it may compile
equally well with other setups, this is the only one I know it works
with.
You must, of course, use an unzipper which supports long file
names. You must also link in winmm.lib to your project, or it won't build.
I'd like to also point out that programming for windows is
extremely unpleasant.
Some of the code here is from a page called Low Level MIDI
API.
Computer Bits
|