lavalink-client 2.2.2 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/README.md +95 -1
  2. package/dist/cjs/index.d.ts +8 -1
  3. package/dist/cjs/index.js +8 -1
  4. package/dist/cjs/structures/Constants.d.ts +40 -0
  5. package/dist/cjs/structures/Constants.js +244 -0
  6. package/dist/cjs/structures/CustomSearches/BandCampSearch.d.ts +2 -2
  7. package/dist/cjs/structures/Filters.d.ts +2 -217
  8. package/dist/cjs/structures/Filters.js +8 -232
  9. package/dist/cjs/structures/LavalinkManager.d.ts +31 -166
  10. package/dist/cjs/structures/LavalinkManager.js +59 -7
  11. package/dist/cjs/structures/LavalinkManagerStatics.d.ts +1 -1
  12. package/dist/cjs/structures/Node.d.ts +15 -156
  13. package/dist/cjs/structures/Node.js +131 -49
  14. package/dist/cjs/structures/NodeManager.d.ts +54 -52
  15. package/dist/cjs/structures/NodeManager.js +74 -4
  16. package/dist/cjs/structures/Player.d.ts +31 -124
  17. package/dist/cjs/structures/Player.js +77 -43
  18. package/dist/cjs/structures/Queue.d.ts +66 -42
  19. package/dist/cjs/structures/Queue.js +69 -11
  20. package/dist/cjs/structures/Types/Filters.d.ts +190 -0
  21. package/dist/cjs/structures/Types/Manager.d.ts +184 -0
  22. package/dist/cjs/structures/Types/Manager.js +2 -0
  23. package/dist/cjs/structures/Types/Node.d.ts +216 -0
  24. package/dist/cjs/structures/Types/Node.js +2 -0
  25. package/dist/cjs/structures/Types/Player.d.ts +108 -0
  26. package/dist/cjs/structures/Types/Player.js +2 -0
  27. package/dist/cjs/structures/Types/Queue.d.ts +34 -0
  28. package/dist/cjs/structures/Types/Queue.js +2 -0
  29. package/dist/cjs/structures/{Track.d.ts → Types/Track.d.ts} +3 -2
  30. package/dist/{structures → cjs/structures/Types}/Track.js +2 -2
  31. package/dist/cjs/structures/Types/Utils.d.ts +367 -0
  32. package/dist/cjs/structures/Types/Utils.js +2 -0
  33. package/dist/cjs/structures/Utils.d.ts +13 -369
  34. package/dist/cjs/structures/Utils.js +35 -14
  35. package/dist/esm/index.d.ts +8 -1
  36. package/dist/esm/index.js +8 -1
  37. package/dist/esm/structures/Constants.d.ts +40 -0
  38. package/dist/esm/structures/Constants.js +241 -0
  39. package/dist/esm/structures/CustomSearches/BandCampSearch.d.ts +2 -2
  40. package/dist/esm/structures/Filters.d.ts +2 -217
  41. package/dist/esm/structures/Filters.js +3 -227
  42. package/dist/esm/structures/LavalinkManager.d.ts +31 -166
  43. package/dist/esm/structures/LavalinkManager.js +57 -5
  44. package/dist/esm/structures/LavalinkManagerStatics.d.ts +1 -1
  45. package/dist/esm/structures/Node.d.ts +15 -156
  46. package/dist/esm/structures/Node.js +122 -40
  47. package/dist/esm/structures/NodeManager.d.ts +54 -52
  48. package/dist/esm/structures/NodeManager.js +71 -1
  49. package/dist/esm/structures/Player.d.ts +31 -124
  50. package/dist/esm/structures/Player.js +76 -42
  51. package/dist/esm/structures/Queue.d.ts +66 -42
  52. package/dist/esm/structures/Queue.js +69 -11
  53. package/dist/esm/structures/Types/Filters.d.ts +190 -0
  54. package/dist/esm/structures/Types/Manager.d.ts +184 -0
  55. package/dist/esm/structures/Types/Manager.js +1 -0
  56. package/dist/esm/structures/Types/Node.d.ts +216 -0
  57. package/dist/esm/structures/Types/Node.js +1 -0
  58. package/dist/esm/structures/Types/Player.d.ts +108 -0
  59. package/dist/esm/structures/Types/Player.js +1 -0
  60. package/dist/esm/structures/Types/Queue.d.ts +34 -0
  61. package/dist/esm/structures/Types/Queue.js +1 -0
  62. package/dist/esm/structures/{Track.d.ts → Types/Track.d.ts} +3 -2
  63. package/dist/esm/structures/Types/Track.js +1 -0
  64. package/dist/esm/structures/Types/Utils.d.ts +367 -0
  65. package/dist/esm/structures/Types/Utils.js +1 -0
  66. package/dist/esm/structures/Utils.d.ts +13 -369
  67. package/dist/esm/structures/Utils.js +35 -14
  68. package/dist/types/index.d.ts +8 -1
  69. package/dist/types/structures/Constants.d.ts +40 -0
  70. package/dist/types/structures/CustomSearches/BandCampSearch.d.ts +2 -2
  71. package/dist/types/structures/Filters.d.ts +2 -217
  72. package/dist/types/structures/LavalinkManager.d.ts +31 -166
  73. package/dist/types/structures/LavalinkManagerStatics.d.ts +1 -1
  74. package/dist/types/structures/Node.d.ts +15 -156
  75. package/dist/types/structures/NodeManager.d.ts +54 -52
  76. package/dist/types/structures/Player.d.ts +31 -124
  77. package/dist/types/structures/Queue.d.ts +66 -42
  78. package/dist/types/structures/Types/Filters.d.ts +190 -0
  79. package/dist/types/structures/Types/Manager.d.ts +184 -0
  80. package/dist/types/structures/Types/Node.d.ts +216 -0
  81. package/dist/types/structures/Types/Player.d.ts +108 -0
  82. package/dist/types/structures/Types/Queue.d.ts +34 -0
  83. package/dist/types/structures/{Track.d.ts → Types/Track.d.ts} +3 -2
  84. package/dist/types/structures/Types/Utils.d.ts +367 -0
  85. package/dist/types/structures/Utils.d.ts +13 -369
  86. package/package.json +1 -1
  87. package/dist/index.d.ts +0 -10
  88. package/dist/index.js +0 -13
  89. package/dist/structures/Filters.d.ts +0 -230
  90. package/dist/structures/Filters.js +0 -472
  91. package/dist/structures/LavalinkManager.d.ts +0 -47
  92. package/dist/structures/LavalinkManager.js +0 -36
  93. package/dist/structures/LavalinkManagerStatics.d.ts +0 -3
  94. package/dist/structures/LavalinkManagerStatics.js +0 -76
  95. package/dist/structures/Node.d.ts +0 -171
  96. package/dist/structures/Node.js +0 -462
  97. package/dist/structures/NodeManager.d.ts +0 -58
  98. package/dist/structures/NodeManager.js +0 -25
  99. package/dist/structures/Player.d.ts +0 -101
  100. package/dist/structures/Player.js +0 -232
  101. package/dist/structures/PlayerManager.d.ts +0 -62
  102. package/dist/structures/PlayerManager.js +0 -26
  103. package/dist/structures/Queue.d.ts +0 -93
  104. package/dist/structures/Queue.js +0 -160
  105. package/dist/structures/QueueManager.d.ts +0 -77
  106. package/dist/structures/QueueManager.js +0 -74
  107. package/dist/structures/Track.d.ts +0 -27
  108. package/dist/structures/Utils.d.ts +0 -183
  109. package/dist/structures/Utils.js +0 -43
  110. /package/dist/cjs/structures/{Track.js → Types/Filters.js} +0 -0
  111. /package/dist/esm/structures/{Track.js → Types/Filters.js} +0 -0
