AudioLevel plugin AudioLevelプラグイン

Plugin=AudioLevel monitors and analyzes streams of audio sound to or from an audio endpoint.Plugin=AudioLevel オーディオエンドポイントとの間でやり取りされるオーディオサウンドのストリームを監視および分析します。

AudioLevel will monitor, filter and analyze the amplitude (volume level) of sound input or output on the default or defined device and channels. The value returned will be a number from 0.0 to 1.0, which will be treated as a percentage for use in meters.AudioLevelは、デフォルトまたは定義されたデバイスおよびチャンネルでの音声入力または出力の振幅(音量レベル)を監視、フィルタリング、および分析します。返される値は0.0から1.0までの数値になります。これは、メートル単位の使用として扱われます。

This can be used to create a volume level VU Meter for defined channels, or optionally can filter the audio stream into distinct frequency bands to create a Spectrum Analyzer.これは、定義されたチャンネルの音量レベルのVUメーターを作成するために使用することができます。または、スペクトラムアナライザーを作成するためにオーディオストリームを個別の周波数帯域にフィルターすることができます。

The plugin monitors the amplitude of the post-mixer signal at a Windows audio endpoint. (i.e. sound card speaker output, USB audio interface, headphone port, microphone input) It does this by creating a WASAPI capture client in loopback mode. The capture client streams audio data to the plugin where it can be filtered and measured. The resulting volume level is returned by the plugin for use in Rainmeter measures and meters.このプラグインは、Windowsオーディオエンドポイントでポストミキサー信号の振幅を監視します。(すなわち、サウンドカードスピーカー出力、USBオーディオインターフェース、ヘッドフォンポート、マイク入力)これは、ループバックモードWASAPIキャプチャクライアントを作成することによってこれを行います。キャプチャクライアントは、オーディオデータをプラグインにストリーミングし、そこでフィルタ処理して測定できます。結果として得られる音量レベルは、Rainmeterのメジャーおよびメーターで使用するためにプラグインによって返されます。

Note: Creating meters that display sound levels in real-time will require that the skin be set with a fairly low Update rate in the [Rainmeter] section of the skin. While the plugin is quite resource friendly and efficient, some care should be taken when deciding how much analysis should be done on the signal, and it is recommended that this plugin be used in a skin dedicated to it, and not as a part of a larger skin where the low update rate may cause higher CPU usage.注意:サウンドレベルをリアルタイムで表示するメーターを作成するには、スキンの[Rainmeter]セクションでかなり低い更新レートでスキンを設定する必要があります。プラグインは非常にリソースに優しく効率的ですが、信号に対してどの程度の分析を行うべきかを決定するときは注意が必要です。このプラグインは専用のスキンとしてではなく、使用することをお勧めします。更新レートが低いとCPU使用率が高くなる可能性がある大きなスキン。

Usage使用法

AudioLevel operates with a "parent / child" approach. A single "parent" AudioLevel measure is used to obtain and analyze the audio stream, and then as many "child" measures as desired request data from the parent to get individual values to display in meters. Example:AudioLevelは「親/子」アプローチで動作します。単一の「親」AudioLevel測定値を使用してオーディオストリームを取得して分析し、次に必要な数の「子」測定値を親からデータを要求して個々の値をメートル単位で表示します。例:

; This parent measure processes the default audio output.
[MeasureAudioRaw]
Measure=Plugin
Plugin=AudioLevel

; This child measure gets the current RMS value of the left channel (0.0 to 1.0).
[MeasureAudioRMS_L]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudioRaw
Channel=L
Type=RMS

; This child measure gets the current RMS value of the right channel (0.0 to 1.0).
[MeasureAudioRMS_R]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudioRaw
Channel=R
Type=RMS

Note: Only the Type, Channel, FFTIdx and BandIdx child measure options can be changed dynamically with !SetVariable or !SetOption. Parent measure options may not be changed dynamically.注:のみTypeChannelFFTIdxBandIdx!子対策オプションははSetVariableやSetOptionメソッドを動的に変更することができます。親指標のオプションは動的には変更できません。

Optionsオプション

General measure options一般的な測定オプション

All general measure options are valid.一般的な測定オプションはすべて有効です。

Parent measure options親測定値オプション

Port Default: OutputPort デフォルト: Output

