[comp.music] Rs-232 to MIDI

troy@fornax.UUCP (Troy Brooks) (05/11/91)

Hi!
This is my first posting, so let me know if I'm doing something wrong.
I'm trying to find an RS-232 to MIDI interface to connect to the 
Silicon Graphics Personal Iris workstations here in the graphics
research lab. Ultimately we want to be able to play back MIDI
sequences from within our animation software. The IBM interfaces
(MPU - 401 ?) don't use RS-232 because the baud rate is too slow on
PCs. (9600 baud). So, if I can't find one, I'll have to build one,
which isn't too hard, just a time-conusming drag. Has anyone heard
of such a thing? Has anyone else tried to find one? Would anyone
else want one if they could find one?
I check this group regularly, so post answers here, if you think
someone else might be interested, or try e-mail to:
troy@cs.sfu.ca
Thanks!

pirk@dev0d.mdcbbs.com (05/14/91)

In article <2679@fornax.UUCP>, troy@fornax.UUCP (Troy Brooks) writes:
> Hi!
> This is my first posting, so let me know if I'm doing something wrong.
> I'm trying to find an RS-232 to MIDI interface to connect to the 
> Silicon Graphics Personal Iris workstations here in the graphics
> research lab. Ultimately we want to be able to play back MIDI
> sequences from within our animation software. The IBM interfaces
> (MPU - 401 ?) don't use RS-232 because the baud rate is too slow on
> PCs. (9600 baud). So, if I can't find one, I'll have to build one,
> which isn't too hard, just a time-conusming drag. Has anyone heard
> of such a thing? Has anyone else tried to find one? Would anyone
> else want one if they could find one?
> I check this group regularly, so post answers here, if you think
> someone else might be interested, or try e-mail to:
> troy@cs.sfu.ca
> Thanks!
> 
> 
-- 
 
.Steve Pirk.......midit.....Voice: (714) 952-5516.........................
..McDonnell Douglas M&E..Internet: pirk@dev0d.mdcbbs.com..................
...5701 Katella Ave..........UUCP: uunet!mdcbbs!dev0d.mdcbbs!pirk.........
....Cypress, CA. 90630........PSI: PSI%31060099980019::DEV0D::PIRK........
--------------------------------------------------------------------------
"The opinions expressed herein, are probably not those of MDC, and I'm not
 sure if I can even call them mine......." 
 

Frank2.Simon@arbi.informatik.uni-oldenburg.de (Frank 'Biber' Simon) (05/14/91)

troy@fornax.UUCP (Troy Brooks) writes:

>I'm trying to find an RS-232 to MIDI interface to connect to the 
>..
>(MPU - 401 ?) don't use RS-232 because the baud rate is too slow on
>PCs. (9600 baud). So, if I can't find one, I'll have to build one,
>...

It isn't possible to build a RS-232 to MIDI-Interface, because
the baud rate is too slow (it's up to 19 200 Baud). The only way
is to specify the RS-232-Interface. The only different between
RS-232 Interface and MIDI is the very high baud rate (31.250 Baud)
and the optical split to disconnect the Keyboard of the Computer.

So there are only two things to do:

1) A new Quartz to get the 31.250 Baud
2) Optodisconnectors to make two circuits.

To 1)
In the RS-232 Interface there is a UART 8250 doing his job.
He has got some frequency-divider in it. 31.250 Baud is for
example to get with a quartz of 4 Mhz and a divide rate of
128 (because 4 M/128=31250).

To 2)
In the MIDI-Specifikation is written to use Optodisconnectors.
Because of the high baud-rate you can't take every one, but
there are some working with this rate.

In the german journal C't (computer-Technik) of Januar this Year
there's written a articel to build a MIDI-Interface of a RS-232.
The C't suggest to build a luxury MIDI-Interface which can be
switched (via software) between MIDI and RS-232 mode).
The electric-parts you need aren't very expensive. It isn't also
hard to build this Interface.

