dls1.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /* Defines and Structures for Instrument Collection Form RIFF DLS1
  2. *
  3. * Copyright (C) 2003-2004 Rok Mandeljc
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. #ifndef __WINE_INCLUDE_DLS1_H
  20. #define __WINE_INCLUDE_DLS1_H
  21. /*****************************************************************************
  22. * FOURCCs
  23. */
  24. #define FOURCC_DLS mmioFOURCC('D','L','S',' ')
  25. #define FOURCC_DLID mmioFOURCC('d','l','i','d')
  26. #define FOURCC_COLH mmioFOURCC('c','o','l','h')
  27. #define FOURCC_WVPL mmioFOURCC('w','v','p','l')
  28. #define FOURCC_PTBL mmioFOURCC('p','t','b','l')
  29. #define FOURCC_PATH mmioFOURCC('p','a','t','h')
  30. #define FOURCC_wave mmioFOURCC('w','a','v','e')
  31. #define FOURCC_LINS mmioFOURCC('l','i','n','s')
  32. #define FOURCC_INS mmioFOURCC('i','n','s',' ')
  33. #define FOURCC_INSH mmioFOURCC('i','n','s','h')
  34. #define FOURCC_LRGN mmioFOURCC('l','r','g','n')
  35. #define FOURCC_RGN mmioFOURCC('r','g','n',' ')
  36. #define FOURCC_RGNH mmioFOURCC('r','g','n','h')
  37. #define FOURCC_LART mmioFOURCC('l','a','r','t')
  38. #define FOURCC_ART1 mmioFOURCC('a','r','t','1')
  39. #define FOURCC_WLNK mmioFOURCC('w','l','n','k')
  40. #define FOURCC_WSMP mmioFOURCC('w','s','m','p')
  41. #define FOURCC_VERS mmioFOURCC('v','e','r','s')
  42. /*****************************************************************************
  43. * Flags
  44. */
  45. #define CONN_DST_NONE 0x000
  46. #define CONN_DST_ATTENUATION 0x001
  47. #define CONN_DST_PITCH 0x003
  48. #define CONN_DST_PAN 0x004
  49. #define CONN_DST_LFO_FREQUENCY 0x104
  50. #define CONN_DST_LFO_STARTDELAY 0x105
  51. #define CONN_DST_EG1_ATTACKTIME 0x206
  52. #define CONN_DST_EG1_DECAYTIME 0x207
  53. #define CONN_DST_EG1_RELEASETIME 0x209
  54. #define CONN_DST_EG1_SUSTAINLEVEL 0x20A
  55. #define CONN_DST_EG2_ATTACKTIME 0x30A
  56. #define CONN_DST_EG2_DECAYTIME 0x30B
  57. #define CONN_DST_EG2_RELEASETIME 0x30D
  58. #define CONN_DST_EG2_SUSTAINLEVEL 0x30E
  59. #define CONN_SRC_NONE 0x000
  60. #define CONN_SRC_LFO 0x001
  61. #define CONN_SRC_KEYONVELOCITY 0x002
  62. #define CONN_SRC_KEYNUMBER 0x003
  63. #define CONN_SRC_EG1 0x004
  64. #define CONN_SRC_EG2 0x005
  65. #define CONN_SRC_PITCHWHEEL 0x006
  66. #define CONN_SRC_CC1 0x081
  67. #define CONN_SRC_CC7 0x087
  68. #define CONN_SRC_CC10 0x08A
  69. #define CONN_SRC_CC11 0x08B
  70. #define CONN_TRN_NONE 0x000
  71. #define CONN_TRN_CONCAVE 0x001
  72. #define F_INSTRUMENT_DRUMS 0x80000000
  73. #define F_RGN_OPTION_SELFNONEXCLUSIVE 0x1
  74. #define F_WAVELINK_PHASE_MASTER 0x1
  75. #define F_WSMP_NO_TRUNCATION 0x1
  76. #define F_WSMP_NO_COMPRESSION 0x2
  77. #define POOL_CUE_NULL 0xFFFFFFFF
  78. #define WAVELINK_CHANNEL_LEFT 0x1
  79. #define WAVELINK_CHANNEL_RIGHT 0x2
  80. #define WLOOP_TYPE_FORWARD 0x0
  81. /*****************************************************************************
  82. * Structures
  83. */
  84. /* typedef definitions */
  85. typedef struct _DLSID DLSID, *LPDLSID;
  86. typedef struct _DLSVERSION DLSVERSION, *LPDLSVERSION;
  87. typedef struct _CONNECTION CONNECTION, *LPCONNECTION;
  88. typedef struct _CONNECTIONLIST CONNECTIONLIST, *LPCONNECTIONLIST;
  89. typedef struct _RGNRANGE RGNRANGE, *LPRGNRANGE;
  90. typedef struct _MIDILOCALE MIDILOCALE, *LPMIDILOCALE;
  91. typedef struct _RGNHEADER RGNHEADER, *LPRGNHEADER;
  92. typedef struct _INSTHEADER INSTHEADER, *LPINSTHEADER;
  93. typedef struct _DLSHEADER DLSHEADER, *LPDLSHEADER;
  94. typedef struct _WAVELINK WAVELINK, *LPWAVELINK;
  95. typedef struct _POOLCUE POOLCUE, *LPPOOLCUE;
  96. typedef struct _POOLTABLE POOLTABLE, *LPPOOLTABLE;
  97. typedef struct _rwsmp WSMPL, *LPWSMPL;
  98. typedef struct _rloop WLOOP, *LPWLOOP;
  99. /* actual structures */
  100. struct _DLSID {
  101. ULONG ulData1;
  102. USHORT usData2;
  103. USHORT usData3;
  104. BYTE abData4[8];
  105. };
  106. struct _DLSVERSION {
  107. DWORD dwVersionMS;
  108. DWORD dwVersionLS;
  109. };
  110. struct _CONNECTION {
  111. USHORT usSource;
  112. USHORT usControl;
  113. USHORT usDestination;
  114. USHORT usTransform;
  115. LONG lScale;
  116. };
  117. struct _CONNECTIONLIST {
  118. ULONG cbSize;
  119. ULONG cConnections;
  120. };
  121. struct _RGNRANGE {
  122. USHORT usLow;
  123. USHORT usHigh;
  124. };
  125. struct _MIDILOCALE {
  126. ULONG ulBank;
  127. ULONG ulInstrument;
  128. };
  129. struct _RGNHEADER {
  130. RGNRANGE RangeKey;
  131. RGNRANGE RangeVelocity;
  132. USHORT fusOptions;
  133. USHORT usKeyGroup;
  134. };
  135. struct _INSTHEADER {
  136. ULONG cRegions;
  137. MIDILOCALE Locale;
  138. };
  139. struct _DLSHEADER {
  140. ULONG cInstruments;
  141. };
  142. struct _WAVELINK {
  143. USHORT fusOptions;
  144. USHORT usPhaseGroup;
  145. ULONG ulChannel;
  146. ULONG ulTableIndex;
  147. };
  148. struct _POOLCUE {
  149. ULONG ulOffset;
  150. };
  151. struct _POOLTABLE {
  152. ULONG cbSize;
  153. ULONG cCues;
  154. };
  155. struct _rwsmp {
  156. ULONG cbSize;
  157. USHORT usUnityNote;
  158. SHORT sFineTune;
  159. LONG lAttenuation;
  160. ULONG fulOptions;
  161. ULONG cSampleLoops;
  162. };
  163. struct _rloop {
  164. ULONG cbSize;
  165. ULONG ulType;
  166. ULONG ulStart;
  167. ULONG ulLength;
  168. };
  169. #endif /* __WINE_INCLUDE_DLS1_H */