Specifies whether you want to measure the input or output levels for the given device.特定のデバイスの入力レベルと出力レベルのどちらを測定するかを指定します。

  • Output (default)Output (デフォルト)
  • Input
ID Default: NoneID デフォルト: None

Specifies the audio device to measure.測定するオーディオデバイスを指定します。

If not set, it will use the default device for the specified Port. If you specify Port=Output and no ID, the plugin will connect to the default audio output device defined in Windows.設定されていない場合は、指定されたポートにデフォルトのデバイスを使用します。Port=Outputno を指定した場合ID、プラグインはWindowsで定義されているデフォルトのオーディオ出力デバイスに接続します。

To specify a device other than the default, you will need to find the Windows device ID. See the DeviceList child measure option for more info.デフォルト以外のデバイスを指定するには、WindowsのデバイスIDを見つける必要があります。詳細については、DeviceList子尺度オプションを参照してください。

Device IDs will be in the form: {0.0.0.00000000}.{5c106e65-26b4-4d05-a9bf-b207a71e9eaa}デバイスIDは次の形式になります。 {0.0.0.00000000}.{5c106e65-26b4-4d05-a9bf-b207a71e9eaa}

Note: The default audio device in Windows can be changed by using "Manage Audio Devices" from the Windows Start menu.注意: Windowsのデフォルトのオーディオデバイスは、Windowsのスタートメニューから「オーディオデバイスの管理」を使用して変更できます。

RMS optionsRMSオプション

RMS is a way of calculating the average of values over a period of time, using the mathematical algorithm Root Mean Square. The signal value (amplitude) is squared, averaged over a period of time, then the square root of the result is calculated. The result is a value, that when squared, is related (proportional) to the effective power of the signal.RMSは、数学的アルゴリズムの二乗平均平方根を使用して、一定期間にわたる値の平均を計算する方法です。信号値(振幅)は二乗され、ある期間にわたって平均されてから、結果の平方根が計算されます。結果は、2乗されたときに信号の実効電力に関連する(比例する)値です。

This is the most meaningful way of measuring audio volume levels in a skin.これは、スキンの音量レベルを測定する最も意味のある方法です。

Note: To disable all RMS filtering, set both RMSAttack and RMSDecay to 0, and RMSGain as the default 1.0.注:すべてのRMSフィルタリングを無効にするには、RMSAttackRMSDecayの両方を0に、RMSGainを既定値に設定します1.0

The following parent options are used in combination with child measures having the Type=RMS option set.次の親オプションは、Type=RMSオプションが設定されている子数値データと組み合わせて使用??されます。

RMSAttack Default: 300RMSAttack デフォルト: 300

Specifies the time in milliseconds over which to interpolate as the signal level increases. For example, how quickly a needle jumps up as the sound level increases.信号レベルが増加したときに補間する時間をミリ秒単位で指定します。たとえば、音のレベルが上がるにつれて針がどれだけ早く飛び上がるかなどです。

RMSDecay Default: 300RMSDecay デフォルト: 300

Specifies the time in milliseconds over which to interpolate as the signal level decreases. For example, how quickly a needle subsides as the sound level decreases.信号レベルが低下したときに補間する時間をミリ秒単位で指定します。たとえば、音のレベルが下がるにつれて針がどれだけ速く沈むかなどです。

RMSGain Default: 1.0RMSGain デフォルト: 1.0

A multiplication factor that will be applied to the RMS analysis.RMS解析に適用される乗算係数。

Peak optionsピークオプション

Peak options are similar to RMS options, but measure the peak (high) values rather than squaring to obtain an average over a period of time.ピークオプションはRMSオプションと似ていますが、ある期間にわたる平均を得るために二乗するのではなくピーク(高い)値を測定します

Note: To disable all Peak filtering, set both PeakAttack and PeakDecay to 0, and PeakGain as the default 1.0.注:すべてのPeakフィルタリングを無効にするには、PeakAttackPeakDecayの両方を0に、PeakGainをデフォルトに設定します1.0

The following parent options are used in combination with child measures having the Type=Peak option set.次の親オプションは、Type=Peakオプションが設定されている子数値データと組み合わせて使用??されます。

PeakAttack Default: 50PeakAttack デフォルト: 50

