[comp.protocols.tcp-ip] TCP/IP on MIDI?

henry@utzoo.uucp (Henry Spencer) (05/04/89)

Has anyone ever played with the idea of doing TCP/IP over MIDI lines?
(MIDI, for those unfamiliar with it, is a 31250 bps asynchronous current-
loop ring network meant for computer control of music hardware; it's a
standard feature on some prominent non-IBM personal computers like the
Atari ST.)  SLIP and friends should be directly applicable.

(Speaking of which, is there any new word on "son of SLIP", or are we
all going to be doomed to using various incompatible hacked-up extensions?)
-- 
Mars in 1980s:  USSR, 2 tries, |     Henry Spencer at U of Toronto Zoology
2 failures; USA, 0 tries.      | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

peter@ficc.uu.net (Peter da Silva) (05/04/89)

In article <1989May3.180345.6936@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
> Has anyone ever played with the idea of doing TCP/IP over MIDI lines?

MIDI is one-way... there's no return path for acks. Why not just leave the
MIDI adapter out of the loop and run the baud rate up on your RS232 SLIP?

(one reason a fast serial port that can be trivially adapted to MIDI levels
is more useful than a dedicated MIDI port.)
-- 
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.

Business: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180.
Personal: ...!texbell!sugar!peter, peter@sugar.hackercorp.com.

ron@ron.rutgers.edu (Ron Natalie) (05/05/89)

The IETF Point-to-Point working group has pretty much finished
the protocol.  The RFC was just circulating around the members
for final editorial changes.  It should be publically dissemenated
soon.

I guess I'm not letting too much out of the bag in saying that
it is essentially HDLC framing (using the Addendum 1 Async
stuff for async lines).  It is designed to be used for all
serial point-to-point lines thus replacing slip and higher
speed sync line protocols.  There is a protocol byte (extendable
to two bytes) for demuxing on protocol.  Most of the document
deals with the line initialization stuff like how you decide
on IP addersses between the two side etc...

-Ron

You're not serious about IP over MIDI are you.  It's major drawback
is that MIDI is UNIDIRECTIONAL!  While IP can be done that way, it
makes TCP a little interesting.

rcoltun@TRANTOR.UMD.EDU (Rob Coltun) (05/05/89)

> Has anyone ever played with the idea of doing TCP/IP over MIDI lines?

>> MIDI is one-way... 

This is so but from a composition/performance point of view, an N-way 
real-time international performance or jam session (via a higher layer protocol 
that used MIDI) is quite an interesting idea.

---rob

henry@utzoo.uucp (Henry Spencer) (05/05/89)

In article <May.4.18.53.01.1989.1967@ron.rutgers.edu> ron@ron.rutgers.edu (Ron Natalie) writes:
>You're not serious about IP over MIDI are you.  It's major drawback
>is that MIDI is UNIDIRECTIONAL! ...

So are most ring networks, at the wiring level.  Same solution:  tie the
end back to the beginning.
-- 
Mars in 1980s:  USSR, 2 tries, |     Henry Spencer at U of Toronto Zoology
2 failures; USA, 0 tries.      | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

kwe@bu-cs.BU.EDU (kwe@bu-it.bu.edu (Kent W. England)) (05/06/89)

In article <May.4.18.53.01.1989.1967@ron.rutgers.edu> 
 ron@ron.rutgers.edu (Ron Natalie) writes:
>
>You're not serious about IP over MIDI are you.  It's major drawback
>is that MIDI is UNIDIRECTIONAL!  While IP can be done that way, it
>makes TCP a little interesting.

	All you have to do is explain simplex links to your router.
This isn't so hard.  I have talked to your favorite router vendor
about adding this capability to their product.

henry@utzoo.uucp (Henry Spencer) (05/07/89)

In article <4076@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>MIDI is one-way... there's no return path for acks. Why not just leave the
>MIDI adapter out of the loop and run the baud rate up on your RS232 SLIP?
>(one reason a fast serial port that can be trivially adapted to MIDI levels
>is more useful than a dedicated MIDI port.)

The one-way issue is solved by forming a ring.  (Although the once-around
delay on the ring will be substantial, which is one reason why I asked if
anyone had tried it yet -- most ring networks I know of run at rather higher
speeds.)

