wavefront.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. #ifndef __wavefront_h__
  2. #define __wavefront_h__
  3. /* WaveFront header file.
  4. *
  5. * Copyright (C) by Paul Barton-Davis 1998
  6. *
  7. * This program is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
  8. * Version 2 (June 1991). See the "COPYING" file distributed with this software
  9. * for more info.
  10. */
  11. #if (!defined(__GNUC__) && !defined(__GNUG__))
  12. You will not be able to compile this file correctly without gcc, because
  13. it is necessary to pack the "wavefront_alias" structure to a size
  14. of 22 bytes, corresponding to 16-bit alignment (as would have been
  15. the case on the original platform, MS-DOS). If this is not done,
  16. then WavePatch-format files cannot be read/written correctly.
  17. The method used to do this here ("__attribute__((packed)") is
  18. completely compiler dependent.
  19. All other wavefront_* types end up aligned to 32 bit values and
  20. still have the same (correct) size.
  21. #else
  22. /* However, note that as of G++ 2.7.3.2, g++ was unable to
  23. correctly parse *type* __attribute__ tags. It will do the
  24. right thing if we use the "packed" attribute on each struct
  25. member, which has the same semantics anyway.
  26. */
  27. #endif /* __GNUC__ */
  28. /***************************** WARNING ********************************
  29. PLEASE DO NOT MODIFY THIS FILE IN ANY WAY THAT AFFECTS ITS ABILITY TO
  30. BE USED WITH EITHER C *OR* C++.
  31. **********************************************************************/
  32. #ifndef NUM_MIDIKEYS
  33. #define NUM_MIDIKEYS 128
  34. #endif /* NUM_MIDIKEYS */
  35. #ifndef NUM_MIDICHANNELS
  36. #define NUM_MIDICHANNELS 16
  37. #endif /* NUM_MIDICHANNELS */
  38. /* These are very useful/important. the original wavefront interface
  39. was developed on a 16 bit system, where sizeof(int) = 2
  40. bytes. Defining things like this makes the code much more portable, and
  41. easier to understand without having to toggle back and forth
  42. between a 16-bit view of the world and a 32-bit one.
  43. */
  44. typedef short INT16;
  45. typedef unsigned short UINT16;
  46. typedef int INT32;
  47. typedef unsigned int UINT32;
  48. typedef char CHAR8;
  49. typedef unsigned char UCHAR8;
  50. /* Pseudo-commands not part of the WaveFront command set.
  51. These are used for various driver controls and direct
  52. hardware control.
  53. */
  54. #define WFC_DEBUG_DRIVER 0
  55. #define WFC_FX_IOCTL 1
  56. #define WFC_PATCH_STATUS 2
  57. #define WFC_PROGRAM_STATUS 3
  58. #define WFC_SAMPLE_STATUS 4
  59. #define WFC_DISABLE_INTERRUPTS 5
  60. #define WFC_ENABLE_INTERRUPTS 6
  61. #define WFC_INTERRUPT_STATUS 7
  62. #define WFC_ROMSAMPLES_RDONLY 8
  63. #define WFC_IDENTIFY_SLOT_TYPE 9
  64. /* Wavefront synth commands
  65. */
  66. #define WFC_DOWNLOAD_SAMPLE 0x80
  67. #define WFC_DOWNLOAD_BLOCK 0x81
  68. #define WFC_DOWNLOAD_MULTISAMPLE 0x82
  69. #define WFC_DOWNLOAD_SAMPLE_ALIAS 0x83
  70. #define WFC_DELETE_SAMPLE 0x84
  71. #define WFC_REPORT_FREE_MEMORY 0x85
  72. #define WFC_DOWNLOAD_PATCH 0x86
  73. #define WFC_DOWNLOAD_PROGRAM 0x87
  74. #define WFC_SET_SYNTHVOL 0x89
  75. #define WFC_SET_NVOICES 0x8B
  76. #define WFC_DOWNLOAD_DRUM 0x90
  77. #define WFC_GET_SYNTHVOL 0x92
  78. #define WFC_GET_NVOICES 0x94
  79. #define WFC_DISABLE_CHANNEL 0x9A
  80. #define WFC_ENABLE_CHANNEL 0x9B
  81. #define WFC_MISYNTH_OFF 0x9D
  82. #define WFC_MISYNTH_ON 0x9E
  83. #define WFC_FIRMWARE_VERSION 0x9F
  84. #define WFC_GET_NSAMPLES 0xA0
  85. #define WFC_DISABLE_DRUM_PROGRAM 0xA2
  86. #define WFC_UPLOAD_PATCH 0xA3
  87. #define WFC_UPLOAD_PROGRAM 0xA4
  88. #define WFC_SET_TUNING 0xA6
  89. #define WFC_GET_TUNING 0xA7
  90. #define WFC_VMIDI_ON 0xA8
  91. #define WFC_VMIDI_OFF 0xA9
  92. #define WFC_MIDI_STATUS 0xAA
  93. #define WFC_GET_CHANNEL_STATUS 0xAB
  94. #define WFC_DOWNLOAD_SAMPLE_HEADER 0xAC
  95. #define WFC_UPLOAD_SAMPLE_HEADER 0xAD
  96. #define WFC_UPLOAD_MULTISAMPLE 0xAE
  97. #define WFC_UPLOAD_SAMPLE_ALIAS 0xAF
  98. #define WFC_IDENTIFY_SAMPLE_TYPE 0xB0
  99. #define WFC_DOWNLOAD_EDRUM_PROGRAM 0xB1
  100. #define WFC_UPLOAD_EDRUM_PROGRAM 0xB2
  101. #define WFC_SET_EDRUM_CHANNEL 0xB3
  102. #define WFC_INSTOUT_LEVELS 0xB4
  103. #define WFC_PEAKOUT_LEVELS 0xB5
  104. #define WFC_REPORT_CHANNEL_PROGRAMS 0xB6
  105. #define WFC_HARDWARE_VERSION 0xCF
  106. #define WFC_UPLOAD_SAMPLE_PARAMS 0xD7
  107. #define WFC_DOWNLOAD_OS 0xF1
  108. #define WFC_NOOP 0xFF
  109. #define WF_MAX_SAMPLE 512
  110. #define WF_MAX_PATCH 256
  111. #define WF_MAX_PROGRAM 128
  112. #define WF_SECTION_MAX 44 /* longest OS section length */
  113. /* # of bytes we send to the board when sending it various kinds of
  114. substantive data, such as samples, patches and programs.
  115. */
  116. #define WF_PROGRAM_BYTES 32
  117. #define WF_PATCH_BYTES 132
  118. #define WF_SAMPLE_BYTES 27
  119. #define WF_SAMPLE_HDR_BYTES 25
  120. #define WF_ALIAS_BYTES 25
  121. #define WF_DRUM_BYTES 9
  122. #define WF_MSAMPLE_BYTES 259 /* (MIDI_KEYS * 2) + 3 */
  123. #define WF_ACK 0x80
  124. #define WF_DMA_ACK 0x81
  125. /* OR-values for MIDI status bits */
  126. #define WF_MIDI_VIRTUAL_ENABLED 0x1
  127. #define WF_MIDI_VIRTUAL_IS_EXTERNAL 0x2
  128. #define WF_MIDI_IN_TO_SYNTH_DISABLED 0x4
  129. /* slot indexes for struct address_info: makes code a little more mnemonic */
  130. #define WF_SYNTH_SLOT 0
  131. #define WF_INTERNAL_MIDI_SLOT 1
  132. #define WF_EXTERNAL_MIDI_SLOT 2
  133. /* Magic MIDI bytes used to switch I/O streams on the ICS2115 MPU401
  134. emulation. Note these NEVER show up in output from the device and
  135. should NEVER be used in input unless Virtual MIDI mode has been
  136. disabled. If they do show up as input, the results are unpredictable.
  137. */
  138. #define WF_EXTERNAL_SWITCH 0xFD
  139. #define WF_INTERNAL_SWITCH 0xF9
  140. /* Debugging flags */
  141. #define WF_DEBUG_CMD 0x1
  142. #define WF_DEBUG_DATA 0x2
  143. #define WF_DEBUG_LOAD_PATCH 0x4
  144. #define WF_DEBUG_IO 0x8
  145. /* WavePatch file format stuff */
  146. #define WF_WAVEPATCH_VERSION 120; /* Current version number (1.2) */
  147. #define WF_MAX_COMMENT 64 /* Comment length */
  148. #define WF_NUM_LAYERS 4
  149. #define WF_NAME_LENGTH 32
  150. #define WF_SOURCE_LENGTH 260
  151. #define BankFileID "Bank"
  152. #define DrumkitFileID "DrumKit"
  153. #define ProgramFileID "Program"
  154. struct wf_envelope
  155. {
  156. UCHAR8 attack_time:7;
  157. UCHAR8 Unused1:1;
  158. UCHAR8 decay1_time:7;
  159. UCHAR8 Unused2:1;
  160. UCHAR8 decay2_time:7;
  161. UCHAR8 Unused3:1;
  162. UCHAR8 sustain_time:7;
  163. UCHAR8 Unused4:1;
  164. UCHAR8 release_time:7;
  165. UCHAR8 Unused5:1;
  166. UCHAR8 release2_time:7;
  167. UCHAR8 Unused6:1;
  168. CHAR8 attack_level;
  169. CHAR8 decay1_level;
  170. CHAR8 decay2_level;
  171. CHAR8 sustain_level;
  172. CHAR8 release_level;
  173. UCHAR8 attack_velocity:7;
  174. UCHAR8 Unused7:1;
  175. UCHAR8 volume_velocity:7;
  176. UCHAR8 Unused8:1;
  177. UCHAR8 keyboard_scaling:7;
  178. UCHAR8 Unused9:1;
  179. };
  180. typedef struct wf_envelope wavefront_envelope;
  181. struct wf_lfo
  182. {
  183. UCHAR8 sample_number;
  184. UCHAR8 frequency:7;
  185. UCHAR8 Unused1:1;
  186. UCHAR8 am_src:4;
  187. UCHAR8 fm_src:4;
  188. CHAR8 fm_amount;
  189. CHAR8 am_amount;
  190. CHAR8 start_level;
  191. CHAR8 end_level;
  192. UCHAR8 ramp_delay:7;
  193. UCHAR8 wave_restart:1; /* for LFO2 only */
  194. UCHAR8 ramp_time:7;
  195. UCHAR8 Unused2:1;
  196. };
  197. typedef struct wf_lfo wavefront_lfo;
  198. struct wf_patch
  199. {
  200. INT16 frequency_bias; /* ** THIS IS IN MOTOROLA FORMAT!! ** */
  201. UCHAR8 amplitude_bias:7;
  202. UCHAR8 Unused1:1;
  203. UCHAR8 portamento:7;
  204. UCHAR8 Unused2:1;
  205. UCHAR8 sample_number;
  206. UCHAR8 pitch_bend:4;
  207. UCHAR8 sample_msb:1;
  208. UCHAR8 Unused3:3;
  209. UCHAR8 mono:1;
  210. UCHAR8 retrigger:1;
  211. UCHAR8 nohold:1;
  212. UCHAR8 restart:1;
  213. UCHAR8 filterconfig:2; /* SDK says "not used" */
  214. UCHAR8 reuse:1;
  215. UCHAR8 reset_lfo:1;
  216. UCHAR8 fm_src2:4;
  217. UCHAR8 fm_src1:4;
  218. CHAR8 fm_amount1;
  219. CHAR8 fm_amount2;
  220. UCHAR8 am_src:4;
  221. UCHAR8 Unused4:4;
  222. CHAR8 am_amount;
  223. UCHAR8 fc1_mode:4;
  224. UCHAR8 fc2_mode:4;
  225. CHAR8 fc1_mod_amount;
  226. CHAR8 fc1_keyboard_scaling;
  227. CHAR8 fc1_bias;
  228. CHAR8 fc2_mod_amount;
  229. CHAR8 fc2_keyboard_scaling;
  230. CHAR8 fc2_bias;
  231. UCHAR8 randomizer:7;
  232. UCHAR8 Unused5:1;
  233. struct wf_envelope envelope1;
  234. struct wf_envelope envelope2;
  235. struct wf_lfo lfo1;
  236. struct wf_lfo lfo2;
  237. };
  238. typedef struct wf_patch wavefront_patch;
  239. struct wf_layer
  240. {
  241. UCHAR8 patch_number;
  242. UCHAR8 mix_level:7;
  243. UCHAR8 mute:1;
  244. UCHAR8 split_point:7;
  245. UCHAR8 play_below:1;
  246. UCHAR8 pan_mod_src:2;
  247. UCHAR8 pan_or_mod:1;
  248. UCHAR8 pan:4;
  249. UCHAR8 split_type:1;
  250. };
  251. typedef struct wf_layer wavefront_layer;
  252. struct wf_program
  253. {
  254. struct wf_layer layer[WF_NUM_LAYERS];
  255. };
  256. typedef struct wf_program wavefront_program;
  257. struct wf_sample_offset
  258. {
  259. INT32 Fraction:4;
  260. INT32 Integer:20;
  261. INT32 Unused:8;
  262. };
  263. typedef struct wf_sample_offset wavefront_sample_offset;
  264. /* Sample slot types */
  265. #define WF_ST_SAMPLE 0
  266. #define WF_ST_MULTISAMPLE 1
  267. #define WF_ST_ALIAS 2
  268. #define WF_ST_EMPTY 3
  269. /* pseudo's */
  270. #define WF_ST_DRUM 4
  271. #define WF_ST_PROGRAM 5
  272. #define WF_ST_PATCH 6
  273. #define WF_ST_SAMPLEHDR 7
  274. #define WF_ST_MASK 0xf
  275. /* Flags for slot status. These occupy the upper bits of the same byte
  276. as a sample type.
  277. */
  278. #define WF_SLOT_USED 0x80 /* XXX don't rely on this being accurate */
  279. #define WF_SLOT_FILLED 0x40
  280. #define WF_SLOT_ROM 0x20
  281. #define WF_SLOT_MASK 0xf0
  282. /* channel constants */
  283. #define WF_CH_MONO 0
  284. #define WF_CH_LEFT 1
  285. #define WF_CH_RIGHT 2
  286. /* Sample formats */
  287. #define LINEAR_16BIT 0
  288. #define WHITE_NOISE 1
  289. #define LINEAR_8BIT 2
  290. #define MULAW_8BIT 3
  291. #define WF_SAMPLE_IS_8BIT(smpl) ((smpl)->SampleResolution&2)
  292. /*
  293. Because most/all of the sample data we pass in via pointers has
  294. never been copied (just mmap-ed into user space straight from the
  295. disk), it would be nice to allow handling of multi-channel sample
  296. data without forcing user-level extraction of the relevant bytes.
  297. So, we need a way of specifying which channel to use (the WaveFront
  298. only handles mono samples in a given slot), and the only way to do
  299. this without using some struct other than wavefront_sample as the
  300. interface is the awful hack of using the unused bits in a
  301. wavefront_sample:
  302. Val Meaning
  303. --- -------
  304. 0 no channel selection (use channel 1, sample is MONO)
  305. 1 use first channel, and skip one
  306. 2 use second channel, and skip one
  307. 3 use third channel, and skip two
  308. 4 use fourth channel, skip three
  309. 5 use fifth channel, skip four
  310. 6 use six channel, skip five
  311. This can handle up to 4 channels, and anyone downloading >4 channels
  312. of sample data just to select one of them needs to find some tools
  313. like sox ...
  314. NOTE: values 0, 1 and 2 correspond to WF_CH_* above. This is
  315. important.
  316. */
  317. #define WF_SET_CHANNEL(samp,chn) \
  318. (samp)->Unused1 = chn & 0x1; \
  319. (samp)->Unused2 = chn & 0x2; \
  320. (samp)->Unused3 = chn & 0x4
  321. #define WF_GET_CHANNEL(samp) \
  322. (((samp)->Unused3 << 2)|((samp)->Unused2<<1)|(samp)->Unused1)
  323. typedef struct wf_sample {
  324. struct wf_sample_offset sampleStartOffset;
  325. struct wf_sample_offset loopStartOffset;
  326. struct wf_sample_offset loopEndOffset;
  327. struct wf_sample_offset sampleEndOffset;
  328. INT16 FrequencyBias;
  329. UCHAR8 SampleResolution:2; /* sample_format */
  330. UCHAR8 Unused1:1;
  331. UCHAR8 Loop:1;
  332. UCHAR8 Bidirectional:1;
  333. UCHAR8 Unused2:1;
  334. UCHAR8 Reverse:1;
  335. UCHAR8 Unused3:1;
  336. } wavefront_sample;
  337. typedef struct wf_multisample {
  338. INT16 NumberOfSamples; /* log2 of the number of samples */
  339. INT16 SampleNumber[NUM_MIDIKEYS];
  340. } wavefront_multisample;
  341. typedef struct wf_alias {
  342. INT16 OriginalSample __attribute__ ((packed));
  343. struct wf_sample_offset sampleStartOffset __attribute__ ((packed));
  344. struct wf_sample_offset loopStartOffset __attribute__ ((packed));
  345. struct wf_sample_offset sampleEndOffset __attribute__ ((packed));
  346. struct wf_sample_offset loopEndOffset __attribute__ ((packed));
  347. INT16 FrequencyBias __attribute__ ((packed));
  348. UCHAR8 SampleResolution:2 __attribute__ ((packed));
  349. UCHAR8 Unused1:1 __attribute__ ((packed));
  350. UCHAR8 Loop:1 __attribute__ ((packed));
  351. UCHAR8 Bidirectional:1 __attribute__ ((packed));
  352. UCHAR8 Unused2:1 __attribute__ ((packed));
  353. UCHAR8 Reverse:1 __attribute__ ((packed));
  354. UCHAR8 Unused3:1 __attribute__ ((packed));
  355. /* This structure is meant to be padded only to 16 bits on their
  356. original. Of course, whoever wrote their documentation didn't
  357. realize that sizeof(struct) can be >=
  358. sum(sizeof(struct-fields)) and so thought that giving a C level
  359. description of the structs used in WavePatch files was
  360. sufficient. I suppose it was, as long as you remember the
  361. standard 16->32 bit issues.
  362. */
  363. UCHAR8 sixteen_bit_padding __attribute__ ((packed));
  364. } wavefront_alias;
  365. typedef struct wf_drum {
  366. UCHAR8 PatchNumber;
  367. UCHAR8 MixLevel:7;
  368. UCHAR8 Unmute:1;
  369. UCHAR8 Group:4;
  370. UCHAR8 Unused1:4;
  371. UCHAR8 PanModSource:2;
  372. UCHAR8 PanModulated:1;
  373. UCHAR8 PanAmount:4;
  374. UCHAR8 Unused2:1;
  375. } wavefront_drum;
  376. typedef struct wf_drumkit {
  377. struct wf_drum drum[NUM_MIDIKEYS];
  378. } wavefront_drumkit;
  379. typedef struct wf_channel_programs {
  380. UCHAR8 Program[NUM_MIDICHANNELS];
  381. } wavefront_channel_programs;
  382. /* How to get MIDI channel status from the data returned by
  383. a WFC_GET_CHANNEL_STATUS command (a struct wf_channel_programs)
  384. */
  385. #define WF_CHANNEL_STATUS(ch,wcp) (wcp)[(ch/7)] & (1<<((ch)%7))
  386. typedef union wf_any {
  387. wavefront_sample s;
  388. wavefront_multisample ms;
  389. wavefront_alias a;
  390. wavefront_program pr;
  391. wavefront_patch p;
  392. wavefront_drum d;
  393. } wavefront_any;
  394. /* Hannu Solvainen hoped that his "patch_info" struct in soundcard.h
  395. might work for other wave-table based patch loading situations.
  396. Alas, his fears were correct. The WaveFront doesn't even come with
  397. just "patches", but several different kind of structures that
  398. control the sound generation process.
  399. */
  400. typedef struct wf_patch_info {
  401. /* the first two fields are used by the OSS "patch loading" interface
  402. only, and are unused by the current user-level library.
  403. */
  404. INT16 key; /* Use WAVEFRONT_PATCH here */
  405. UINT16 devno; /* fill in when sending */
  406. UCHAR8 subkey; /* WF_ST_{SAMPLE,ALIAS,etc.} */
  407. #define WAVEFRONT_FIND_FREE_SAMPLE_SLOT 999
  408. UINT16 number; /* patch/sample/prog number */
  409. UINT32 size; /* size of any data included in
  410. one of the fields in `hdrptr', or
  411. as `dataptr'.
  412. NOTE: for actual samples, this is
  413. the size of the *SELECTED CHANNEL*
  414. even if more data is actually available.
  415. So, a stereo sample (2 channels) of
  416. 6000 bytes total has `size' = 3000.
  417. See the macros and comments for
  418. WF_{GET,SET}_CHANNEL above.
  419. */
  420. wavefront_any __user *hdrptr; /* user-space ptr to hdr bytes */
  421. UINT16 __user *dataptr; /* actual sample data */
  422. wavefront_any hdr; /* kernel-space copy of hdr bytes */
  423. } wavefront_patch_info;
  424. /* The maximum number of bytes we will ever move to or from user space
  425. in response to a WFC_* command. This obviously doesn't cover
  426. actual sample data.
  427. */
  428. #define WF_MAX_READ sizeof(wavefront_multisample)
  429. #define WF_MAX_WRITE sizeof(wavefront_multisample)
  430. /*
  431. This allows us to execute any WF command except the download/upload
  432. ones, which are handled differently due to copyin/copyout issues as
  433. well as data-nybbling to/from the card.
  434. */
  435. typedef struct wavefront_control {
  436. int cmd; /* WFC_* */
  437. char status; /* return status to user-space */
  438. unsigned char rbuf[WF_MAX_READ]; /* bytes read from card */
  439. unsigned char wbuf[WF_MAX_WRITE]; /* bytes written to card */
  440. } wavefront_control;
  441. #define WFCTL_WFCMD 0x1
  442. #define WFCTL_LOAD_SPP 0x2
  443. /* Modulator table */
  444. #define WF_MOD_LFO1 0
  445. #define WF_MOD_LFO2 1
  446. #define WF_MOD_ENV1 2
  447. #define WF_MOD_ENV2 3
  448. #define WF_MOD_KEYBOARD 4
  449. #define WF_MOD_LOGKEY 5
  450. #define WF_MOD_VELOCITY 6
  451. #define WF_MOD_LOGVEL 7
  452. #define WF_MOD_RANDOM 8
  453. #define WF_MOD_PRESSURE 9
  454. #define WF_MOD_MOD_WHEEL 10
  455. #define WF_MOD_1 WF_MOD_MOD_WHEEL
  456. #define WF_MOD_BREATH 11
  457. #define WF_MOD_2 WF_MOD_BREATH
  458. #define WF_MOD_FOOT 12
  459. #define WF_MOD_4 WF_MOD_FOOT
  460. #define WF_MOD_VOLUME 13
  461. #define WF_MOD_7 WF_MOD_VOLUME
  462. #define WF_MOD_PAN 14
  463. #define WF_MOD_10 WF_MOD_PAN
  464. #define WF_MOD_EXPR 15
  465. #define WF_MOD_11 WF_MOD_EXPR
  466. /* FX-related material */
  467. typedef struct wf_fx_info {
  468. int request; /* see list below */
  469. int data[4]; /* we don't need much */
  470. } wavefront_fx_info;
  471. /* support for each of these will be forthcoming once I or someone
  472. else has figured out which of the addresses on page 6 and page 7 of
  473. the YSS225 control each parameter. Incidentally, these come from
  474. the Windows driver interface, but again, Turtle Beach didn't
  475. document the API to use them.
  476. */
  477. #define WFFX_SETOUTGAIN 0
  478. #define WFFX_SETSTEREOOUTGAIN 1
  479. #define WFFX_SETREVERBIN1GAIN 2
  480. #define WFFX_SETREVERBIN2GAIN 3
  481. #define WFFX_SETREVERBIN3GAIN 4
  482. #define WFFX_SETCHORUSINPORT 5
  483. #define WFFX_SETREVERBIN1PORT 6
  484. #define WFFX_SETREVERBIN2PORT 7
  485. #define WFFX_SETREVERBIN3PORT 8
  486. #define WFFX_SETEFFECTPORT 9
  487. #define WFFX_SETAUXPORT 10
  488. #define WFFX_SETREVERBTYPE 11
  489. #define WFFX_SETREVERBDELAY 12
  490. #define WFFX_SETCHORUSLFO 13
  491. #define WFFX_SETCHORUSPMD 14
  492. #define WFFX_SETCHORUSAMD 15
  493. #define WFFX_SETEFFECT 16
  494. #define WFFX_SETBASEALL 17
  495. #define WFFX_SETREVERBALL 18
  496. #define WFFX_SETCHORUSALL 20
  497. #define WFFX_SETREVERBDEF 22
  498. #define WFFX_SETCHORUSDEF 23
  499. #define WFFX_DELAYSETINGAIN 24
  500. #define WFFX_DELAYSETFBGAIN 25
  501. #define WFFX_DELAYSETFBLPF 26
  502. #define WFFX_DELAYSETGAIN 27
  503. #define WFFX_DELAYSETTIME 28
  504. #define WFFX_DELAYSETFBTIME 29
  505. #define WFFX_DELAYSETALL 30
  506. #define WFFX_DELAYSETDEF 32
  507. #define WFFX_SDELAYSETINGAIN 33
  508. #define WFFX_SDELAYSETFBGAIN 34
  509. #define WFFX_SDELAYSETFBLPF 35
  510. #define WFFX_SDELAYSETGAIN 36
  511. #define WFFX_SDELAYSETTIME 37
  512. #define WFFX_SDELAYSETFBTIME 38
  513. #define WFFX_SDELAYSETALL 39
  514. #define WFFX_SDELAYSETDEF 41
  515. #define WFFX_DEQSETINGAIN 42
  516. #define WFFX_DEQSETFILTER 43
  517. #define WFFX_DEQSETALL 44
  518. #define WFFX_DEQSETDEF 46
  519. #define WFFX_MUTE 47
  520. #define WFFX_FLANGESETBALANCE 48
  521. #define WFFX_FLANGESETDELAY 49
  522. #define WFFX_FLANGESETDWFFX_TH 50
  523. #define WFFX_FLANGESETFBGAIN 51
  524. #define WFFX_FLANGESETINGAIN 52
  525. #define WFFX_FLANGESETLFO 53
  526. #define WFFX_FLANGESETALL 54
  527. #define WFFX_FLANGESETDEF 56
  528. #define WFFX_PITCHSETSHIFT 57
  529. #define WFFX_PITCHSETBALANCE 58
  530. #define WFFX_PITCHSETALL 59
  531. #define WFFX_PITCHSETDEF 61
  532. #define WFFX_SRSSETINGAIN 62
  533. #define WFFX_SRSSETSPACE 63
  534. #define WFFX_SRSSETCENTER 64
  535. #define WFFX_SRSSETGAIN 65
  536. #define WFFX_SRSSETMODE 66
  537. #define WFFX_SRSSETDEF 68
  538. /* Allow direct user-space control over FX memory/coefficient data.
  539. In theory this could be used to download the FX microprogram,
  540. but it would be a little slower, and involve some weird code.
  541. */
  542. #define WFFX_MEMSET 69
  543. #endif /* __wavefront_h__ */