For more details mail me
-- 
FRONT242FRONT242FRONT242FRONT242FRONT242FRONT242FRONT242FRONT242FRONT242FRONT
    E-MAIL-ADDRESS:      ~       I am       ~      MAIL-ADRESS:
    Frank2.Simon@arbi.   ~       because    ~      Frank Simon
    informatik.uni-      ~       somebody   ~      Alexanderstr. 156
    oldenburg.de         ~       dreams me  ~      2900 Oldenburg

pirk@dev0d.mdcbbs.com (05/14/91)

** Excuse the double post, but it seems that the edit buffer did not include
   any changes to the previous followup.

In article <2679@fornax.UUCP>, troy@fornax.UUCP (Troy Brooks) writes:
> I'm trying to find an RS-232 to MIDI interface to connect to the 
> Silicon Graphics Personal Iris workstations here in the graphics
> research lab. Ultimately we want to be able to play back MIDI
> sequences from within our animation software. The IBM interfaces
> (MPU - 401 ?) don't use RS-232 because the baud rate is too slow on
> PCs. (9600 baud). So, if I can't find one, I'll have to build one,

	The conversion you mention consists of baud rate and hardware
differences.  The baud rate for midi is not one of the normal rs-232
"standards" (I believe it is around 39Kbaud) and the electrical connections 
are isolated using opto couplers on the input.  
	Look into some back issues of Electronic Musician and you will find 