As for RS232, a fully-RS232C-conforming driver cannot in fact run much
faster than 20 kbps (vs. MIDI's 31250) reliably.  Read the fine print about
slew rate.  Older driver chips often don't limit the slew rate properly
and can be pushed to higher rates under good conditions, but newer chips
(like the MAX232) follow the standard.  With short cables and a favorable
phase of the moon they'll sometimes run at 38400, but that's about it.  To
get reliable serial transmission at speeds much higher than MIDI, you need
to abandon RS232 anyway.
-- 
Mars in 1980s:  USSR, 2 tries, |     Henry Spencer at U of Toronto Zoology
2 failures; USA, 0 tries.      | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

BRUCE@UMDD.UMD.EDU (Bruce Crabill) (05/07/89)

You can't put MIDI into a ring, all your synthesizers would have a fit.
Yo Ron!  Are you done with my MPU-401 yet?  Time to work on a IBM channel to
MIDI interface...

                                       Bruce

phil@BRL.MIL (Phil Dykstra) (05/08/89)

The aid in experimentation of TCP/IP over MIDI, I point out that it
is trivial to turn a Sun 3/50 into a MIDI controller.  It turns out
that the serial port controller can be set "close enough" to the
MIDI speed.  ADB your kernel and look at:

	zs_speed+1e?d

This is the EXTB speed.  By default the divisor will be 3 (for 38400).
If you change it to 2, you will get 30720 which is only 1.7% shy of
the desired 31250.  Poke it or change you sources if you've got them
(devsun/zs_async.c).

Then with half a dozen parts, and some simple software you can be
reading/writing MIDI (we did exactly this here).  The biggest weakness
of a Sun as a MIDI controller is the default HZ resolution of 50 Hz.
It is noticeably rough to the ear.

I guess one would have to send IP packets in MIDI System Exclusive
messages.  Anyone thought about ARP yet to map IP addrs to MIDI ports? :-)

- Phil
phil@brl.mil
uunet!brl!phil

ps: My apologies for keeping this discussion going.

peter@ficc.uu.net (Peter da Silva) (05/08/89)

