High-resolution real-time graphic audio spectrum analyzer JavaScript module with no dependencies.
canvas
property in the constructor options to use your own canvas - thanks @orangecoding for the suggestion;getOptions()
- retrieve all analyzer settings as an options object. Also added a getOptions() button to fluid and multi demos to copy the current settings to the clipboard - thanks @biigpongsatorn for the suggestion;radialInvert
- render radial spectrum bars towards the center of the screen;radius
- customize the size of the radial spectrum - thanks @orangecoding for the suggestion.start
has been explicitly marked as a constructor-specific property in the Options object description and will no longer work with setOptions()
as of the next major release.channelLayout
;maxFPS
frame rate throttling.stopTracks
argument to disconnectInput()
- thanks @hookedupjoe (#52);destroy()
- thanks @lucienimmink for the suggestion;maxFPS
- set the maximum desired animation frame rate;peakLine
- show peaks as a continuous line for Graph mode
;start()
and stop()
methods.package.json
- thanks @cprussin (#54).roundBars
is combined with mirror
and radial
;Array.findLastIndex()
to restore compatibility with not-so-recent browsers.colorMode
- additional options for coloring analyzer bars: by bar amplitude (level) or bar position (index);roundBars
- rounded corner analyzer bars;isRoundBars
read-only property;trueLeds
- your LED bars now more vintage than ever!level
property for registered gradients.noteLabels
) - label sizes were slightly reduced in fullscreen;Removed deprecated properties:
energy
~ - use getEnergy()
insteadisLedDisplay
~ - use isLedBars
insteadpeakEnergy
~ - use getEnergy('peak')
insteadshowLeds
~ - use ledBars
insteadgetBars()
now includes an additional freq
property for each element, representing the center frequency of the band.
In addition, the range of each band has been adjusted so that frequencies that were previously at the lower edge (freqLo
) are now located at the center of the band.
stereo
has been DEPRECATED and will be removed in version 5 - use channelLayout
instead.
ansiBands
- use ANSI/IEC preferred frequencies for the octave bands;channelLayout
- adds option for dual channel combined spectrum, with both channel graphs overlaid;frequencyScale
- adds linear and perceptual (Bark/Mel) frequency scales;gradientLeft
and gradientRight
- allow to select different gradients for each channel;isBandsMode
read-only property;linearAmplitude
- use linear values instead of dB for spectrum amplitudes;linearBoost
- amplify low energy values when using linear amplitude;noteLabels
- display musical note labels instead of frequency values on the X-axis;weightingFilter
- select from five different weighting filters for improved spectrum visualization;Thank you @jonathan-annett (#28) and @TF3RDL (#30 and #38) for the suggestions that led to the implementation of several of these new features.
reflexRatio
> 0.ansiBands
, to properly match the bands' center frequencies;onCanvasDraw
callback is now passed an additional object with timestamp and gradients information;splitGradient
now works for horizontal gradients in radial
visualization;maxFreq
is now capped to half the AudioContext's sample rate (Nyquist frequency);New in 4.0.0-beta.5:
channelLayout
modes changed from camelCase to hyphen-separated words;
overlay
display in dual-combined channel layout;