article about the design of the "correct"  or new and improved midi volume
fader project (feb. or march '91).  This project uses an Intel 8031 micro to
act as a midi data stream traffic cop with lots of room for expansion.  
One possible application would be to read the midi data stream and shove all 
the incoming data into the Iris via a parallel port if it is bidirectional
(or serial if not worried about throughput).  
	If you want serial, have the 8031 convert the data to 38.4Kbaud and 
keep your fingers crossed.  BTW, if you can use the parallel port, all outgoing 
data is treated as memory read/writes and placed in the 8031's serial buffer 
for automatic transmission.
	Also, check with Black Box Corp., they would be able to do it, but will
cost a few bucks....

Steve
-- 
 
.Steve Pirk.......midit.....Voice: (714) 952-5516.........................
..McDonnell Douglas M&E..Internet: pirk@dev0d.mdcbbs.com..................
...5701 Katella Ave..........UUCP: uunet!mdcbbs!dev0d.mdcbbs!pirk.........
....Cypress, CA. 90630........PSI: PSI%31060099980019::DEV0D::PIRK........
--------------------------------------------------------------------------
"The opinions expressed herein, are probably not those of MDC, and I'm not
 sure if I can even call them mine......." 
 
-- 
 
.Steve Pirk.......midit.....Voice: (714) 952-5516.........................
..McDonnell Douglas M&E..Internet: pirk@dev0d.mdcbbs.com..................
...5701 Katella Ave..........UUCP: uunet!mdcbbs!dev0d.mdcbbs!pirk.........
....Cypress, CA. 90630........PSI: PSI%31060099980019::DEV0D::PIRK........
--------------------------------------------------------------------------
"The opinions expressed herein, are probably not those of MDC, and I'm not
 sure if I can even call them mine......." 
 

ogata@leviathan.cs.umd.edu (Jefferson Ogata) (05/15/91)

A few people seem to be under the impression that midi baud rate is
a major problem for RS-232 interfaces to match. I might mention that
the clock sources for serial ports in most modern machines are
programmable counter/timers that can be programmed right from the
cpu. The high frequency source is likely to be some standard clock
frequency (e.g. 16 MHz), and the counter/timer just divides it down
to 9600 baud or whatever. I think it's pretty common now that you
can just change the divider modulus to set just about any baud rate
you like, including 31.25 kbaud, the midi baud rate.

--
Jefferson Ogata     University of Maryland      Computer Science Department
"Animals without backbones hid from each other or fell down. Clamasaurs and
 oysterettes appeared as appetizers. Then came the sponges, which sucked up
                     about ten percent of all life."

smb@data.com (Steven M. Boker) (05/15/91)

>In article <2679@fornax.UUCP>, troy@fornax.UUCP (Troy Brooks) writes:
>> I'm trying to find an RS-232 to MIDI interface to connect to the 
>> Silicon Graphics Personal Iris workstations here in the graphics
>> research lab. Ultimately we want to be able to play back MIDI
>> sequences from within our animation software. The IBM interfaces
>> (MPU - 401 ?) don't use RS-232 because the baud rate is too slow on
>> PCs. (9600 baud). So, if I can't find one, I'll have to build one,
>

If all you want is to play back midi from your Iris RS-232 port, Apple 
makes a cheap (~$80) unit that works.  I have one connected to my
NeXT right now.  Not everyone is limited by the IBM uarts.  There are
several other manufacturers that have mac compatible units.  Your
main problem will reduce to finding or manufacturing the correct cable.

Steve


-- 
 #====#====#====#====#====#====#====#====#====#====#====#====#====#====#====#
 #  Steve Boker           #             "Two's bifurcation                  #
 #  smb@data.com          #             but three's chaotic"                #
 #====#====#====#====#====#====#====#====#====#====#====#====#====#====#====#

dcousins@bbn.com (Dave Cousins) (05/16/91)

I found an RS-232 to midi interface made by a company called KEY
Electronics.  1-800-533-MIDI. Their MSRP was 120$, but I called around
and found a price for 99$. I'm not buying one yet, because I'm
checking out the suppport of various software vendors.

In a related note-- anyone have one of these things? Pros? Cons?

Dave Cousins

tim@cns.SanDiego.NCR.COM (Tim Lowery) (05/16/91)

In <biber.674227837@faramir> Frank2.Simon@arbi.informatik.uni-oldenburg.de (Frank 'Biber' Simon) writes:

>troy@fornax.UUCP (Troy Brooks) writes:

>>I'm trying to find an RS-232 to MIDI interface to connect to the 
>>..
>>(MPU - 401 ?) don't use RS-232 because the baud rate is too slow on
>>PCs. (9600 baud). So, if I can't find one, I'll have to build one,
>>...

>It isn't possible to build a RS-232 to MIDI-Interface, because

This is pretty interesting in light of the fact that there is a company
in Texas, called Kee, which manufactures just such an interface.  Check
out the March 12, 1991 issue of PC Magazine for a description of MIDI
and how to connect MIDI devices to a PC (compatible).  If you want the
address of Kee, send me email; I think I have it lying around somewhere.

Tim
--
tim.lowery@SanDiego.NCR.COM

markb@tplrd.tpl.oz.au (Mark Bower) (05/16/91)

In article <biber.674227837@faramir> Frank2.Simon@arbi.informatik.uni-oldenburg.de (Frank 'Biber' Simon) writes:
>troy@fornax.UUCP (Troy Brooks) writes:
>
>>I'm trying to find an RS-232 to MIDI interface to connect to the 
>>..
>>(MPU - 401 ?) don't use RS-232 because the baud rate is too slow on
>>PCs. (9600 baud). So, if I can't find one, I'll have to build one,
>>...
>
>It isn't possible to build a RS-232 to MIDI-Interface, because
>the baud rate is too slow (it's up to 19 200 Baud). The only way
>is to specify the RS-232-Interface. The only different between
>RS-232 Interface and MIDI is the very high baud rate (31.250 Baud)
>and the optical split to disconnect the Keyboard of the Computer.

You can use a baud rate convertor - i've seen an RS-232 to midi convertor
box that stores RS-232 output (e.g. any baud rate from 9600 to 19.2 K bps
- use it on your ancient CP/M machine - if you can program it!) 
convert the RS-232 levels to TTL and then buffers them with a MIDI
standard approved optocoupler for connection to MIDI devices.

the name of the firm that makes this box

>
>So there are only two things to do:
>
>1) A new Quartz to get the 31.250 Baud
>2) Optodisconnectors to make two circuits.
>
>To 1)
>In the RS-232 Interface there is a UART 8250 doing his job.
>He has got some frequency-divider in it. 31.250 Baud is for
>example to get with a quartz of 4 Mhz and a divide rate of
>128 (because 4 M/128=31250).

