[comp.sys.m6809] OS9 Coco MIDI

knudsen@ihwpt.ATT.COM (mike knudsen) (01/29/88)

About Pete's posting -- I'm really glad to see some
MIDI music work getting into the Coco world.
About time!

For last couple (or more?) years I've been developing a
graphic score notation editor that plays thru (what else)
the Speech Systems MIDI pak.  I like my human interface
better than Lyra's, which I also own and have used.
Mine uses multiple staves (so you can edit any voice at
any time with the mouse) and supports more standard music
notation (repeats, Nth endings, codas, etc.).
(PS: will Speech Systems sell the MIDI pak without software?)
I'm still trying to decide how to distribute my program
(shareware, PD, sell it (thru whom?)).

There is some PD patch libe C source code floating around
on our MIDI mailing list that I'll port to L2 someday.

I'll repeat my challenge here that I made in a mailing to Pete,
that you CAN'T do MIDI recording (time stamping) under Coco
OS9, unless you resort to serious cheating by re-directing all
interrupt vectors directly to your code.
During such recording, multi-tasking and OS9's real-time clock
are totally disabled.  And no other I/O either!
Of course you can live with that while recording keyboard,
but it sort of violates the decorum of OS9.

Of course you can also use the SADLY NEGLECTED programmable
timer that was designed into the GIME chip.
I don't know whether you'd want interrupts enabled from it,
or have interrupts only from the MIDI receiver.

Incidentally, my score sequencer is 100% kosher OS9 --
I use the sleep() call to time playback MIDI messages
to 1/60th second resolution, and use arithmetic to get
tempo variations.  No realtime problems so far,
although I just loop-poll the UART trasnmitter buffer.
(Hint: sandwich lots of computation between individual
MIDI bytes, while the UART is sending, so you don't waste
as much time polling).

Multitasking is not disabled -- it's fun to CLEAR to another
window and do a DIR E while playing.  Sounds just like how
I play piano while trying to talk to someone!
-- 
Mike J Knudsen    ...ihnp4!ihwpt!knudsen  Bell Labs(AT&T)
    Delphi: RAGTIMER    CIS: <memory failure, too many digits>
	"Just say NO to MS-DOS!"	"OS/2 == 1/2 of an OS"

pete@wlbr.EATON.COM (Pete Lyall) (02/02/88)

In article <2295@ihwpt.ATT.COM> knudsen@ihwpt.ATT.COM (mike knudsen) writes:
>About Pete's posting -- I'm really glad to see some
>MIDI music work getting into the Coco world.
>About time!
>
>(PS: will Speech Systems sell the MIDI pak without software?)

Yep, but I ended up buying COCO MIDI 2 anyway. They were selling it
for half of the price of the CM2 package, which runs $60 to $75
depending on whether you catch a sale price.

>I'm still trying to decide how to distribute my program
>(shareware, PD, sell it (thru whom?)).

Well, I sent Richard Johnson a shareware contribution for his patch
librarian, and he told me that was the 1st $$$ he'd seen for it (this
was also the only time I'd ever sent shareware $$ - it was such a
laborious chunk of code to write, and he saved me hours [probably
hundreds!] of coding time). Point is - don't count on cashflow from
shareware in this market. I'd like to see it PD or Shareware (because
I'm continually broke from acquiring MIDI or computer toys), but
that's your call.

>There is some PD patch libe C source code floating around
>on our MIDI mailing list that I'll port to L2 someday.

Post it!

>I'll repeat my challenge here that I made in a mailing to Pete,
>that you CAN'T do MIDI recording (time stamping) under Coco
>OS9, unless you resort to serious cheating by re-directing all
>interrupt vectors directly to your code.

>Of course you can also use the SADLY NEGLECTED programmable
>timer that was designed into the GIME chip.

Well, John Shortess is doing a driver that has modes (via setstat). In
the dumb mode, it acts much like an ACIA driver... byte stream in/out.
The other mode is meant for sequencer recording/playing support. It
will timestamp arriving bytes/packages, and hold of transmitting
bytes/packages until the appointed time. He hasn't gotten all this
worked out yet, but is actively working on it. The internal timer is
also being looked at HARD. Part of the problem there is the F$alarm
code, and it's non-reentrancy.. there is no alarm queue per se
(damn!). Since few use the f$alarm because of its lack of
documentation, and its brain-damaged implementation (1 alarm system
wide at a time), he may well take over the timer. There are also some
GIME considerations with respect to interrupt handling to be contended
with.

>No realtime problems so far,
>although I just loop-poll the UART trasnmitter buffer.

Hmmm - perhaps you would consider adding the IRQ jumper to the MIDIPAK
much the way mentioned in an earlier message re: the RS-232 pak. This
way, you could have reliable IRQ's without interference from the moody
GIME chip, and could write it as interrupt driven transmit
despooling.

BTW - the score editor sounds *wunnerful*. How loud must I beg to
become a beta site? *8^}


-- 
Pete Lyall (OS9 Users Group VP)|  DELPHI: OS9UGVP  |  Eaton Corp.(818)-706-5693
Compuserve: 76703,4230 (OS9 Sysop) OS9 (home): (805)-985-0632 (24hr./1200 baud)
Internet: pete@wlbr.eaton.com      UUCP: {ihnp4,scgvax,jplgodo,voder}!wlbr!pete