🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Re : Midi Problem.

#25938
From: rgoodman
Date: Sat, 28 Mar 1987 05:44
42 lines
2924 bytes
In article <700@klipper.cs.vu.nl> tulp@cs.vu.nl (Tulp E) writes:
>In article <14085@cca.CCA.COM>, Keith Hedger writes:
>> I am trying to read data from the midi in port on the 520 ST and
>> am having a problem...
>Keith,  your problem *is* that you don't have enough real time  to 
>do much screen output. I learned it the hard way too (though I did 
>find  the  cause  in an hour or so).  What Ron  Goodman  has  been 
>writing  simply cannot be true since if you do a 'conin(3)'  (bios 

Perhaps there is a problem with too much screen I/O but this is not
the problem with the MIDI program described.  He said that he has
a while loop that says basically while status of MIDI is more data, continue
reading and printing.  Then he says his program ends prematurely.
Obviously his program ends because the program reads the status
of the MIDI port and gets a 0 (i.e. no data waiting).

Two things can cause this.  One, if the song spews out a lot of data too
fast and overflows the buffer, then some data will be lost.  Two, if the
computer tries to read data so fast that at some point when the buffer is
empty, his program checks status before the next MIDI byte is there.

  The sequencer sends
out data as it goes, so, if the song is still playing when the program
ends (certainly likely after only several lines have been printed unless
this is a very short sequence) it is obviously not because the sequencer
sent the data too fast and the ST lost some of it.  There is more data coming
while the sequencer is going and data would be printed until the song 
ended and for 128 bytes more.  This does not sound like what happened at
all, right?  Therefore it seems to me that he is reading data too fast.
I too have experienced this problem in a program I am writing.  This
is what was wrong.  It is certainly a problem to just read data until
no data is waiting in a MIDI environment.  This is not a file you are
reading from after all!  Things work a little differently.

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: <2139@cit-vax.Caltech.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!ll-xn!cit-vax!rgoodman
References: <686@atari.UUCP> <700@klipper.cs.vu.nl>

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!seismo!ll-xn!cit-vax!rgoodman
From: rgoodman@cit-vax.UUCP
Newsgroups: comp.sys.atari.st
Subject: Re: Re : Midi Problem.
Message-ID: <2139@cit-vax.Caltech.Edu>
Date: Sat, 28-Mar-87 00:44:17 EST
Article-I.D.: cit-vax.2139
Posted: Sat Mar 28 00:44:17 1987
Date-Received: Sat, 28-Mar-87 18:16:18 EST
References: <686@atari.UUCP> <700@klipper.cs.vu.nl>
Reply-To: rgoodman@cit-vax.UUCP (Ron Carl Goodman)
Organization: California Institute of Technology
Lines: 42