Skip to content

Audio Document: Why .filters expects BiquadFilterNodes not AudioNode? #20145

@takahirox

Description

@takahirox
Description of the problem

Audio Document mentions that in Audio.filters

.filters : Array
Represents an array of BiquadFilterNodes.

but why .filters expects BiquadFilterNodes array, not generic AudioNode array?

Audio.setFilters looks just composing a chain of array elements with this.filters[ i - 1 ].connect( this.filters[ i ] );. Then I think we don't need to limit filters to BiquadFilterNodes and we may accept generic AudioNode.

Actually I set AnalyserNode as filters in my project and it works. (Because of a certain reason, I want to insert AnalyserNode right after audio source then I couldn't use THREE.AudioAnalyser.)

So, I'd like to suggest to replace BiquadFilterNodes with AudioNode for filters in Audio document unless there is a strong reason why it limits to BiquadFilterNodes.

Three.js version
  • Dev
  • r119
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions