alphaBarseffect, which is similar tolumiBarsbut preserves bars' amplitudes and also works on discrete frequencies mode and radial visualization;outlineBarseffect, which extends the usage oflineWidthandfillAlphato octave bands modes;isAlphaBarsandisOutlineBarsread-only properties.
showLedsandisLedDisplayhave been deprecated in favor ofledBarsandisLedBars, for consistent naming of effects.
getEnergy()would not accept a fractionary initial frequency.
- Regenerate the current gradient if/when it is re-registered (#21);
- The fluid demo now shows the status of read-only flags, for better visualization of interactions between different properties.
- Removed named tuples from the TS type definitions file, for improved compatibility (#20).
getBars()method, which provides real-time analyzer data;useCanvasproperty to disable rendering to the canvas - thanks @davay42 for suggesting this feature;- A tool to view/debug the generated octave bands - see the
/toolsfolder.
- Fine-tuned generation of octave bands;
- Improved FFT data interpolation;
- Improved peak rendering when changing visualization modes;
- Added a simple piano keyboard to the test tones section of the "fluid" demo;
- Added search funcionality to the documentation website.
fsElementconstructor option, for easily handling fullscreen on any element.
- Fixed radial analyzer too wide in vertical containers;
- Fixed out of bounds bar in mode 0 (discrete frequencies) with
mirrorset to -1; - Improved fullscreen rendering in portrait orientation displays;
- Improved font size adjustment for scale labels and FPS display on vertical containers.
- New horizontal mirroring effect; see
mirrorproperty - thanks @lexterror for suggesting this feature.
- Fixes an undefined property error.
getEnergy()method - see it in action on this pen - thanks @Staijn1 for suggesting this feature;setLedParams()method, which allows you to customize the look of the LEDs - you can try it in the fluid demo;connectSpeakersconstructor option - thanks @evoyy for the suggestion;connectedToread only property.
- When passing an AudioNode in the
sourceproperty of constructor, it's no longer necessary to explicitly provide theaudioCtx, as it will be inferred from the source node - thanks @evoyy for this idea; - Disconnecting the output from the speakers no longer prevents the analyzer from working on Chromium-based browsers;
- Expose the
GradientOptionsTypeScript interface for user scripts (props to @Staijn1); - Improved the look of the LEDs effect in very small containers (like in the multi-instance demo), especially when
loResis active; - Refactored some code for improved legibility, performance and file size (still below 20kB minified! 😎);
- Added compatibility with standardized-audio-context library - thanks @richclingman for reporting this issue.
energyandpeakEnergyproperties have been deprecated and will be removed in the next major release - usegetEnergy()andgetEnergy('peak')instead;- FPS display font size is now scaled relatively to the canvas height;
pixelRatiois now correctly reported for HiDPI devices with screen height <= 1080px.
- TypeScript definition file (props to @alex-greff).
- Generate only the currently selected gradient on mode/gradient changes.
- The
analyzerobject is no longer exposed - use the newconnectInput()method to connect all audio sources andconnectOutput()to connect the analyzer output to other nodes; audioSourceproperty has been renamed toconnectedSources, which now returns an array of all connected audio sources;binToFreq()andfreqToBin()methods have been removed;connectAudio()method has been replaced byconnectInput(), which now accepts either an HTML media element or any instance of AudioNode;dataArrayproperty is no longer exposed;showScaleproperty has been renamed toshowScaleX;versionis now a static property and should always be accessed asAudioMotionAnalyzer.version.
- Dual channel (stereo) analyzer option;
- Built-in volume control;
- New methods for easy connection/disconnection of input and output nodes:
- New properties:
isOctaveBands(read only)isLedDisplay(read only)isLumiBars(read only)stereosplitGradientvolume
- Automatically unlock/resume the AudioContext on first user click, so you don't need to handle this in your code anymore;
- Improved FFT data interpolation on low frequencies (especially noticeable in 1/12th and 1/24th octave bands);
- Corrected initial amplitude of line / area graph.
- A compatibility issue that could cause
reflexRationot to work in some environments.
- Behavior of the
onCanvasResizecallback is now consistent across different browsers. Changes worth of note:- on fullscreen changes, only a
'fschange'reason will be reported to the callback function - no more redundant'resize'calls; - the callback function is now executed only when canvas dimensions effectively change from the previous state - for example,
setting
loResorwidthto the same value they already have won't trigger a callback;
- on fullscreen changes, only a
- Canvas dimensions are now properly updated whenever the container element is resized, not only on window resize;
audioSourcenow returns the first audio source connected viaconnectAudio()method, if no source was provided during instantiation;- Size of scale labels on both axes is now scaled relatively to the canvas height;
- Added a new demo with only the minimal code required to use audioMotion-analyzer;
- Demo scripts are now loaded as native ES6 modules and no longer require bundling. See the README file for instructions on running the demos locally.
- New Radial visualization - see
radialandspinSpeedproperties and try them in the demos! - thanks @inglesuniversal for suggesting this feature; showScaleYproperty for displaying the level (dB) scale on the analyzer's vertical axis;energyandpeakEnergyread-only properties;- Known issues section added to the documentation.
setOptions()called with no argument now resets all configuration options to their default values (it used to raise an error);- The LED effect code has been refactored to improve appearance and compatibility with other (future) effects;
- "Unlit" LEDs are no longer displayed in overlay mode - see the notice in
showBgColordocumentation; - Canvas
fillStyleandstrokeStyleproperties are now set with the current gradient before calling theonCanvasDrawcallback function; - Updated all demos with more straightforward access to configuration options.
binToFreq()andfreqToBin()methods;reflexBrightproperty, which allows to adjust the brightness of the reflected image.
- Reverted the change to
reflexAlphaintroduced in v2.2.1 - Removed the forced black layer off the reflection background.
-
Improved the Reflex effect in(reverted in v2.3.0);overlaymode - thereflexAlphaproperty is now used to adjust the opacity of a dark layer applied over the reflection area, which prevents undesired transparency of the reflection itself and creates a consistent effect, whether overlay mode is on or off -
The package source code has been moved from the
distto thesrcfolder.
- Prevent showing leds below the 0 level, when both reflex and overlay are active.
- New
overlayandbgAlphaproperties allow displaying the analyzer over other contents. Check out the new demo!
- Corrected the documentation for the
registerGradient()method, which stated thebgColorproperty was required (it has always been optional).
- Customizable Reflex effect - see
reflexRatioand try it in the demo.
- New
lineWidthandfillAlphaproperties for mode 10 customization, so it can now work as an area graph (default), a line graph or a combination of both; - New
barSpaceproperty for customizable bar spacing in octave bands modes; - You can now provide an external AudioContext via
audioCtxproperty in the constructor'soptions, allowing you to share the same context among different instances; - Custom error codes;
- New
versionproperty;
- Increased default spacing between bars in octave bands modes - to get the previous look, set
barSpaceto 1; - Improved accuracy when positioning the X-axis scale labels in octave bands modes;
- Slightly improved vertical usage of canvas when the LED effect is active (removed the black line at the bottom of the screen);
- Canvas context is now saved before calling the user callback function and restored afterwards, to avoid undesirable changes;
- Several functions were refactored for improved legibility, memory usage and performance;
- Improved documentation and demos;
- The multi-instance demo should now work on browsers other than Firefox (it now uses a shared audio context);
isFullscreenproperty now correctly readsfalse(instead ofundefined) when the analyzer is not in fullscreen (potentially breaking change);- Setting one of the callback functions to
undefinedwithsetOptions()now properly unregisters the callback (potentially breaking change);
audioCtx,analyzer,canvasandcanvasCtxobjects are now read-only (canvasCtxproperties may be safely modified while inside the callback foronCanvasDraw);frameandtimeproperties are not exposed anymore, as they are intended for internal use only;registerGradient()method now enforces thenameargument being a non-emptystring(throws an error otherwise);- Errors now return a custom object and some error messages have changed - use the new
codeproperty to identify errors in a reliable way.
- Improves the look of bars at lower frequencies in octave bands modes (especially 1/12th and 1/24th);
- Minor tweak to the "Rainbow" gradient to make cyan and blue shades a little more balanced.
- New Area fill visualization mode (
mode: 10), which uses the same full-frequency data of the discrete frequencies mode, but generates a brighter filled shape; - New Luminance Bars option (
lumiBars: <boolean>) for octave bands modes, which displays analyzer bars always at full-height, with varying luminance instead.
- Minor cleanup to optimize npm package size.
- First stable release.
- Release candidate for v1.0.0