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