Re: [linux-audio-dev] Good sample MIDI code

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Good sample MIDI code
From: rob (rob_AT_kaybee.org)
Date: to syys   17 1998 - 19:46:23 EDT


>
> Anybody out there got some good simple code for reading midi data from
> the OSS drivers? I have some hacked up stuff I wrote years ago ... but
> it didn't work right then and doesn't now.

        in my application i simply read the raw midi device. then you
just have to parse the bytes as they come in. for a note, the first byte
is the msg type, second (for note on) will be the note-number, and the
third is the velocity. note-offs are either seperate msgs or faked as
note-on's with a zero velocity.
        example code can be found out
        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 &lt to < as this
renderes improperly in my browser.
        www.harmony-central.com has a link with the midi spec docs you'll
need to read msgs.
        this is a short example which creates a loop in and echos it out
for a midi through.

        http://www.kaybee.org/~rob/loop.c

        if you need anything further drop a mail on the list.

                                rob

-- 
Rob Melby
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt4255a
Internet: rob_AT_kaybee.org, gt4255a_AT_prism.gatech.edu


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : ma maalis 13 2000 - 12:05:16 EST