Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!pyrnj!mirror!cca!m204help From: m204help@cca.CCA.COM (Keith Hedger) Newsgroups: comp.sys.atari.st Subject: reading from the midi port Message-ID: <14085@cca.CCA.COM> Date: Wed, 18-Mar-87 11:30:10 EST Article-I.D.: cca.14085 Posted: Wed Mar 18 11:30:10 1987 Date-Received: Sat, 21-Mar-87 04:19:27 EST Organization: Computer Corp. of America, Cambridge, MA Lines: 28 I am trying to read data from the midi in port on the 520 ST and am having a problem. My program is written in MEGAMAX C and basically grabs midi data a byte at a time and stuffs it into an array...when the array reaches a length of 78 it is displayed on the screen and a new string starts getting written. My problem is that I hook up a sequencer to my ST and start it putting out midi data and start running my program. My program always displays 4 or 5 lines of midi data then exits the program. (In other words the sequencer is still running). If I stop the sequencer and run the program again, it typically puts out another 4 or 5 lines of midi data then stops. I run it again and the port is clear. My program is basically built with a big 'while' loop which says 'while data is at the midi in port do blah blah blah'. I have seen some messages from the 'bix' section of Byte where people were saying that they had had the same kind of problem, and that the buffer that handles incoming midi data is too small....they allocated their own buffer large enough to handle the data. My question is: If the buffer is filling, why would having my program read from it and stuff the data into a bigger buffer, work any better than reading data from it and putting it into strings to be output ? Is putting the data in strings to be output that much slower than moving the data into an internal buffer ???? I would appreciate any suggestions any of you MIDI hackers out there can give me. thanx, keith hedger '