Specifies the time in milliseconds over which to interpolate as the signal level increases. For example, how quickly a needle jumps up for a higher peak.信号レベルが増加したときに補間する時間をミリ秒単位で指定します。たとえば、ニードルがより高いピークにどれだけ早くジャンプするかなどです。

PeakDecay Default: 2500PeakDecay デフォルト: 2500

Specifies the time in milliseconds over which to interpolate as the signal level decreases. For example, how quickly a needle subsides to a lower peak.信号レベルが低下したときに補間する時間をミリ秒単位で指定します。たとえば、針がどれだけ早く下のピークに沈むかなどです。

PeakGain Default: 1.0PeakGain デフォルト: 1.0

A multiplication factor that will be applied to the Peak analysis.ピーク分析に適用される倍率。

FFT optionsFFTオプション

FFT options transform the signal from the time domain to the frequency domain, with FTTSize determining how many points you get back in the frequency domain. This is done by analyzing the audio stream into a linear-based number of points using the mathematical algorithm Fast Fourier Transform.FFTオプションは、周波数領域でFTTSize何ポイント戻ったかを判断して、信号を時間領域から周波数領域に変換します。これは、数学的アルゴリズムである高速フーリエ変換を使用して、オーディオストリームを線形ベースの数のポイントに分析することによって行われます。

This frequency information can then optionally be extrapolated into logarithm-based Bands to distinctly measure by frequency in the ranges that are the most useful for spectrum display, based on the way humans detect changes in sound.次に、この周波数情報は、Bands人間が音の変化を検出する方法に基づいて、スペクトル表示に最も有用な範囲の周波数によって明確に測定するために、対数に外挿することもできます。

In order to use Bands, both FFTSize and Bands must be set on the parent measure.使用するにはBands、両方FFTSizeBands親メジャーに設定する必要があります。

The following parent options are used in combination with child measures having the Type=FFTand FFTIdx or Type=Band and BandIdx options set.次の親オプションは、Type=FFTand FFTIdxまたはType=Bandand BandIdxオプションが設定されている子メジャーと組み合わせて使用??されます。

FFTSize Default: 0FFTSize デフォルト: 0

A number value for the frequency resolution of the output data.出力データの周波数分解能の数値。

This will be an even integer greater than or equal to 0, usually a power of 2. Typical values are 256, 512, or 1024, with the higher the number the greater the frequency resolution.

Note: It should be kept in mind that as this number increases, more CPU resources and time will be needed to analyze the audio stream. A very high number here can both impact CPU usage and potentially cause some "lag" between the sound generation and the measurement by the plugin.これは0以上の偶数の整数、通常は2の累乗です。一般的な値は256、512、または1024です。数値が大きいほど周波数分解能が高くなります。

注:この数が増えると、オーディオストリームを分析するために多くのCPUリソースと時間が必要になることに注意してください。非常に高い数値は、CPU使用率に影響を与え、サウンド生成とプラグインによる測定との間に「遅れ」を引き起こす可能性があります。

FFTOverlap Default: 0FFTOverlap デフォルト: 0

Optionally, the FFT can be windowed to overlap successive sections. A Hann function is used to shape the data before the FFT is applied. Typical values are half the FFTSize. Increasing this value will lower the latency between the audio and the measure's response, at the cost of extra CPU.オプションとして、FFTは連続したセクションに重なるようにウィンドウ処理することができます。ハン関数はFFTが適用される前に、データを整形するために使用されます。典型的な値はFFTSizeの半分です。この値を大きくすると、オーディオと小節の応答の間のレイテンシが短くなりますが、余分なCPUが必要になります。

FFTAttack Default: 300FFTAttack デフォルト: 300

Specifies the time in milliseconds over which to interpolate as the signal level increases. For example, how quickly a needle jumps up for a higher level.信号レベルが増加したときに補間する時間をミリ秒単位で指定します。たとえば、針がどれだけ早く上のレベルにジャンプするかなどです。

FFTDecay Default: 300FFTDecay デフォルト: 300

Specifies the time in milliseconds over which to interpolate as the signal level decreases. For example, how quickly a needle subsides to a lower level.信号レベルが低下したときに補間する時間をミリ秒単位で指定します。例えば、針がどれだけ早く沈静化するかなどです。

Bands Default: 0Bands デフォルト: 0

An integer, specifying the number of frequency bands to generate.生成する周波数帯の数を指定する整数。

