🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #26101

Re: reading midi input

#26101
From: rgoodman
Date: Tue, 07 Apr 1987 20:36
23 lines
1805 bytes
In article <14748@cca.CCA.COM> m204help@cca.CCA.COM (Keith Hedger) writes:
>Recently, I posted a note asking for help with reading the midi port inside a
>c program, written with the MEGAMAX C development system. 
>
>In the process, however, I did find out one thing.....the function that I
>am using to read the midi port (Bconin(3)) BLOCKS UNTIL a midi byte appears 
>at the port. I have tested this function by changing the address to that of the
>keyboard and it worked fine....as I said my program now works and uses this 
>function. 
>Keith

Using Bconin(3) is fine, and is in fact the correct way to read data.  It is
not, however, the correct way to test for end of data!  As you correctly point
out, it will wait until data appears . . . even if it never appears.  For 
testing that you must use Bconstat(3).  If you want a program to ever end
then it is not valid to simply do Bconin after Bconin.

Ron Goodman
-- 
rgoodman@cit-vax.caltech.edu    _______ _________ _________       |
rgoodman@cit-vax.bitnet        /           \#/       \#/          |   Pasadena
rgoodman@cit-vax.uucp         |alifornia    |nstitute |echnology  | California
                               \_______ ___/#\___ of  |           |   U. S. A.
Technical Details
Message-ID: <2264@cit-vax.Caltech.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-spam!ames!ll-xn!cit-vax!rgoodman
References: <14748@cca.CCA.COM>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-spam!ames!ll-xn!cit-vax!rgoodman
From: rgoodman@cit-vax.UUCP
Newsgroups: comp.sys.atari.st
Subject: Re: reading midi input
Message-ID: <2264@cit-vax.Caltech.Edu>
Date: Tue, 7-Apr-87 15:36:44 EST
Article-I.D.: cit-vax.2264
Posted: Tue Apr  7 15:36:44 1987
Date-Received: Fri, 10-Apr-87 06:11:35 EST
References: <14748@cca.CCA.COM>
Organization: California Institute of Technology
Lines: 23
Summary: Much MIDI Misunderstanding