audiomotion-analyzer 3.5.0-beta.0 → 3.6.0
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.
- package/Changelog.md +67 -37
- package/README.md +151 -65
- package/package.json +1 -1
- package/src/audioMotion-analyzer.js +515 -459
- package/src/index.d.ts +23 -7
package/Changelog.md
CHANGED
|
@@ -1,27 +1,57 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
-
## version 3.
|
|
4
|
+
## version 3.6.0 (2021-10-10)
|
|
5
5
|
|
|
6
|
-
### Added: {docsify-ignore}
|
|
6
|
+
### Added: <!-- {docsify-ignore} -->
|
|
7
7
|
|
|
8
|
-
+ [`
|
|
9
|
-
+ [`
|
|
8
|
+
+ [`alphaBars`](README.md#alphabars-boolean) effect, which is similar to `lumiBars` but preserves bars' amplitudes and also works on discrete frequencies mode and radial visualization;
|
|
9
|
+
+ [`outlineBars`](README.md#outlinebars-boolean) effect, which extends the usage of `lineWidth` and `fillAlpha` to octave bands modes;
|
|
10
|
+
+ [`isAlphaBars`](README.md#isalphabars-boolean-read-only) and [`isOutlineBars`](README.md#isoutlinebars-boolean-read-only) read-only properties.
|
|
10
11
|
|
|
11
|
-
###
|
|
12
|
+
### Changed: <!-- {docsify-ignore} -->
|
|
13
|
+
|
|
14
|
+
+ `showLeds` and `isLedDisplay` **have been deprecated** in favor of [`ledBars`](README.md#ledbars-boolean) and [`isLedBars`](README.md#isledbars-boolean-read-only), for consistent naming of effects.
|
|
15
|
+
|
|
16
|
+
### Fixed: <!-- {docsify-ignore} -->
|
|
17
|
+
|
|
18
|
+
+ [`getEnergy()`](README.md#getenergy-preset-startfreq-endfreq-) would not accept a fractionary initial frequency.
|
|
19
|
+
|
|
20
|
+
### Improved: <!-- {docsify-ignore} -->
|
|
21
|
+
|
|
22
|
+
+ Regenerate the current gradient if/when it is re-registered [(#21)](https://github.com/hvianna/audioMotion-analyzer/issues/21);
|
|
23
|
+
+ The [fluid demo](/demo/fluid.html) now shows the status of read-only flags, for better visualization of interactions between different properties.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## version 3.5.1 (2021-09-10)
|
|
27
|
+
|
|
28
|
+
+ Removed named tuples from the TS type definitions file, for improved compatibility [(#20)](https://github.com/hvianna/audioMotion-analyzer/issues/20).
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## version 3.5.0 (2021-07-15)
|
|
32
|
+
|
|
33
|
+
### Added: <!-- {docsify-ignore} -->
|
|
34
|
+
|
|
35
|
+
+ [`getBars()`](README.md#getbars) method, which provides real-time analyzer data;
|
|
36
|
+
+ [`useCanvas`](README.md#usecanvas-boolean) property to disable rendering to the canvas - thanks **@davay42** for [suggesting this feature](https://github.com/hvianna/audioMotion-analyzer/issues/19);
|
|
37
|
+
+ A tool to view/debug the generated octave bands - see the `/tools` folder.
|
|
38
|
+
|
|
39
|
+
### Improved: <!-- {docsify-ignore} -->
|
|
12
40
|
|
|
13
41
|
+ Fine-tuned generation of octave bands;
|
|
14
42
|
+ Improved FFT data interpolation;
|
|
15
|
-
+ Improved peak rendering when changing visualization modes
|
|
43
|
+
+ Improved peak rendering when changing visualization modes;
|
|
44
|
+
+ Added a simple piano keyboard to the test tones section of the "fluid" demo;
|
|
45
|
+
+ Added search funcionality to the documentation website.
|
|
16
46
|
|
|
17
47
|
|
|
18
48
|
## version 3.4.0 (2021-05-29)
|
|
19
49
|
|
|
20
|
-
### Added: {docsify-ignore}
|
|
50
|
+
### Added: <!-- {docsify-ignore} -->
|
|
21
51
|
|
|
22
52
|
+ [`fsElement`](README.md#fselement-htmlelement-object) constructor option, for easily handling fullscreen on any element.
|
|
23
53
|
|
|
24
|
-
### Fixed and improved: {docsify-ignore}
|
|
54
|
+
### Fixed and improved: <!-- {docsify-ignore} -->
|
|
25
55
|
|
|
26
56
|
+ Fixed radial analyzer too wide in vertical containers;
|
|
27
57
|
+ Fixed out of bounds bar in mode 0 (discrete frequencies) with `mirror` set to -1;
|
|
@@ -31,11 +61,11 @@ Changelog
|
|
|
31
61
|
|
|
32
62
|
## version 3.3.0 (2021-05-03)
|
|
33
63
|
|
|
34
|
-
### Added: {docsify-ignore}
|
|
64
|
+
### Added: <!-- {docsify-ignore} -->
|
|
35
65
|
|
|
36
|
-
+ New horizontal mirroring effect; see [`mirror`](README.md#mirror-number) property - thanks [
|
|
66
|
+
+ New horizontal mirroring effect; see [`mirror`](README.md#mirror-number) property - thanks **@lexterror** for [suggesting this feature](https://github.com/hvianna/audioMotion-analyzer/issues/16).
|
|
37
67
|
|
|
38
|
-
### Improvements: {docsify-ignore}
|
|
68
|
+
### Improvements: <!-- {docsify-ignore} -->
|
|
39
69
|
|
|
40
70
|
+ `colorStops` type definition updated for improved compatibility ([see #17](https://github.com/hvianna/audioMotion-analyzer/pull/17)) - props to [@Staijn1](https://github.com/Staijn1).
|
|
41
71
|
|
|
@@ -47,14 +77,14 @@ Changelog
|
|
|
47
77
|
|
|
48
78
|
## version 3.2.0 (2021-04-03)
|
|
49
79
|
|
|
50
|
-
### Added: {docsify-ignore}
|
|
80
|
+
### Added: <!-- {docsify-ignore} -->
|
|
51
81
|
|
|
52
|
-
+ [`getEnergy()`](README.md#getenergy-preset-startfreq-endfreq-) method - see it in action on [this pen](https://codepen.io/hvianna/pen/poNmVYo) - thanks [
|
|
82
|
+
+ [`getEnergy()`](README.md#getenergy-preset-startfreq-endfreq-) method - see it in action on [this pen](https://codepen.io/hvianna/pen/poNmVYo) - thanks **@Staijn1** for [suggesting this feature](https://github.com/hvianna/audioMotion.js/issues/12#issuecomment-733045035);
|
|
53
83
|
+ [`setLedParams()`](README.md#setledparams-params-) method, which allows you to customize the look of the LEDs - you can try it in the [fluid demo](https://audiomotion.dev/demo/fluid.html);
|
|
54
|
-
+ [`connectSpeakers`](README.md#connectspeakers-boolean) constructor option - thanks [
|
|
84
|
+
+ [`connectSpeakers`](README.md#connectspeakers-boolean) constructor option - thanks **@evoyy** for the [suggestion](https://github.com/hvianna/audioMotion-analyzer/issues/13);
|
|
55
85
|
+ [`connectedTo`](README.md#connectedto-array-read-only) read only property.
|
|
56
86
|
|
|
57
|
-
### Improvements: {docsify-ignore}
|
|
87
|
+
### Improvements: <!-- {docsify-ignore} -->
|
|
58
88
|
|
|
59
89
|
+ When passing an AudioNode in the `source` property of constructor, it's no longer necessary to explicitly provide the `audioCtx`, as it will be inferred from the source node - thanks [@evoyy](https://github.com/evoyy) for this idea;
|
|
60
90
|
+ Disconnecting the output from the speakers no longer prevents the analyzer from working on Chromium-based browsers;
|
|
@@ -63,7 +93,7 @@ Changelog
|
|
|
63
93
|
+ Refactored some code for improved legibility, performance and file size (still below 20kB minified! :sunglasses:);
|
|
64
94
|
+ Added compatibility with *standardized-audio-context* library - thanks [@richclingman](https://github.com/richclingman) for reporting this issue.
|
|
65
95
|
|
|
66
|
-
### Changed: {docsify-ignore}
|
|
96
|
+
### Changed: <!-- {docsify-ignore} -->
|
|
67
97
|
|
|
68
98
|
+ `energy` and `peakEnergy` properties have been **deprecated and will be removed in the next major release** - use `getEnergy()` and `getEnergy('peak')` instead;
|
|
69
99
|
+ FPS display font size is now scaled relatively to the canvas height;
|
|
@@ -72,18 +102,18 @@ Changelog
|
|
|
72
102
|
|
|
73
103
|
## version 3.1.0 (2021-02-27)
|
|
74
104
|
|
|
75
|
-
### Added: {docsify-ignore}
|
|
105
|
+
### Added: <!-- {docsify-ignore} -->
|
|
76
106
|
|
|
77
107
|
+ TypeScript definition file (props to [@alex-greff](https://github.com/alex-greff)).
|
|
78
108
|
|
|
79
|
-
### Improvements: {docsify-ignore}
|
|
109
|
+
### Improvements: <!-- {docsify-ignore} -->
|
|
80
110
|
|
|
81
111
|
+ Generate only the currently selected gradient on mode/gradient changes.
|
|
82
112
|
|
|
83
113
|
|
|
84
114
|
## version 3.0.0 (2020-11-28)
|
|
85
115
|
|
|
86
|
-
### BREAKING CHANGES: {docsify-ignore}
|
|
116
|
+
### BREAKING CHANGES: <!-- {docsify-ignore} -->
|
|
87
117
|
|
|
88
118
|
+ The `analyzer` object is no longer exposed - use the new [`connectInput()`](README.md#connectinput-source-) method to connect all audio sources and [`connectOutput()`](README.md#connectoutput-node-) to connect the analyzer output to other nodes;
|
|
89
119
|
+ `audioSource` property has been renamed to [`connectedSources`](README.md#connectedsources-array), which now returns an **array** of all connected audio sources;
|
|
@@ -93,7 +123,7 @@ Changelog
|
|
|
93
123
|
+ `showScale` property has been renamed to [`showScaleX`](README.md#showscalex-boolean);
|
|
94
124
|
+ `version` is now a **static** property and should always be accessed as [`AudioMotionAnalyzer.version`](README.md#audiomotionanalyzerversion-string-read-only).
|
|
95
125
|
|
|
96
|
-
### New features: {docsify-ignore}
|
|
126
|
+
### New features: <!-- {docsify-ignore} -->
|
|
97
127
|
|
|
98
128
|
+ Dual channel (stereo) analyzer option;
|
|
99
129
|
+ Built-in volume control;
|
|
@@ -110,20 +140,20 @@ Changelog
|
|
|
110
140
|
+ [`splitGradient`](README.md#splitgradient-boolean)
|
|
111
141
|
+ [`volume`](README.md#volume-number)
|
|
112
142
|
|
|
113
|
-
### Improvements: {docsify-ignore}
|
|
143
|
+
### Improvements: <!-- {docsify-ignore} -->
|
|
114
144
|
|
|
115
145
|
+ Automatically unlock/resume the AudioContext on first user click, so you don't need to handle this in your code anymore;
|
|
116
146
|
+ Improved FFT data interpolation on low frequencies (especially noticeable in 1/12th and 1/24th octave bands);
|
|
117
147
|
+ Corrected initial amplitude of line / area graph.
|
|
118
148
|
|
|
119
|
-
### Fixed: {docsify-ignore}
|
|
149
|
+
### Fixed: <!-- {docsify-ignore} -->
|
|
120
150
|
|
|
121
151
|
+ A compatibility issue that could cause `reflexRatio` not to work in some environments.
|
|
122
152
|
|
|
123
153
|
|
|
124
154
|
## version 2.5.0 (2020-10-07)
|
|
125
155
|
|
|
126
|
-
### Improvements: {docsify-ignore}
|
|
156
|
+
### Improvements: <!-- {docsify-ignore} -->
|
|
127
157
|
|
|
128
158
|
+ Behavior of the [`onCanvasResize`](README.md#oncanvasresize-function) callback is now consistent across different browsers. Changes worth of note:
|
|
129
159
|
1. on fullscreen changes, **only a `'fschange'` *reason* will be reported** to the callback function - no more redundant `'resize'` calls;
|
|
@@ -139,14 +169,14 @@ Changelog
|
|
|
139
169
|
|
|
140
170
|
## version 2.4.0 (2020-07-18)
|
|
141
171
|
|
|
142
|
-
### Added: {docsify-ignore}
|
|
172
|
+
### Added: <!-- {docsify-ignore} -->
|
|
143
173
|
|
|
144
|
-
+ New **Radial** visualization - see [`radial`](README.md#radial-boolean) and [`spinSpeed`](README.md#spinspeed-number) properties and try them in the [demos](https://audiomotion.dev/demo)!
|
|
174
|
+
+ New **Radial** visualization - see [`radial`](README.md#radial-boolean) and [`spinSpeed`](README.md#spinspeed-number) properties and try them in the [demos](https://audiomotion.dev/demo)! - thanks **@inglesuniversal** for [suggesting this feature](https://github.com/hvianna/audioMotion.js/issues/6);
|
|
145
175
|
+ [`showScaleY`](README.md#showscaley-boolean) property for displaying the level (dB) scale on the analyzer's vertical axis;
|
|
146
176
|
+ [`energy`](README.md#energy-number-read-only) and [`peakEnergy`](README.md#peakenergy-number-read-only) read-only properties;
|
|
147
177
|
+ [Known issues](README.md#known-issues) section added to the documentation.
|
|
148
178
|
|
|
149
|
-
### Changed: {docsify-ignore}
|
|
179
|
+
### Changed: <!-- {docsify-ignore} -->
|
|
150
180
|
|
|
151
181
|
+ [`setOptions()`](README.md#setoptions-options-) called with no argument now **resets all configuration options to their default values** (it used to raise an error);
|
|
152
182
|
+ The LED effect code has been refactored to improve appearance and compatibility with other (future) effects;
|
|
@@ -157,12 +187,12 @@ Changelog
|
|
|
157
187
|
|
|
158
188
|
## version 2.3.0 (2020-06-08)
|
|
159
189
|
|
|
160
|
-
### Added: {docsify-ignore}
|
|
190
|
+
### Added: <!-- {docsify-ignore} -->
|
|
161
191
|
|
|
162
192
|
+ [`binToFreq()`](README.md#bintofreq-bin-) and [`freqToBin()`](README.md#freqtobin-frequency-rounding-) methods;
|
|
163
193
|
+ [`reflexBright`](README.md#reflexbright-number) property, which allows to adjust the brightness of the reflected image.
|
|
164
194
|
|
|
165
|
-
### Changed: {docsify-ignore}
|
|
195
|
+
### Changed: <!-- {docsify-ignore} -->
|
|
166
196
|
|
|
167
197
|
+ Reverted the change to `reflexAlpha` introduced in [v2.2.1](https://github.com/hvianna/audioMotion-analyzer/releases/tag/2.2.1)
|
|
168
198
|
+ Removed the forced black layer off the reflection background.
|
|
@@ -170,7 +200,7 @@ Changelog
|
|
|
170
200
|
|
|
171
201
|
## version 2.2.1 (2020-05-31)
|
|
172
202
|
|
|
173
|
-
### Changed: {docsify-ignore}
|
|
203
|
+
### Changed: <!-- {docsify-ignore} -->
|
|
174
204
|
|
|
175
205
|
+ ~~Improved the Reflex effect in [`overlay`](README.md#overlay-boolean) mode - the [`reflexAlpha`](README.md#reflexalpha-number) property is
|
|
176
206
|
now used to adjust the opacity of a dark layer applied *over* the reflection area, which prevents undesired transparency of the reflection itself
|
|
@@ -178,33 +208,33 @@ and creates a consistent effect, whether overlay mode is on or off~~ **(reverted
|
|
|
178
208
|
|
|
179
209
|
+ The package source code has been moved from the `dist` to the `src` folder.
|
|
180
210
|
|
|
181
|
-
### Fixed: {docsify-ignore}
|
|
211
|
+
### Fixed: <!-- {docsify-ignore} -->
|
|
182
212
|
|
|
183
213
|
+ Prevent showing leds below the 0 level, when both reflex and overlay are active.
|
|
184
214
|
|
|
185
215
|
|
|
186
216
|
## version 2.2.0 (2020-05-19)
|
|
187
217
|
|
|
188
|
-
### Added: {docsify-ignore}
|
|
218
|
+
### Added: <!-- {docsify-ignore} -->
|
|
189
219
|
|
|
190
220
|
+ New [`overlay`](README.md#overlay-boolean) and [`bgAlpha`](README.md#bgalpha-number) properties allow displaying the analyzer over other contents.
|
|
191
221
|
[Check out the new demo!](https://audiomotion.dev/demo/overlay.html)
|
|
192
222
|
|
|
193
|
-
### Changed: {docsify-ignore}
|
|
223
|
+
### Changed: <!-- {docsify-ignore} -->
|
|
194
224
|
|
|
195
225
|
+ Corrected the documentation for the [`registerGradient()`](README.md#registergradient-name-options-) method, which stated the `bgColor` property was required (it has always been optional).
|
|
196
226
|
|
|
197
227
|
|
|
198
228
|
## version 2.1.0 (2020-04-06)
|
|
199
229
|
|
|
200
|
-
### Added: {docsify-ignore}
|
|
230
|
+
### Added: <!-- {docsify-ignore} -->
|
|
201
231
|
|
|
202
232
|
+ Customizable Reflex effect - see [`reflexRatio`](README.md#reflexratio-number) and try it in the [demo](https://audiomotion.dev/demo/fluid.html).
|
|
203
233
|
|
|
204
234
|
|
|
205
235
|
## version 2.0.0 (2020-03-24)
|
|
206
236
|
|
|
207
|
-
### Added: {docsify-ignore}
|
|
237
|
+
### Added: <!-- {docsify-ignore} -->
|
|
208
238
|
|
|
209
239
|
+ New [`lineWidth`](README.md#linewidth-number) and [`fillAlpha`](README.md#fillalpha-number) properties for [mode 10](README.md#mode-number) customization, so it can now work as an area graph (default), a line graph or a combination of both;
|
|
210
240
|
+ New [`barSpace`](README.md#barspace-number) property for customizable bar spacing in octave bands modes;
|
|
@@ -212,7 +242,7 @@ and creates a consistent effect, whether overlay mode is on or off~~ **(reverted
|
|
|
212
242
|
+ Custom [error codes](README.md#custom-errors);
|
|
213
243
|
+ New [`version`](README.md#version-string-read-only) property;
|
|
214
244
|
|
|
215
|
-
### Changed: {docsify-ignore}
|
|
245
|
+
### Changed: <!-- {docsify-ignore} -->
|
|
216
246
|
|
|
217
247
|
+ Increased default spacing between bars in octave bands modes - to get the previous look, set [`barSpace`](README.md#barspace-number) to **1**;
|
|
218
248
|
+ Improved accuracy when positioning the X-axis scale labels in octave bands modes;
|
|
@@ -221,13 +251,13 @@ and creates a consistent effect, whether overlay mode is on or off~~ **(reverted
|
|
|
221
251
|
+ Several functions were refactored for improved legibility, memory usage and performance;
|
|
222
252
|
+ Improved documentation and demos;
|
|
223
253
|
|
|
224
|
-
### Fixed: {docsify-ignore}
|
|
254
|
+
### Fixed: <!-- {docsify-ignore} -->
|
|
225
255
|
|
|
226
256
|
+ The multi-instance demo should now work on browsers other than Firefox (it now uses a shared audio context);
|
|
227
257
|
+ `isFullscreen` property now correctly reads `false` (instead of `undefined`) when the analyzer is not in fullscreen (*potentially breaking change*);
|
|
228
258
|
+ Setting one of the callback functions to `undefined` with `setOptions()` now properly unregisters the callback (*potentially breaking change*);
|
|
229
259
|
|
|
230
|
-
### API breaking changes: {docsify-ignore}
|
|
260
|
+
### API breaking changes: <!-- {docsify-ignore} -->
|
|
231
261
|
|
|
232
262
|
+ `audioCtx`, `analyzer`, `canvas` and `canvasCtx` objects are now read-only (`canvasCtx` properties may be safely modified while inside the callback for `onCanvasDraw`);
|
|
233
263
|
+ `frame` and `time` properties are not exposed anymore, as they are intended for internal use only;
|