The FFT data can be extrapolated into a number of log-spaced frequency bands, similar to a typical spectrum analyzer. This option specifies the number of bands to create.FFTデータは、一般的なスペクトラムアナライザと同様に、対数間隔で配置された複数の周波数帯に外挿することができます。このオプションは作成するバンドの数を指定します。

FreqMin Default: 20FreqMin デフォルト: 20

A number in Hz, specifying the minimum frequency band calculation.最小周波数帯域計算を指定するHz単位の数値。

FreqMax Default: 20000FreqMax デフォルト: 20000

A number in Hz, specifying the maximum frequency band calculation.最大周波数帯域計算を指定するHz単位の数値。

Sensitivity Default: 35.0Sensitivity デフォルト: 35.0

A number specifying in what dB range the measure will return FFT and Band data. Increasing this value will cause the measure to respond to quieter sounds, decreasing it will only trigger the measure on louder sounds.メジャーが返すdB範囲FFTBandデータを指定する数値。この値を大きくすると、小節は静かな音に反応し、小さくすると大きな音でのみ小節がトリガーされます。

Child measure options子ども対策の選択肢

Parent Required

Defines the parent AudioLevel plugin measure to read values from.値を読み取る親AudioLevelプラグインメジャーを定義します。

Example: Parent=SomeMeasureName例: Parent=SomeMeasureName

Channel Default: SumChannel デフォルト: Sum

This specifies which audio channel level to read from the parent. Channels can be identified by name or number, e.g. Channel=0 is the same as Channel=L or Channel=FL.これは、親からどのオーディオチャンネルレベルを読むかを指定します。チャネルは名前または番号で識別できます。たとえばChannel=0Channel=Lまたはと同じChannel=FLです。

  • L or FL or 0LまたはFLまたは0
  • R or FR or 1RまたはFRまたは1
  • C or 2C または 2
  • LFE or Sub or 3LFEまたはSubまたは3
  • BL or 4BL または 4
  • BR or 5BR または 5
  • SL or 6SL または 6
  • SR or 7SR または 7
  • Sum or AvgSum または Avg
Type Required

Specifies the type of data to retrieve from the parent measure.親メジャーから取得するデータの種類を指定します。

  • RMS : The current RMS level (0.0 to 1.0) corresponding to the specified Channel.RMS:指定されたに対応する現在のRMSレベル(0.0〜1.0)Channel
  • Peak : The current Peak level (0.0 to 1.0) corresponding to the specified Channel.Peak:指定したに対応する現在のピークレベル(0.0〜1.0)Channel
  • FFT : The current FFT level (0.0 to 1.0) corresponding to the specified FFTIdx option.FFT:指定されたFFTIdxオプションに対応する現在のFFTレベル(0.0〜1.0)。
  • FFTFreq : The frequency in Hz corresponding to the specified FFTIdx option.FFTFreq:指定されたFFTIdxオプションに対応する周波数(Hz)。
  • Band : The current FFT level (0.0 to 1.0) value corresponding to the specified BandIdx option.Band:指定されたBandIdxオプションに対応する現在のFFTレベル(0.0〜1.0)の値。
  • BandFreq : The frequency in Hz corresponding to the specified BandIdx option.BandFreq:指定されたBandIdxオプションに対応する周波数(Hz)。
  • Format : A string describing the audio format of the device connected to with the parent ID option.Format:親IDオプションで接続されている機器の音声フォーマットを説明する文字列。
  • DeviceStatus : Status (0 or 1) of the device connected to with the parent ID option.DeviceStatus:親IDオプションで接続している機器の状態(0または1)。
  • DeviceName : A string with the name of the device connected to with the parent ID option.DeviceName:親IDオプションで接続されているデバイスの名前を含む文字列。
  • DeviceID : A string with the Windows ID of the device connected to with the parent ID option.DeviceID:親IDオプションで接続されているデバイスのWindows IDを含む文字列。
  • DeviceList : A string with a list of all available device IDs for the specified Port This can be used to identify a desired device ID for use in the parent ID option.DeviceList:指定されたデバイスで利用可能なすべてのデバイスIDのリストを含む文字列。Portこれは、親IDオプションで使用するための目的のデバイスIDを識別するために使用できます。

Example: Type=RMS例: Type=RMS