@@ -0,0 +1,241 @@
1
+ export var DestroyReasons;
2
+ (function (DestroyReasons) {
3
+ DestroyReasons["QueueEmpty"] = "QueueEmpty";
4
+ DestroyReasons["NodeDestroy"] = "NodeDestroy";
5
+ DestroyReasons["NodeDeleted"] = "NodeDeleted";
6
+ DestroyReasons["LavalinkNoVoice"] = "LavalinkNoVoice";
7
+ DestroyReasons["NodeReconnectFail"] = "NodeReconnectFail";
8
+ DestroyReasons["Disconnected"] = "Disconnected";
9
+ DestroyReasons["PlayerReconnectFail"] = "PlayerReconnectFail";
10
+ DestroyReasons["ChannelDeleted"] = "ChannelDeleted";
11
+ DestroyReasons["DisconnectAllNodes"] = "DisconnectAllNodes";
12
+ DestroyReasons["ReconnectAllNodes"] = "ReconnectAllNodes";
13
+ })(DestroyReasons || (DestroyReasons = {}));
14
+ ;
15
+ export const validSponsorBlocks = ["sponsor", "selfpromo", "interaction", "intro", "outro", "preview", "music_offtopic", "filler"];
16
+ /** The audio Outputs Data map declaration */
17
+ export const audioOutputsData = {
18
+ mono: {
19
+ leftToLeft: 0.5,
20
+ leftToRight: 0.5,
21
+ rightToLeft: 0.5,
22
+ rightToRight: 0.5,
23
+ },
24
+ stereo: {
25
+ leftToLeft: 1,
26
+ leftToRight: 0,
27
+ rightToLeft: 0,
28
+ rightToRight: 1,
29
+ },
30
+ left: {
31
+ leftToLeft: 1,
32
+ leftToRight: 0,
33
+ rightToLeft: 1,
34
+ rightToRight: 0,
35
+ },
36
+ right: {
37
+ leftToLeft: 0,
38
+ leftToRight: 1,
39
+ rightToLeft: 0,
40
+ rightToRight: 1,
41
+ },
42
+ };
43
+ export const EQList = {
44
+ /** A Bassboost Equalizer, so high it distorts the audio */
45
+ BassboostEarrape: [
46
+ { band: 0, gain: 0.6 * 0.375 },
47
+ { band: 1, gain: 0.67 * 0.375 },
48
+ { band: 2, gain: 0.67 * 0.375 },
49
+ { band: 3, gain: 0.4 * 0.375 },
50
+ { band: 4, gain: -0.5 * 0.375 },
51
+ { band: 5, gain: 0.15 * 0.375 },
52
+ { band: 6, gain: -0.45 * 0.375 },
53
+ { band: 7, gain: 0.23 * 0.375 },
54
+ { band: 8, gain: 0.35 * 0.375 },
55
+ { band: 9, gain: 0.45 * 0.375 },
56
+ { band: 10, gain: 0.55 * 0.375 },
57
+ { band: 11, gain: -0.6 * 0.375 },
58
+ { band: 12, gain: 0.55 * 0.375 },
59
+ { band: 13, gain: -0.5 * 0.375 },
60
+ { band: 14, gain: -0.75 * 0.375 },
61
+ ],
62
+ /** A High and decent Bassboost Equalizer */
63
+ BassboostHigh: [
64
+ { band: 0, gain: 0.6 * 0.25 },
65
+ { band: 1, gain: 0.67 * 0.25 },
66
+ { band: 2, gain: 0.67 * 0.25 },
67
+ { band: 3, gain: 0.4 * 0.25 },
68
+ { band: 4, gain: -0.5 * 0.25 },
69
+ { band: 5, gain: 0.15 * 0.25 },
70
+ { band: 6, gain: -0.45 * 0.25 },
71
+ { band: 7, gain: 0.23 * 0.25 },
72
+ { band: 8, gain: 0.35 * 0.25 },
73
+ { band: 9, gain: 0.45 * 0.25 },
74
+ { band: 10, gain: 0.55 * 0.25 },
75
+ { band: 11, gain: -0.6 * 0.25 },
76
+ { band: 12, gain: 0.55 * 0.25 },
77
+ { band: 13, gain: -0.5 * 0.25 },
78
+ { band: 14, gain: -0.75 * 0.25 },
79
+ ],
80
+ /** A decent Bassboost Equalizer */
81
+ BassboostMedium: [
82
+ { band: 0, gain: 0.6 * 0.1875 },
83
+ { band: 1, gain: 0.67 * 0.1875 },
84
+ { band: 2, gain: 0.67 * 0.1875 },
85
+ { band: 3, gain: 0.4 * 0.1875 },
86
+ { band: 4, gain: -0.5 * 0.1875 },
87
+ { band: 5, gain: 0.15 * 0.1875 },
88
+ { band: 6, gain: -0.45 * 0.1875 },
89
+ { band: 7, gain: 0.23 * 0.1875 },
90
+ { band: 8, gain: 0.35 * 0.1875 },
91
+ { band: 9, gain: 0.45 * 0.1875 },
92
+ { band: 10, gain: 0.55 * 0.1875 },
93
+ { band: 11, gain: -0.6 * 0.1875 },
94
+ { band: 12, gain: 0.55 * 0.1875 },
95
+ { band: 13, gain: -0.5 * 0.1875 },
96
+ { band: 14, gain: -0.75 * 0.1875 },
97
+ ],
98
+ /** A slight Bassboost Equalizer */
99
+ BassboostLow: [
100
+ { band: 0, gain: 0.6 * 0.125 },
101
+ { band: 1, gain: 0.67 * 0.125 },
102
+ { band: 2, gain: 0.67 * 0.125 },
103
+ { band: 3, gain: 0.4 * 0.125 },
104
+ { band: 4, gain: -0.5 * 0.125 },
105
+ { band: 5, gain: 0.15 * 0.125 },
106
+ { band: 6, gain: -0.45 * 0.125 },
107
+ { band: 7, gain: 0.23 * 0.125 },
108
+ { band: 8, gain: 0.35 * 0.125 },
109
+ { band: 9, gain: 0.45 * 0.125 },
110
+ { band: 10, gain: 0.55 * 0.125 },
111
+ { band: 11, gain: -0.6 * 0.125 },
112
+ { band: 12, gain: 0.55 * 0.125 },
113
+ { band: 13, gain: -0.5 * 0.125 },
114
+ { band: 14, gain: -0.75 * 0.125 },
115
+ ],
116
+ /** Makes the Music slightly "better" */
117
+ BetterMusic: [
118
+ { band: 0, gain: 0.25 },
119
+ { band: 1, gain: 0.025 },
120
+ { band: 2, gain: 0.0125 },
121
+ { band: 3, gain: 0 },
122
+ { band: 4, gain: 0 },
123
+ { band: 5, gain: -0.0125 },
124
+ { band: 6, gain: -0.025 },
125
+ { band: 7, gain: -0.0175 },
126
+ { band: 8, gain: 0 },
127
+ { band: 9, gain: 0 },
128
+ { band: 10, gain: 0.0125 },
129
+ { band: 11, gain: 0.025 },
130
+ { band: 12, gain: 0.25 },
131
+ { band: 13, gain: 0.125 },
132
+ { band: 14, gain: 0.125 },
133
+ ],
134
+ /** Makes the Music sound like rock music / sound rock music better */
135
+ Rock: [
136
+ { band: 0, gain: 0.300 },
137
+ { band: 1, gain: 0.250 },
138
+ { band: 2, gain: 0.200 },
139
+ { band: 3, gain: 0.100 },
140
+ { band: 4, gain: 0.050 },
141
+ { band: 5, gain: -0.050 },
142
+ { band: 6, gain: -0.150 },
143
+ { band: 7, gain: -0.200 },
144
+ { band: 8, gain: -0.100 },
145
+ { band: 9, gain: -0.050 },
146
+ { band: 10, gain: 0.050 },
147
+ { band: 11, gain: 0.100 },
148
+ { band: 12, gain: 0.200 },
149
+ { band: 13, gain: 0.250 },
150
+ { band: 14, gain: 0.300 },
151
+ ],
152
+ /** Makes the Music sound like Classic music / sound Classic music better */
153
+ Classic: [
154
+ { band: 0, gain: 0.375 },
155
+ { band: 1, gain: 0.350 },
156
+ { band: 2, gain: 0.125 },
157
+ { band: 3, gain: 0 },
158
+ { band: 4, gain: 0 },
159
+ { band: 5, gain: 0.125 },
160
+ { band: 6, gain: 0.550 },
161
+ { band: 7, gain: 0.050 },
162
+ { band: 8, gain: 0.125 },
163
+ { band: 9, gain: 0.250 },
164
+ { band: 10, gain: 0.200 },
165
+ { band: 11, gain: 0.250 },
166
+ { band: 12, gain: 0.300 },
167
+ { band: 13, gain: 0.250 },
168
+ { band: 14, gain: 0.300 },
169
+ ],
170
+ /** Makes the Music sound like Pop music / sound Pop music better */
171
+ Pop: [
172
+ { band: 0, gain: 0.2635 },
173
+ { band: 1, gain: 0.22141 },
174
+ { band: 2, gain: -0.21141 },
175
+ { band: 3, gain: -0.1851 },
176
+ { band: 4, gain: -0.155 },
177
+ { band: 5, gain: 0.21141 },
178
+ { band: 6, gain: 0.22456 },
179
+ { band: 7, gain: 0.237 },
180
+ { band: 8, gain: 0.237 },
181
+ { band: 9, gain: 0.237 },
182
+ { band: 10, gain: -0.05 },
183
+ { band: 11, gain: -0.116 },
184
+ { band: 12, gain: 0.192 },
185
+ { band: 13, gain: 0 },
186
+ ],
187
+ /** Makes the Music sound like Electronic music / sound Electronic music better */
188
+ Electronic: [
189
+ { band: 0, gain: 0.375 },
190
+ { band: 1, gain: 0.350 },
191
+ { band: 2, gain: 0.125 },
192
+ { band: 3, gain: 0 },
193
+ { band: 4, gain: 0 },
194
+ { band: 5, gain: -0.125 },
195
+ { band: 6, gain: -0.125 },
196
+ { band: 7, gain: 0 },
197
+ { band: 8, gain: 0.25 },
198
+ { band: 9, gain: 0.125 },
199
+ { band: 10, gain: 0.15 },
200
+ { band: 11, gain: 0.2 },
201
+ { band: 12, gain: 0.250 },
202
+ { band: 13, gain: 0.350 },
203
+ { band: 14, gain: 0.400 },
204
+ ],
205
+ /** Boosts all Bands slightly for louder and fuller sound */
206
+ FullSound: [
207
+ { band: 0, gain: 0.25 + 0.375 },
208
+ { band: 1, gain: 0.25 + 0.025 },
209
+ { band: 2, gain: 0.25 + 0.0125 },
210
+ { band: 3, gain: 0.25 + 0 },
211
+ { band: 4, gain: 0.25 + 0 },
212
+ { band: 5, gain: 0.25 + -0.0125 },
213
+ { band: 6, gain: 0.25 + -0.025 },
214
+ { band: 7, gain: 0.25 + -0.0175 },
215
+ { band: 8, gain: 0.25 + 0 },
216
+ { band: 9, gain: 0.25 + 0 },
217
+ { band: 10, gain: 0.25 + 0.0125 },
218
+ { band: 11, gain: 0.25 + 0.025 },
219
+ { band: 12, gain: 0.25 + 0.375 },
220
+ { band: 13, gain: 0.25 + 0.125 },
221
+ { band: 14, gain: 0.25 + 0.125 },
222
+ ],
223
+ /** Boosts basses + lower highs for a pro gaming sound */
224
+ Gaming: [
225
+ { band: 0, gain: 0.350 },
226
+ { band: 1, gain: 0.300 },
227
+ { band: 2, gain: 0.250 },
228
+ { band: 3, gain: 0.200 },
229
+ { band: 4, gain: 0.150 },
230
+ { band: 5, gain: 0.100 },
231
+ { band: 6, gain: 0.050 },
232
+ { band: 7, gain: -0.0 },
233
+ { band: 8, gain: -0.050 },
234
+ { band: 9, gain: -0.100 },
235
+ { band: 10, gain: -0.150 },
236
+ { band: 11, gain: -0.200 },
237
+ { band: 12, gain: -0.250 },
238
+ { band: 13, gain: -0.300 },
239
+ { band: 14, gain: -0.350 },
240
+ ],
241
+ };
@@ -1,3 +1,3 @@
1
- import { Player } from "../Player";
2
- import { UnresolvedSearchResult } from "../Utils";
1
+ import type { Player } from "../Player";
2
+ import type { UnresolvedSearchResult } from "../Types/Utils";
3
3
  export declare const bandCampSearch: (player: Player, query: string, requestUser: unknown) => Promise<UnresolvedSearchResult>;
