home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / bmd-1.0beta.tar.Z / bmd-1.0beta.tar / bmd-1.0beta / app / omtd / event.h < prev    next >
C/C++ Source or Header  |  1991-01-13  |  1KB  |  45 lines

  1. /*
  2.  * Copyright (c) 1990 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted
  6.  * provided that the above copyright notice and this paragraph are
  7.  * duplicated in all such forms and that any documentation,
  8.  * advertising materials, and other materials related to such
  9.  * distribution and use acknowledge that the software was developed
  10.  * by the University of California, Lawrence Berkeley Laboratory,
  11.  * Berkeley, CA.  The name of the University may not be used to
  12.  * endorse or promote products derived from this software without
  13.  * specific prior written permission.
  14.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  15.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  16.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  17.  */
  18.  
  19. struct event {
  20.     struct track *trk;
  21.     u_long duration;    /* duration for notes (note off ommitted) */
  22.     struct midi_msg m;
  23.     struct event *next;
  24.     struct event *pqnext;
  25. };
  26.  
  27. extern struct event *ealloc();
  28. extern void efree();
  29. extern void efreel();
  30. extern void dump_command();
  31.  
  32. extern struct event *pq_remove_bynote();
  33. void pq_insert();
  34.  
  35. extern struct event *master_list;
  36. extern struct event *raw_list;
  37.  
  38. #define evt_noteon_p(p) \
  39.     (((p)->m.mm_cmd & 0xf0) == 0x90 && (p)->m.mm_data[2] != 0)
  40.  
  41. #define evt_noteoff_p(p) \
  42.     (((p)->m.mm_cmd & 0xf0) == 0x80 || \
  43.      (((p)->m.mm_cmd & 0xf0) == 0x90 && (p)->m.mm_data[2] == 0))
  44.  
  45.