Search code examples
javascriptweb-audio-api

Web Audio filter for visuals and not sound


How would I use a filter on the AnalyserNode data without that filter effecting the song that is being played?


Solution

  • If I understand correctly what you want, insert your filter before the AnalyserNode, but don't connect the AnalyserNode to anything. If your original graph had the output of the AnalyserNode feeding other parts, you'll have to reroute the signal so that it goes to where the Analyser used to go. Be sure to take the signal before the filter, of course.