Subject: Re: [linux-audio-dev] Good sample MIDI code
From: David J. Topper (topper_AT_virginia.edu)
Date: pe syys 18 1998 - 13:29:05 EDT
rob wrote:
>
> http://www.bright.net/~dlphilp/dp_devseq.html at least for midi
> out. midi in with the raw /dev/midi is the same but uses reads instead of
> writes. make sure you do a search and replace for < to < as this
> renderes improperly in my browser.
The switch to midiout is not so straightfoward. Mainly because one is
checking data instead of filling a buffer and sending it out. The
following:
void note_on(int chan, int num, int vel)
{
SEQ_MIDIOUT(DEVNUM,MD_NOTEON+chan); /* note that SEQ_MIDIOUT sends
the device number and one data byte */
SEQ_MIDIOUT(DEVNUM,num); /* note-number */
SEQ_MIDIOUT(DEVNUM,vel); /* velocity */
seqbuf_dump(); /* out they go... */
}
doesn't translate all that well into:
check_note_on()
and so forth.
See what I mean?
DT
-- Technical Director, Virginia Center for Computer Music Programmer / Analyst, Dean's Office (School of A&S) http://www.panix.com/~topper (804) 924-6887
This archive was generated by hypermail 2b28 : ma maalis 13 2000 - 12:05:16 EST