@@ -1,5 +1,5 @@
1
- import { Player } from "./Player";
2
- import { FloatNumber, IntegerNumber } from "./Utils";
1
+ import type { Player } from "./Player";
2
+ import type { AudioOutputs, EQBand, FilterData, PlayerFilters, TimescaleFilter } from "./Types/Filters";
3
3
  /**
4
4
  * The FilterManager for each player
5
5
  */
@@ -143,218 +143,3 @@ export declare class FilterManager {
143
143
  /** Clears the equalizer bands. */
144
144
  clearEQ(): Promise<this>;
145
145
  }
146
- /** The Audio Outputs type */
147
- export type AudioOutputs = "mono" | "stereo" | "left" | "right";
148
- /** The audio Outputs Data map declaration */
149
- export declare const audioOutputsData: Record<AudioOutputs, ChannelMixFilter>;
150
- /** The "active" / "disabled" Player Filters */
151
- export interface PlayerFilters {
152
- /** Sets nightcore to false, and vaporwave to false */
153
- custom: boolean;
154
- /** Sets custom to false, and vaporwave to false */
155
- nightcore: boolean;
156
- /** Sets custom to false, and nightcore to false */
157
- vaporwave: boolean;
158
- /** If rotation filter is enabled / not */
159
- rotation: boolean;
160
- /** if karaoke filter is enabled / not */
161
- karaoke: boolean;
162
- /** if tremolo filter is enabled / not */
163
- tremolo: boolean;
164
- /** if vibrato filter is enabled / not */
165
- vibrato: boolean;
166
- lowPass: boolean;
167
- /** audio Output (default stereo, mono sounds the fullest and best for not-stereo tracks) */
168
- audioOutput: AudioOutputs;
169
- /** Lavalink Volume FILTER (not player Volume, think of it as a gain booster) */
170
- volume: boolean;
171
- /** Filters for the Lavalink Filter Plugin */
172
- lavalinkFilterPlugin: {
173
- /** if echo filter is enabled / not */
174
- echo: boolean;
175
- /** if reverb filter is enabled / not */
176
- reverb: boolean;
177
- };
178
- lavalinkLavaDspxPlugin: {
179
- /** if lowPass filter is enabled / not */
180
- lowPass: boolean;
181
- /** if highPass filter is enabled / not */
182
- highPass: boolean;
183
- /** if normalization filter is enabled / not */
184
- normalization: boolean;
185
- /** if echo filter is enabled / not */
186
- echo: boolean;
187
- };
188
- }
189
- /**
190
- * There are 15 bands (0-14) that can be changed.
191
- * "gain" is the multiplier for the given band.
192
- * The default value is 0.
193
- * Valid values range from -0.25 to 1.0, where -0.25 means the given band is completely muted, and 0.25 means it is doubled.
194
- * Modifying the gain could also change the volume of the output.
195
- */
196
- export interface EQBand {
197
- /** On what band position (0-14) it should work */
198
- band: IntegerNumber | number;
199
- /** The gain (-0.25 to 1.0) */
200
- gain: FloatNumber | number;
201
- }
202
- /**
203
- * Uses equalization to eliminate part of a band, usually targeting vocals.
204
- */
205
- export interface KaraokeFilter {
206
- /** The level (0 to 1.0 where 0.0 is no effect and 1.0 is full effect) */
207
- level?: number;
208
- /** The mono level (0 to 1.0 where 0.0 is no effect and 1.0 is full effect) */
209
- monoLevel?: number;
210
- /** The filter band (in Hz) */
211
- filterBand?: number;
212
- /** The filter width */
213
- filterWidth?: number;
214
- }
215
- /**
216
- * Changes the speed, pitch, and rate
217
- */
218
- export interface TimescaleFilter {
219
- /** The playback speed 0.0 ≤ x */
220
- speed?: number;
221
- /** The pitch 0.0 ≤ x */
222
- pitch?: number;
223
- /** The rate 0.0 ≤ x */
224
- rate?: number;
225
- }
226
- /**
227
- * Uses amplification to create a shuddering effect, where the volume quickly oscillates.
228
- * Demo: https://en.wikipedia.org/wiki/File:Fuse_Electronics_Tremolo_MK-III_Quick_Demo.ogv
229
- */
230
- export interface TremoloFilter {
231
- /** The frequency 0.0 < x */
232
- frequency?: number;
233
- /** The tremolo depth 0.0 < x ≤ 1.0 */
234
- depth?: number;
235
- }
236
- /**
237
- * Similar to tremolo. While tremolo oscillates the volume, vibrato oscillates the pitch.
238
- */
239
- export interface VibratoFilter {
240
- /** The frequency 0.0 < x ≤ 14.0 */
241
- frequency?: number;
242
- /** The vibrato depth 0.0 < x ≤ 1.0 */
243
- depth?: number;
244
- }
245
- /**
246
- * Rotates the sound around the stereo channels/user headphones (aka Audio Panning).
247
- * It can produce an effect similar to https://youtu.be/QB9EB8mTKcc (without the reverb).
248
- */
249
- export interface RotationFilter {
250
- /** The frequency of the audio rotating around the listener in Hz. 0.2 is similar to the example video above */
251
- rotationHz?: number;
252
- }
253
- /**
254
- * Distortion effect. It can generate some pretty unique audio effects.
255
- */
256
- export interface DistortionFilter {
257
- sinOffset?: number;
258
- sinScale?: number;
259
- cosOffset?: number;
260
- cosScale?: number;
261
- tanOffset?: number;
262
- tanScale?: number;
263
- offset?: number;
264
- scale?: number;
265
- }
266
- /**
267
- * Mixes both channels (left and right), with a configurable factor on how much each channel affects the other.
268
- * With the defaults, both channels are kept independent of each other.
269
- * Setting all factors to 0.5 means both channels get the same audio.
270
- */
271
- export interface ChannelMixFilter {
272
- /** The left to left channel mix factor (0.0 ≤ x ≤ 1.0) */
273
- leftToLeft?: number;
274
- /** The left to right channel mix factor (0.0 ≤ x ≤ 1.0) */
275
- leftToRight?: number;
276
- /** The right to left channel mix factor (0.0 ≤ x ≤ 1.0) */
277
- rightToLeft?: number;
278
- /** The right to right channel mix factor (0.0 ≤ x ≤ 1.0) */
279
- rightToRight?: number;
280
- }
281
- /**
282
- * Higher frequencies get suppressed, while lower frequencies pass through this filter, thus the name low pass.
283
- * Any smoothing values equal to or less than 1.0 will disable the filter.
284
- */
285
- export interface LowPassFilter {
286
- /** The smoothing factor (1.0 < x) */
287
- smoothing?: number;
288
- }
289
- /**
290
- * Filter Data stored in the Client and partially sent to Lavalink
291
- */
292
- export interface FilterData {
293
- volume?: number;
294
- karaoke?: KaraokeFilter;
295
- timescale?: TimescaleFilter;
296
- tremolo?: TremoloFilter;
297
- vibrato?: VibratoFilter;
298
- rotation?: RotationFilter;
299
- distortion?: DistortionFilter;
300
- channelMix?: ChannelMixFilter;
301
- lowPass?: LowPassFilter;
302
- pluginFilters?: {
303
- "lavalink-filter-plugin"?: {
304
- "echo"?: {
305
- delay?: number;
306
- decay?: number;
307
- };
308
- "reverb"?: {
309
- delays?: number[];
310
- gains?: number[];
311
- };
312
- };
313
- "high-pass"?: {
314
- cutoffFrequency?: number;
315
- boostFactor?: number;
316
- };
317
- "low-pass"?: {
318
- cutoffFrequency?: number;
319
- boostFactor?: number;
320
- };
321
- normalization?: {
322
- maxAmplitude?: number;
323
- adaptive?: boolean;
324
- };
325
- echo?: {
326
- echoLength?: number;
327
- decay?: number;
328
- };
329
- };
330
- }
331
- /**
332
- * Actual Filter Data sent to Lavalink
333
- */
334
- export interface LavalinkFilterData extends FilterData {
335
- equalizer?: EQBand[];
336
- }
337
- export declare const EQList: {
338
- /** A Bassboost Equalizer, so high it distorts the audio */
339
- BassboostEarrape: EQBand[];
340
- /** A High and decent Bassboost Equalizer */
341
- BassboostHigh: EQBand[];
342
- /** A decent Bassboost Equalizer */
343
- BassboostMedium: EQBand[];
344
- /** A slight Bassboost Equalizer */
345
- BassboostLow: EQBand[];
346
- /** Makes the Music slightly "better" */
347
- BetterMusic: EQBand[];
348
- /** Makes the Music sound like rock music / sound rock music better */
349
- Rock: EQBand[];
350
- /** Makes the Music sound like Classic music / sound Classic music better */
351
- Classic: EQBand[];
352
- /** Makes the Music sound like Pop music / sound Pop music better */
353
- Pop: EQBand[];
354
- /** Makes the Music sound like Electronic music / sound Electronic music better */
355
- Electronic: EQBand[];
356
- /** Boosts all Bands slightly for louder and fuller sound */
357
- FullSound: EQBand[];
358
- /** Boosts basses + lower highs for a pro gaming sound */
359
- Gaming: EQBand[];
360
- };