FFTIdx Default: 0FFTIdx デフォルト: 0

Specifies which FFT point you want to extract from the parent. FFTSize must be enabled on the parent measure to use this option.親からどのFFT点を抽出するかを指定します。FFTSizeこのオプションを使用するには、親指標で有効にする必要があります。

Valid values range from 0 to (FFTSize/2).有効値は0から(FFTSize / 2)までです。

BandIdx Default: 0BandIdx デフォルト: 0

Specifies which frequency band number, starting with 0, you want to extract from the parent. FFTSize and Bands must be enabled on the parent measure to use this option.0から始まる、親から抽出する周波数帯の番号を指定します。FFTSizeそしてBandsこのオプションを使用するには、親尺度に有効にする必要があります。

Valid values range from 0 to (Bands-1).有効値の範囲は0から(バンド-1)です。

Examples

[Rainmeter]
Update=16
DynamicWindowSize=1
AccurateText=1

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=100
RMSDecay=300
RMSGain=2.5

[MeasureL]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Channel=L
Type=RMS

[MeasureR]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Channel=R
Type=RMS

[MeterBack]
Meter=Image
W=52
H=77
SolidColor=47,47,47,255
UpdateDivider=-1
LeftMouseUpAction=[Play "#@#Sounds\AudioTest.wav"]

[MeterL]
Meter=BitMap
MeasureName=MeasureL
X=5
Y=5
BitMapImage=#@#Images\LevelBitmap.png
BitMapFrames=15
BitmapZeroFrame=1

[MeterR]
Meter=BitMap
MeasureName=MeasureR
X=3R
Y=5
BitMapImage=#@#Images\LevelBitmap.png
BitMapFrames=15
BitmapZeroFrame=1

[MeterLText]
Meter=String
X=12
Y=1R
FontFace=Trebuchet MS
FontSize=8
FontColor=200,200,200,255
AntiAlias=1
Text=L
UpdateDivider=-1

[MeterRText]
Meter=String
X=35
Y=0r
FontFace=Trebuchet MS
FontSize=8
FontColor=200,200,200,255
AntiAlias=1
Text=R
UpdateDivider=-1

Simple Left/Right volume levels using RMS and Bitmap meters:RMSとビットマップメーターを使った簡単な左右の音量レベル:

[Rainmeter]
Update=40
DynamicWindowSize=1
AccurateText=1

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTSize=1024
FFTAttack=15
FFTDecay=250
Bands=10

[MeasureBand0]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=0

[MeasureBand1]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=1

[MeasureBand2]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=2

[MeasureBand3]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=3

[MeasureBand4]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=4

[MeasureBand5]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=5

[MeasureBand6]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=6

[MeasureBand7]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=7

[MeasureBand8]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=8

[MeasureBand9]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=9

[MeterBackground]
Meter=Image
W=127
H=110
SolidColor=47,47,47,255

[MeterBand0]
Meter=Bar
MeasureName=MeasureBand0
X=5
Y=5
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

[MeterBand1]
Meter=Bar
MeasureName=MeasureBand1
X=2R
Y=0r
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

[MeterBand2]
Meter=Bar
MeasureName=MeasureBand2
X=2R
Y=0r
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

[MeterBand3]
Meter=Bar
MeasureName=MeasureBand3
X=2R
Y=0r
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

[MeterBand4]
Meter=Bar
MeasureName=MeasureBand4
X=2R
Y=0r
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

[MeterBand5]
Meter=Bar
MeasureName=MeasureBand5
X=2R
Y=0r
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

[MeterBand6]
Meter=Bar
MeasureName=MeasureBand6
X=2R
Y=0r
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

[MeterBand7]
Meter=Bar
MeasureName=MeasureBand7
X=2R
Y=0r
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

[MeterBand8]
Meter=Bar
MeasureName=MeasureBand8
X=2R
Y=0r
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

[MeterBand9]
Meter=Bar
MeasureName=MeasureBand9
X=2R
Y=0r
W=10
H=100
BarImage=#@#Images\SpecBar.jpg
SolidColor=100,100,100,255
BarOrientation=Vertical

Simple spectrum visualization using FFT/Bands and Bar meters:FFT / BandsとBar meterを使った簡単なスペクトル可視化:

関連記事

スポンサーリンク

readonly 変数を読み込み専用にする

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る