mimo's MidiOut
type: Effect
version: 1, 0, 0, 1 (very beta)
author: mimo@restoel.net
home: restoel.net/mimo
why another MidiOut?
there are already some machines around which do the same better-but they
didnt work on my machine. I think this has to do with the fact that the
other one's use the m$win midimapper. this machine bypasses the midimapper
and it works for me.
usage
MidiOut comes together with MidiGen which is used as the midi generator
(yes!). Use MidiGen to generate MidiSignals and route it into MidiOut (=connect
it to MidiOut). ook up the device number in MidiOut's Midi-Info (right-button
menu) or set it through the buzz-double-click menu. In Midi-Info you will
see a list of all midi-devices that m$win found in your system, on the
left you'll see the number (for later use in MidiGen) followed by one of
these symbols:
| |
the output is in use by some other application-check view|preferences|midi
output and disable the device if you want to use it in MidiOut |
- |
the device is free and can be wired to MidiOut |
~ |
the device is wired to MidiOut and may be used by multiple tracks |
! |
the device is "bogus"-m$win couldnt query its capabilities (haven't
had this one yet) |
Edit the pattern in MidiGen - you will need to set a device and a channel
even if you selected one already in MidiOut - otherwise you want hear anything
(the device you set in MidiOut will override all other device selections
you make in MidiGen)
hints
-
if you dont know why a certain device is not available you can check m$win
debug output in Midi-Info Midi System Messages. The list updated whenever
a problem occurs - realtime error monitoring!
-
use one device per track. if you change the device within a track the last
note on the previous device will be muted-you might as well like this behavior.
-
use one channel per track. same effect as with devices applies to changing
the channel. I do kind of like this behaviour.
-
playing a different note on the same track will mute (turn off) the last
note played. if you want to play chords use multiple tracks and set them
to the same device and channel.
-
if you're a machine developer dont ever try to write documentation for
your machine
limitations
-
dont change the volume on the connection between MidiGen or MidiOut - otherwise
you'll see a lot of messages in Midi-Info. Leave it at maximum.
-
the delay button doesnt work yet (help! please!)
-
you may use several MidiOut machines at the same time, but you can only
access a certain MidiOut device with one of them. I'm hoping to solve this
in future versions but couldnt find out how to "communicate" with another
loaded instance of MidiOut in buzz. maybe someone can give me a hint in
this cause.
-
timing works for me. I'm using a seperate soundcard which does nothing
else but playing midi. if you use directx for waveout on the same card
you may get timing problems. there's no special timing mechanism being
used by MidiOut. It plays a note whenever a new buzz-tick arrives. I'll
probably have to solve this in a future version. On the other hand cpu
usage is very low with this technique. It rises when I use the directx
driver for waveout on the same soundcard but I prefer using the asio-driver
which gives lower latency and less cpu usage.
-
the number of tracks is limited to 32. If you need more tracks for any
reason whatsoever tell me.
-
the number of midi devices is limited to 32. I couldnt find a way to change
the machines parameter after initialisation of the machine. maybe someone
around knows a solution to the matter
-
at the time given, you can only use one MidiGen per MidiOut. Maybe I'll
change this in the future but I didnt really see a point in doing all that
work...
programming
yes, you can develop your own midi generators sendig data to a MidiOut.
Create a header file with the following content:
typedef enum {
c0_Nothing,
c0_FirstDevice = 128, //meaning not more than 120 devices possible
c0_LastPossibleValue=128+32
}ECommand0;
typedef enum {
c1_FirstChannel=0,
c1_LastChannel=15,
c1_NoChannel,
c1_OmniChannel,
c1_OpenDevice = 128,
c1_CloseDevice,
c1_LastPossibleValue
}ECommand1;
MidiOut accepts commands with this syntax send to its Work-method (MidiOut
is a mono-machine, the float * is converted to an unsigned char * ):
unsigned char ucDevice,ucChannel,ucMidiStatus,ucMidiData1,ucMidiData2; == 5 Bytes
ucDevice: ECommand0 (see above):128+device number
ucChannel:ECommand1(see above):channel(0-15),or Open/Close Device;
rest is not implemented yet
ucMidiStatus: Midi Status Byte: 0x8 for Note Off; 0x9 for Note
On, ...
ucMidiData1: Midi Data Byte 1 (eg .Note)
ucMidiData2: Midi Data Byte 2 (eg. Velocity)
(C) mimo@restoel.net. MidiOut is of course donationware on a voluntary
basis.