| Hello everybody,
In my site are now avalaible the sources for implementing MIDI OUT in
platforms other than Win95. Only the low level C function need to be
rewrited. If you want to implement MIDI OUT in your platform, you must
override only the following functions:
void note_on(int chan, int num, int vel);
void note_off(int chan, int num, int vel);
void control_change(int chan, int num, int value);
void after_touch(int chan, int value);
void program_change(int chan, int num);
void pitch_bend(int chan, int lsb, int msb);
void poly_after_touch(int chan, int note_num, int value);
These function should directly interact with your O.S. or hardware, if
possible. The purpose of these function is quite obvious: they send to
MIDI OUT port the corresponding messages. So these function are the
software interface with MIDI OUT port.
All MIDI OUT opcodes have not a k or a-rate return value in Csound orc,
because their output is implicitly sent to MIDI OUT port.
Together with midi OUT sources there are MIDI IN opcodes and four
opcodes non directly related to MIDI:
xtratim iextradur
extends current note duration of iextradur seconds
kflag release
outputs current note state
xtratim opcode exetends current MIDI-activated note duration of
iextradur seconds after the corresponding note-off message has
deactivated current note itself. This opcode has no output arguments.
release opcode outputs current note state. If current note is in the
release stage (i.e. if its duration has been exetended with xtratim
opcode and if it has only just deactivated), kflag output argument is
set to 1, else (in sustain stage of current note) is set to 0.
These two opcodes are very useful for and for implementing complex
release-oriented envelopes.
idest iwrap isig, ilow, ihigh
wraps around signal that exceeds low and high thresholds. Works at
i-rate
kdest wrap ksig, klow, khigh
some as above, but at k-rate
adest wrap asig, klow, khigh
some as above, but at a-rate
idest imirror isig, ilow, ihigh
"reflects" the signal that exceeds low and high thresholds. Works at
i-rate
kdest mirror ksig, klow, khigh
some as above, but at k-rate
adest mirror asig, klow, khigh
some as above, but at a-rate
These opcodes are useful for "modeling" signals.
The meaning of the parameters is:
xdest = output signal
xsig = input ignal
xlow = low threshold
xhigh = high threshold
Download them at the url at the same url of Win95 Realtime MIDI csound
version, i.e. :
http://www.agora.stm.it/G.Maldonado/download.htm
Bye and happy csounding :)
--
Gabriel Maldonado
mailto:g.maldonado@agora.stm.it
http://www.agora.stm.it/G.Maldonado/home2.htm
|