Not all RS-232 ports use the 8250 - that's PC (mostly) specific - also, 
most RS-232 cards in PC's use 8250 UARTS that have a maximum
driver clock rate of 2 Mhz - so be aware of this if you are
doing it. (You just use a different baud rate divisor value) 

>
>To 2)
>In the MIDI-Specifikation is written to use Optodisconnectors.
>Because of the high baud-rate you can't take every one, but
>there are some working with this rate.
>
>In the german journal C't (computer-Technik) of Januar this Year
>there's written a articel to build a MIDI-Interface of a RS-232.
>The C't suggest to build a luxury MIDI-Interface which can be
>switched (via software) between MIDI and RS-232 mode).
>The electric-parts you need aren't very expensive. It isn't also
>hard to build this Interface.
>
>For more details mail me
>-- 
>FRONT242FRONT242FRONT242FRONT242FRONT242FRONT242FRONT242FRONT242FRONT242FRONT

^^^^^^ Good tast in music.


Hope this info helps someone

Cheers,

Mark 
							      /\
------------------------------------------------------------|/  \  /-----------
Mark F. Bower.  (markb@tplrd.tpl.oz.au) |                        \/
Telectronics Pacing Systems             | "beep blop beep woop"
R & D                                   |    - any techno song at the moment 
7 Sirius Rd.                            |
Lane Cove 2066                          |
-------------------------------------------------------------------------------

tjt@cbnewsh.att.com (timothy.j.thompson) (05/16/91)

From article <34503@mimsy.umd.edu>, by ogata@leviathan.cs.umd.edu (Jefferson Ogata):
> to 9600 baud or whatever. I think it's pretty common now that you
> can just change the divider modulus to set just about any baud rate
> you like, including 31.25 kbaud, the midi baud rate.

It is becoming more common - it might be interesting to find out
exactly how common it is on UNIX machines, since knowing that fact
may allow you to get a cheaper MIDI interface (ie. the Key Electronics
MS-103 rather than the MS-112).  Just to get it started,
I know the Sparcstation and the NeXT can do it.  The Mac and Amiga, too,
of course, although I don't know how difficult it is to do it from
within their versions of UNIX.  How about other machines?
If you know that a particular machine can run its serial ports
at MIDI rates, let's hear about it.     ...Tim...

psl@segue.segue.com (Peter Langston) (05/19/91)

From article <34503@mimsy.umd.edu>, by ogata@leviathan.cs.umd.edu (Jefferson Ogata):
> to 9600 baud or whatever. I think it's pretty common now that you
> can just change the divider modulus to set just about any baud rate
> you like, including 31.25 kbaud, the midi baud rate.


It's trivial to set the baud rate to an acceptable value (specifically
30.7 Kbaud, which is 1.7% slow, but works just fine) on any workstation
that uses the Zilog 8530 serial communications controller chip as its UART
(it seems that most do these days).  I wrote a paper on this very subject -
"Getting MIDI From A Sun" - while I was at Bellcore.  It should be available
from them as Technical Memorandum #TM-ARH-016282.  It also describes the
construction of a $10 homebrew hardware interface to convert RS232 to MIDI.

Peter Langston

p.s.
I dodn't know how to request copies of Tech. Memos, I would just try calling
the main number, (201) 829-2000, and ask... (I would do it now, but it's
1:22 a.m. on Sunday there now.)