[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1553.0. "MIDI from Amiga BASIC " by ANT::JANZEN (Tom 296-5421 LMO2/O23) Thu Jul 21 1988 13:24

Last night I built the last adapter from MIDI socket to MIDI socket and
hooked it all up.  My oscilloscope was there to verify activity and baud rate.
Deluxe Music Construction Set does indeed play out the serial port all
by itself at what looks like the right rate (by measuring the duration of
the shortest visible mark, and taking that as a single bit).
My BASIC program, however can't do it at the right baud rate.  
I opened COM1:.  In BASIC, only baud rate <=19200 are allowed.
Omitting the baud rate only gets a syntax error (in violation of the
BASIC manual format of the com1: file name, so the manual is wrong).
Omitting everything following "COM1:" seems to default to about 300 baud.
recappng:
	1. OPEN "COM1:19200,1,N,8" AS #5 or something works but is the wrong
			buad rate
	2. OPEN "COM1:,1,N,8" AS #5 is not accepted by BASIc. If this had
		worked, then setting the baud from preferences would have
		been sufficient.
	3. OPEN "COM1:" seems to default to 300 baud.

So the upshot is that I could not send a program change to the spx90.
In addition, what worries me is that although Deluxe Music could
send data, the spx90 did not do a program change.  DMCS allows setting
a preset on a channel.  I had it omni or on channel 2 and addressed channel
2, and nothing.  The SPX also requires setting up the correspondance
between program numbers and memory places, but I left them 1 to 1, 2 to 2,
etc.  I also turned MIDI ON on the SPX90.  So that failed.  

Does anybody know a trick for getting the COM1: device to go at 31250 baud
from Amiga BASIC?
Tom Janzen Digital Equipment Corp 111 Locke Dr marlboro ma 01752
T.RTitleUserPersonal
Name
DateLines
1553.1Limitations of an InterpreterULTRA::KINDELBill Kindel @ BXB1Thu Jul 21 1988 14:265
    It may be that BASIC is restricted to baud rates <= 19.2k because it
    can't keep up at higher speeds.  BASIC interpreters execute a whole lot
    (think HUNDREDS) of machine instructions for each BASIC statement.
    Compiled BASIC (or any other language) would reduce this by at least an
    order of magnitude.
1553.2 what!no DE RE AMIGA ?MERIDN::ROSCETTIA horse that knows arithmeticFri Jul 22 1988 13:2348
		Swag...

 RE .0

 A couple of possibilities...

	1. instead of using COM1: use SER:  - according to the sparse
	   documentation SER: doesn't allow you to specify Baud rate
	   so I assume it uses whatever is in preferences. Since SER:
	   is technically a Printer device you may have to set up for
	   a serial printer.

	2. I don't have the documentation but is it possible to
	   Poke the baud rate into the Uart after the Open?
	   Uart is internal to the Paula chip.



 Re .1 

 I wouldn't think that Basic's Speed would be a direct limiting factor
on Baud rate. - the par/ser conversion is strictly a function of the uart

 Basic's speed will more likely affect throughput... ex can't send a stream
 of 32nd notes at temp >120. On the recieve side you might expect something
 on the order of data overruns. Does anyone know if the I/O is buffered
 in memory?    

 Perhaps COM1: only supports up 19.2 because that is the upper limit
 for "standard" term/modem type interfaces.



 I'm just beginning to realize how little documention I have. The two
books that came with the 500 don't begin to tell me what I need to know.


brien      
    
    PS. .0
    
>        Last night I built the last adapter from MIDI socket to MIDI socket and
> hooked it all up.
    
    does this mean you built your own MIDI interface ?
    
    
1553.3I've basicall given upANT::JANZENTom 296-5421 LMO2/O23Fri Jul 22 1988 13:348
    I just had to build the null modem cable and a midi plug to plug
    cable in order to hook it all up.
    This project was only for sysex dumps, which have not been well
    supported in commercial software.
    SER: was a disaster.  I could try it again.
    It's also possible to try to call library routines or use assembler,
    in terms of my resources, but could be difficult.
    TOm
1553.4what a messANT::JANZENTom 296-5421 LMO2/O23Sun Aug 14 1988 02:1511
    Hi
    I've been studying again.  I've been reading serial.i c include
    file about the serial.device, serial.device 
    and other things.  I think I could
    call the right system library routines to deal with midi from
    BASIC, but it's getting too complicated.
    I don't know c either, so it's hard to read sometimes.
    Please let me know if you have used any libraries from Amiga BASIC.
    Although I'm giving up again.  is DRAW routine faster for drawing
    lines than the BASIC linedrawing routine?
Tom
1553.5better late than never - sometimesMERIDN::ROSCETTISome things u never get used toTue Nov 15 1988 02:3920
    
    Tom,
    
    
     It's probably too late for what you wanted .. BUT...
    
     FF disk 101 ( available on TAPE::user1:[amiga]) has a set of
    Midi Library calls, useable from Basic, C, etc. The December
    Issue of Electronic musician describes it and give a sample 
    program in BASIC , of a CZ101 patch librarian, xfer of SYSEX data
    etc.
    
    
     Now you can hack up anything you want...
    
    
    brien
    
    Ps - they also get around to reviewing SYNTHIA in this issue
        
1553.6How to set Midi Baud rate from AmigaBASICFORTY2::TATHAMNick Tatham @REOTue Feb 07 1989 06:2139