[comp.sys.atari.st.tech] programming and MIDI

driesse@qucis.queensu.CA (Anthonie Driesse) (04/30/91)

Since there are GEMDOS functions to handle IO from the console, I assume
there are also some to deal with the MIDI port.

Could someone tell me which functions they are, what parameters they have,
and possibly give me a hint how to use them in personal Pascal?

Or is there a standard filename similar to "CON" that refers to the midi
port?

Just some background info:  I have a 520 ST with personal pascal version 1,
and all I really want to do is play around with MIDI a bit.

kingdon@pogo.gnu.ai.mit.edu (Jim Kingdon) (04/30/91)

In article <1885@qusunb.queensu.CA> driesse@qucis.queensu.CA (Anthonie Driesse) writes:
>Since there are GEMDOS functions to handle IO from the console, I assume
>there are also some to deal with the MIDI port.
>
>Could someone tell me which functions they are, what parameters they have,
>and possibly give me a hint how to use them in personal Pascal?
>
Try the Bcon*() functions.  (Bconin,Bconout,Bconstat,Bcostat).
function Bconin(handle:integer):char; (*read a character*)
procedure Bconout(handle:integer;ch:char); (*write a character*)
function Bconstat(handle:integer):boolean; (*checks input status*)
function Bcostat(handle:integer):boolean; (*checks output status*)

... those should be defined in whatever BIOS bindings Personal Pascal
uses.

To output a character, "Bconout(4,ch);" where 4 (i THINK) is the
handle to the MIDI port.  If not that, it's three.  (bad memory with
numbers and whatnot =:^) )

Or to read one coming in, "ch:=Bconin(4);" should do ya.

... unfortunately, there isn't really any GEMDOS support for MIDI,
although i remember once reading about a standard handle "MID:".  Not
very good, since you can't check for the existence of input data
without sitting and hanging the system until there is a byte received.
There's also a function in the XBIOS called
Midiws(count:integer;s:string); i believe it is, where count is the
number of characters of string to send, minus one.



======================================================================
|| Jon Pickard || INet: jpickar@caticsuf.csufresno.edu ||   | | |   ||
||=============||======================================||   | | |   ||
||A god?  Nahh.|| Jeanluc Picard@Isca BBS ||smile! Your||  /  |  \  ||
||=============|| Jeanluc@MARS Hotel      ||jaw's wired|| /   |   \ ||
||My opinions do not necessarily represent||shut!      ||ST all the ||
||those of the sites from which i post.   ||   :^#     ||way, bradda||
======================================================================

dc@presto.ruhr.de (David Channing) (05/03/91)

In article <15423@life.ai.mit.edu> kingdon@pogo.gnu.ai.mit.edu (Jim Kingdon) writes:
> 
> ... unfortunately, there isn't really any GEMDOS support for MIDI,
> although i remember once reading about a standard handle "MID:".  Not
> very good, since you can't check for the existence of input data
> without sitting and hanging the system until there is a byte received.

You can check for the existence of Midi input data with Bconstat(3).
--
dc@presto.ruhr.sub.org
dc@presto.ruhr.de