AudioAnalyzer

非推奨を表示

AudioAnalyzer takes measurements from audio streams that are wired to it through Wire. It provides a single Input pin but does not produce any output streams.

概要

プロパティ

  • 読み取り専用
    複製されていません
    並列読み取り

    The loudest volume observed during the last audio buffer.

  • 読み取り専用
    複製されていません
    並列読み取り

    The root-mean-square average volume observed during the last audio buffer.

  • 並列読み取り

    Enables usage of GetSpectrum.

方法

プロパティ

PeakLevel

読み取り専用
複製されていません
並列読み取り

The loudest volume observed during the last audio buffer. This property changes often and thus does not fire changed events.

RmsLevel

読み取り専用
複製されていません
並列読み取り

The root-mean-square average volume observed during the last audio buffer. This property is generally more stable than PeakLevel but it may not capture momentary volume spikes.

SpectrumEnabled

並列読み取り

Enables usage of GetSpectrum(). If false, GetSpectrum() returns an empty array, but the CPU overhead of the AudioAnalyzer is dramatically reduced. This means that if you are only analyzing the volume of an audio stream, you can disable this property to improve performance.

方法

GetConnectedWires

Instances

Returns an array of Wires that are connected to the specified pin. AudioAnalyzer has one "Input" pin.

パラメータ

pin: string

戻り値

Instances

GetSpectrum

Returns the frequency spectrum of the last audio buffer, as an array of numbers. The elements of the array are root-mean-square volume levels, evenly spaced from 0 hertz to 24,000 hertz.


戻り値

イベント