home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / next / programm / 5921 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.3 KB  |  57 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!ucselx!crash!billyh
  3. From: billyh@crash.cts.com (Bill Huey)
  4. Subject: Midi object gives me a strange MACH error....uh, help ???
  5. Date: 01 Sep 92 22:10:16 PDT
  6. Message-ID: <1992Sep01.221017.29989@crash>
  7. Keywords: midi mach
  8. Lines: 47
  9.  
  10.  
  11. Ok, I have been trying to get the midi object to open, but it keeps giving me
  12. a
  13.  
  14. "Music Kit: Problem opening Midi device. Mach Error: ownership rights required
  15. "
  16. error.
  17.  
  18. There's not much in complexity in my code...I'm just trying to talk to the MIDI
  19. driver.
  20.  
  21. Here it is......
  22.  
  23. #import <objc/Object.h>
  24. #import <musickit/Note.h>
  25. #import <musickit/Midi.h>
  26. #import <musickit/NoteReceiver.h>
  27. --More--(92%)
  28.  
  29. char *theString = "F0,00,00,0E,02,03,65,F7";
  30. char *portstring = "midi1";
  31.  
  32. void main()
  33. {
  34.          id     theNote;
  35.          id     midi;
  36.  
  37.  
  38.         theNote = [[Note alloc] init];
  39.         midi = [Midi newOnDevice:portstring];
  40.         [midi open];
  41.         [midi run];
  42.  
  43.  
  44.         printf("%s<- is the test string being sent over\n",theString);
  45.         [theNote setPar:MK_sysExclusive toString:theString];
  46.         [[midi channelNoteReceiver:0] receiveNote:theNote];
  47.         exit(0);
  48.  
  49. }
  50.  
  51.  
  52. .............................
  53. Any help would be really appreciated.
  54. Bye.
  55.  
  56.  
  57.