home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 369a.lha / midi_in_v0.0a / README < prev   
Encoding:
Text File  |  1990-04-01  |  2.5 KB  |  57 lines

  1.  
  2. midi_in - replacement MIDI port input handler for midi.library
  3.  
  4. version 0.0a, release data 2/15/90
  5.  
  6. This is an alpha release of my alternate MIDI input port handler for
  7. Bill Barton's MIDI library.
  8.  
  9. The advantage of midi_in over the MidiIn input port handler that comes
  10. with the library is that midi_in incurs far fewer data overruns and 
  11. missed bytes.
  12.  
  13. Anyway, midi_in can be double-clicked on, then routed from just like
  14. the default MIDI handler, MidiIn.  To use, double click on midi_in,
  15. or start it from the CLI.  Then route to it.  Don't use MidiIn if
  16. you're going to use midi_in.
  17.  
  18. How it works is that midi_in's interrupt handler is written in assembly
  19. and does the minimum handling necessary to support MIDI.  As quickly as
  20. it can, it gets the byte out of the UART receive register and into a
  21. memory queue, then notifies a handling task via a signal to indicate that
  22. data is available.  (A task was necessary because the MIDI library does
  23. not allow interrupt handlers to queue directly to MIDI library source 
  24. ports -- the MIDI library calls AllocMem and such behind your back)
  25.  
  26. Anyway, the queue is rather clever in that there are two fairly large
  27. buffers, one that the interrupt handler is writing into and one that
  28. the task is reading out of.  When the task is notified that there is
  29. data in the queue, it uninterruptibly swaps the two buffers and processes
  30. all the data received so far in that buffer.  This way if it gets behind
  31. multiple bytes can be efficiently received while already received data
  32. is being pumped on out.
  33.  
  34. One bug is that the handler signals the midi_in task pretty indiscriminately,
  35. like per byte received.  It should only signal when an entire MIDI message
  36. has been received, and maybe after a certain number of bytes or time
  37. interval elapsing without data being received while receiving system 
  38. exclusive messages.  I have a version which was written to work that way, 
  39. but it is currently too buggy to release.  Anyway, because of that, the
  40. Amiga is pretty close to 100% busy when receiving system exclusive data
  41. just from all the signalling and context switching going on with midi_in.
  42. The smarter version will probably cut that overhead to five percent or less.
  43.  
  44. This is a binary-only release, sorry.  There may be a source release later,
  45. I don't know.
  46.  
  47. Anyway, enjoy the program if you have a use for it.  I imagine that people
  48. who are trying to use the MIDI library will find this program quite useful.
  49.  
  50. Regards,
  51.  
  52. Karl Lehenbauer @ The Hacker's Haven
  53. 3918 Panorama, Missouri City, TX  77459
  54. (713) 438-4964
  55. Internet: karl@sugar.hackercorp.com
  56. Usenet: uunet!sugar!karl
  57.