Xref: utzoo comp.sys.mac.programmer:19476 comp.music:2222 Newsgroups: comp.sys.mac.programmer,comp.music Path: utzoo!utgpu!watserv1!maytag!watdragon!trillium!hmloo From: hmloo@trillium.uwaterloo.ca () Subject: setting serial port's baud rate for midi Message-ID: <1990Dec3.034829.11333@watdragon.waterloo.edu> Keywords: midi baud mac serial Sender: daemon@watdragon.waterloo.edu (Owner of Many System Processes) Organization: University of Waterloo Date: Mon, 3 Dec 90 03:48:29 GMT Lines: 25 According to midi specifications, the baud rate the serial port should be set to is 31.25kbaud. How is this accomplished on the Mac? Using the serial driver there are predefined ones which include 1200, 2400, 9600, 52700, but nothing near 31250. Using the advance calls and the control function from the device driver you can specify any integer baud rate and it should set it to the closest possible value. However, the control function doesn't seem to be setting the right baud rate all. My question is, does anyone have any good solution to this? Hopefully a fix or pointing out what I'm going wrong. Also is there a function that returns the value the serial port is currently set at? Here's how the code looks like: (it's in Think pascal, this is not an exact buffer) { port is all initiated and set, just a matter to setting the baud rate to 31250, baudrate and i are both integers} baudrate := 31250; i:= control(-6, 13, pointer(ord(@baudrate)+1)); i:= control(-7, 13, pointer(ord(@baudrate)+1)); writeln(i, baudrate); { the output is no error an baudrate of 31250, but the port still isn't set to 31250} hmloo@trillium.waterloo.edu Brought to you by Super Global Mega Corp .com