In article <1989May6.213417.20756@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
> As for RS232, a fully-RS232C-conforming driver cannot in fact run much
> faster than 20 kbps (vs. MIDI's 31250) reliably.  Read the fine print about
> slew rate.

OK, RS-232 style EIA. Something-that-looks-like-RS232 that puts data on pins
2 and 3 of a DB-25. Let's not get too picky about details.

> With short cables and a favorable
> phase of the moon they'll sometimes run at 38400, but that's about it.

The 262000-baud maximum on the Amiga serial port must be an illusion, then.
-- 
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.

Business: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180.
Personal: ...!texbell!sugar!peter, peter@sugar.hackercorp.com.

henry@utzoo.uucp (Henry Spencer) (05/10/89)

In article <4106@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>> As for RS232, a fully-RS232C-conforming driver cannot in fact run much
>> faster than 20 kbps ... reliably...
>
>OK, RS-232 style EIA. Something-that-looks-like-RS232 that puts data on pins
>2 and 3 of a DB-25. Let's not get too picky about details.

RS423 isn't bad, and is good for higher speeds, but still not blazing.  To
get really high speeds you have to abandon RS232 compatibility completely.
(Even RS423 causes trouble at times, because it is compatible with things
that strictly conform to RS232 but is not compatible with every weird
aberration that sort of worked with RS232.)

>> With short cables and a favorable
>> phase of the moon they'll sometimes run at 38400, but that's about it.
>
>The 262000-baud maximum on the Amiga serial port must be an illusion, then.

No, it's the result of not conforming to the standards, pure and simple.
What is gained is speed; what is lost is reliability and interoperability.
-- 
Mars in 1980s:  USSR, 2 tries, |     Henry Spencer at U of Toronto Zoology
2 failures; USA, 0 tries.      | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

peter@ficc.uu.net (Peter da Silva) (05/10/89)

In article <1989May9.184646.2106@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
> >The 262000-baud maximum on the Amiga serial port must be an illusion, then.

> No, it's the result of not conforming to the standards, pure and simple.
> What is gained is speed; what is lost is reliability and interoperability.

It certainly seems reliable and it interoperates quite happily with RS232 at
RS232 speeds, and with MIDI at MIDI speeds.

The wonderful thing about RS232 is all the subsets :->.

Do you have data to back up this claim about reliability and interoperability,
or do you just have a problem with the Amiga?
-- 
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.

Business: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180.
Personal: ...!texbell!sugar!peter, peter@sugar.hackercorp.com.

henry@utzoo.uucp (Henry Spencer) (05/11/89)

In article <4135@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>> No, it's the result of not conforming to the standards, pure and simple.
>> What is gained is speed; what is lost is reliability and interoperability.
>
>It certainly seems reliable and it interoperates quite happily with RS232 at
>RS232 speeds, and with MIDI at MIDI speeds...
>Do you have data to back up this claim about reliability and interoperability,
>or do you just have a problem with the Amiga?

I don't have anything in particular against the Amiga; I do have a serious
dislike for people who violate standards simply because they think they can
improve on them.  What matters is not whether it usually works, but whether
it is *guaranteed* to work, even with strange new equipment.  Believe me,
some nominally RS232-compatible equipment is *very* strange.  If you run
in a forgiving environment with hardware that is known to work well with
the Amiga's non-standard "RS232" interface, you'll probably never have
any trouble.  Things change when, for example, you are selling the things
and have customers complaining that their XYZ Computer Company Weirdobox
doesn't work with their "RS232 compatible" Amiga.  Or when you're trying
to push the limits on things like timing and cable length.  Then less-than-
complete compliance with standards can be very significant.

This probably doesn't belong in tcp-ip any more, so I've pointed followups
to sci.electronics.
-- 
Mars in 1980s:  USSR, 2 tries, |     Henry Spencer at U of Toronto Zoology
2 failures; USA, 0 tries.      | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

naftoli@aecom.YU.EDU (Robert N. Berlinger) (05/12/89)

In article <1989May5.155311.17997@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
> In article <May.4.18.53.01.1989.1967@ron.rutgers.edu> ron@ron.rutgers.edu (Ron Natalie) writes:
> >You're not serious about IP over MIDI are you.  It's major drawback
> >is that MIDI is UNIDIRECTIONAL! ...
> 
> So are most ring networks, at the wiring level.  Same solution:  tie the
> end back to the beginning.

MIDI devices often don't expect to hear their own traffic -- devices can
feedback.

To the general idea, MIDI over IP seems a more likely (and desirable)
situation, and would be fairly easy to implement.
-- 
Robert N. Berlinger		    |Domain: naftoli@aecom.yu.edu        
Supervisor of Systems Support	    |UUCP: {uunet}!aecom!naftoli
Scientific Computing Center	    |CompuServe: 73047,741 GEnie: R.Berlinger
Albert Einstein College of Medicine |Pan: berlinger  AppleLink: U0995

grr@cbmvax.UUCP (George Robbins) (05/12/89)

In article <1989May11.165157.23656@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:
> In article <4135@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
> >> No, it's the result of not conforming to the standards, pure and simple.
...
> >It certainly seems reliable and it interoperates quite happily with RS232 at
...
> >or do you just have a problem with the Amiga?
...
> I don't have anything in particular against the Amiga; I do have a serious
> dislike for people who violate standards simply because they think they can
> improve on them.  What matters is not whether it usually works, but whether
> it is *guaranteed* to work, even with strange new equipment.

In passing, please note that the Amiga does not violate standards more
than the average RS232 interface.  It simply omits the slew rate limiting
capacitors on the RS232 drivers, just like 30-70% of the other RS232
"compatible" devices out there.  And of course the baud rate generator can
be set to some interesting values.

Yes, reliablity in a general sense does suffer.  Depending on the FCC
treatment in the particular unit and the cable length, it may or may not
go that fast.  No promises...

Really there's no great problem with 38.4K local/direct connections,
but sadly, a lot of the common things like terminals, terminal programs
and dumb protocols can't seem to keep up.  The world is overfull of
terminals that won't display as fast at 9600 BPS without flow control
no matter how fast you set the bit rate to.

-- 
George Robbins - now working for,	uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr@uunet.uu.net
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)