Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!ucbvax!EMRCAN.BITNET!FILLMORE From: FILLMORE@EMRCAN.BITNET Newsgroups: comp.sys.amiga Subject: Re: RS-232 & MIDI Interface Message-ID: <9009190233.AA23752@lilac.berkeley.edu> Date: 19 Sep 90 03:35:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 32 Yes, it is possible to process MIDI data from AmigaBasic. I did this a couple of years ago when I first got my Amiga. Of course you still need to buy a MIDI interface to translate between the MIDI and RS-232 electrical signals. The trick is to open the serial port at a legal baud rate and then switch to the MIDI baud rate (31250), as follows: OPEN "com1:9600,n,8,1" AS 1 adr1 = &HDFF adr2 = &H32 adr = adr2+adr1*4096 POKEW adr,(1000000!/(.2794*31250)) Then you can read and write using ordinary I/O statements, such as: IF LOC(1)<>0 THEN c$ = INPUT(1,1) END IF The variable c$ will contain a byte of MIDI data if there is any present. I wouldn't advise that you use this technique to play music because you don't have any control over timing. It works fine for dumping MIDI data or for loading/dumping system exclusive data (I wrote a little patch librarian in Basic). Good luck! ________________________ Bob Fillmore, Systems Software & Communications BITNET: FILLMORE@EMRCAN Computer Services Centre, BIX: bfillmore Energy, Mines, & Resources Canada Voice: (613) 992-2832 588 Booth St., Ottawa, Ontario, Canada K1A 0E4 FAX: (613) 996-2953