home *** CD-ROM | disk | FTP | other *** search
/ PC Musician 2000 / PC_Musician_2000.iso / PCMUSIC / NOTATION / SILENCE / MIDIINPT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-01  |  1.3 KB  |  49 lines

  1. /******************************************/
  2. /*  Simple MIDI Text File Reader Class,   */
  3. /*  by Perry R. Cook, 1996                */ 
  4. /*  This Object can open a MIDI Text File */
  5. /*  and parse it.  The file spec is mine  */
  6. /*  and mine alone, but it's all text so  */
  7. /*  you should be able to figure it out.  */        
  8. /*                      */
  9. /*  TSIDI (ToolKit Synthesis Instrument   */
  10. /*  Digital Interfaceis like MIDI, but    */
  11. /*  allows for floating point control     */
  12. /*  changes, note numbers, etc. Example:  */
  13. /*  noteOn(1,60.01,111.132) plays a sharp */      
  14. /*  middle C with a velocity of 111.132   */
  15. /*                                        */
  16. /*  Warning:  Obey column spacing in the  */
  17. /*  text file if you try to edit it or    */
  18. /*  create your own files.                */
  19. /******************************************/
  20.  
  21. #if !defined(__MIDIInpt_h)
  22. #define __MIDIInpt_h
  23.  
  24. #include "Object.h"
  25. #include "dmedia/midi.h" 
  26. #include <sys/types.h>
  27. #include <sys/prctl.h>
  28.  
  29. class MIDIInpt : public Object
  30. {
  31.   protected:  
  32.     int midi_pid;
  33.     int messageType;
  34.     int channel;
  35.     float byteTwo;
  36.     float byteThree;
  37.   public:
  38.     MIDIInpt();
  39.     ~MIDIInpt();
  40.     void printMessage();
  41.     int nextMessage();
  42.     int getType();
  43.     int getChannel();
  44.     MY_FLOAT getByteTwo();
  45.     MY_FLOAT getByteThree();
  46. };
  47.  
  48. #endif
  49.