It is currently March 28th, 2024, 10:47 pm

Win7Audio audio range

Get help with creating, editing & fixing problems with skins
ItsJustRyan
Posts: 81
Joined: October 25th, 2019, 1:20 am

Win7Audio audio range

Post by ItsJustRyan »

Hi!
How do i make it so that win7audio plugin takes the output of certain frequencies (for example if i want to have only the values of bass) and then outputs it?
Thanks!

edit-->nvm im stupid i was looking at the wrong plugin
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Win7Audio audio range

Post by eclectic-tech »

"Not stupid" ... That happens to all of us from time to time :Whistle

The AudioLevel plugin is what you were looking for... :great:
ItsJustRyan
Posts: 81
Joined: October 25th, 2019, 1:20 am

Re: Win7Audio audio range

Post by ItsJustRyan »

Am i doing this right?
It doesnt appear to be working. Basically this code stores the value from a previous instance and compares it to the current value. Its supposed to do more but first im trying to get this part to work.

Code: Select all

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

[Variables]
OldValue=0

[MeasureRandom]
Measure=plugin
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTSize=1024
Bands=1
FreqMin=0
FreqMax=250
UpdateDivider=5
DynamicVariables=1
IfCondition=MeasureRandom > #OldValue#
IfTrueAction=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]
IfCondition2=MeasureRandom < #OldValue#
IfTrueAction2=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]
IfCondition3=MeasureRandom = #OldValue#
IfTrueAction3=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]

[Volmult]
Measure=calc
Formula=([MeasureRandom] * 100)

[textbox]
meter=string
text=[MeasureRandom], [volmult]

[Soundbar]
Meter=shape
Shape=rectangle 50,50,10,5 | FillColor 255,255,255 | Strokewidth 0
Dynamicvariables=1
[code]
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Win7Audio audio range

Post by mak_kawa »

You are missing DynamicVariables=1 in [textbox] meter. So, [textbox] meter is not showing updated values.
ItsJustRyan
Posts: 81
Joined: October 25th, 2019, 1:20 am

Re: Win7Audio audio range

Post by ItsJustRyan »

Ah i see! It appears to be working now, but it looks super janky/jumpy, but i have the update thing at 16.

Code: Select all

[Rainmeter]
Update=16

[Variables]
OldValue=0

[MeasureRandom]
Measure=plugin
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTSize=1024
Bands=1
FreqMin=0
FreqMax=250
UpdateDivider=5
DynamicVariables=1
IfCondition=MeasureRandom > #OldValue#
IfTrueAction=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]
IfCondition2=MeasureRandom < #OldValue#
IfTrueAction2=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]
IfCondition3=MeasureRandom = #OldValue#
IfTrueAction3=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]

[Volmult]
Measure=calc
Formula=([MeasureRandom] * 5000)
Dynamicvariables=1

[textbox]
meter=string
text=[MeasureRandom], [volmult]
Fontcolor=255,255,255
Dynamicvariables=1

[Soundbar]
Meter=shape
Shape=rectangle 2,15,[volmult],5 | FillColor 255,255,255 | Strokewidth 0
Dynamicvariables=1
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Win7Audio audio range

Post by mak_kawa »

it looks super janky/jumpy
At least in my experience, for the Audiolevel plugin, optimum setting is around Update=40 and FFTAttack=15FFTDecay=250...although I am not sure exactly.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Win7Audio audio range

Post by eclectic-tech »

ItsJustRyan wrote: December 8th, 2019, 4:30 am Ah i see! It appears to be working now, but it looks super janky/jumpy, but i have the update thing at 16.
Take a look at this mod of your code... it monitors the 87 hz frequency and displays that level on a horizontal shape.

Code: Select all

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

[Variables]
OldValue=0

[MeasurAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTAttack=20
FFTDecay=20
FFTSize=1024
Bands=1
FreqMin=30
FreqMax=250

[MeasureFreq]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasurAudio
Channel=Sum
Type=BandFreq
BandIdx=0

[MeasureRandom]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasurAudio
Channel=Sum
Type=Band
BandIdx=0
; Rather than an UpdateDivider, average the size of the measure for smoother display
AverageSize=5
;UpdateDivider=1
DynamicVariables=1
; Rather than 3 condition tests, simply set the value of "OldValue" to [MeasureRandom] on each update
OnUpdateAction=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]

; IfCondition=MeasureRandom > #OldValue#
; IfTrueAction=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]
; IfCondition2=MeasureRandom < #OldValue#
; IfTrueAction2=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]
; IfCondition3=MeasureRandom = #OldValue#
; IfTrueAction3=[!SetVariable OldValue [MeasureRandom]][!UpdateMeter *][!Redraw]

[Volmult]
Measure=calc
Formula=([MeasureRandom] * 100)
DynamicVariables=1

[textbox]
meter=string
FontColor=255,255,255
text=Frequency [MeasureFreq:0]hz : [MeasureRandom], [volmult]
DynamicVariables=1
SolidColor=0,0,0,1

; Added a back for reference
[SoundbarBack]
Meter=shape
Shape=rectangle 50,50,110,5 | FillColor 64,64,64 | Strokewidth 0
Dynamicvariables=1

; Bar moves based on value of measured frequency
[Soundbar]
Meter=shape
X=([MeasureRandom]*100)
Shape=rectangle 50,50,10,5 | FillColor 255,255,255 | Strokewidth 0
Dynamicvariables=1
beat87.gif
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Win7Audio audio range

Post by balala »

ItsJustRyan wrote: December 8th, 2019, 4:30 am Ah i see! It appears to be working now, but it looks super janky/jumpy, but i have the update thing at 16.
Beside eclectic-tech's code, you might want to not set the dynamic variables on the [textbox] meter, but to add the measures into some MeasureName options, along with setting the number of decimals. This step avoids the need of setting dynamic variables:

Code: Select all

[textbox]
meter=string
MeasureName=MeasureRandom
MeasureName2=volmult
text=%1, %2
FontColor=255,255,255
;DynamicVariables=1
NumOfDecimals=5
  • Advantage: no need of dynamic variables, which consumes a little bit more resources.
  • Disadvantage: the five decimals are shown on both numbers, not just on the value returned by [MeasureRandom].
ItsJustRyan
Posts: 81
Joined: October 25th, 2019, 1:20 am

Re: Win7Audio audio range

Post by ItsJustRyan »

So how would i have it show that it output of the largest value within a certain range of frequencies?
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Win7Audio audio range

Post by mak_kawa »

Add following lines to the measure [measureRandom].

Code: Select all

IfCondition=MeasureRandom > #MaxValue#
IfTrueAction=[!SetVariable MaxValue [MeasureRandom]]
Modify output text line to, for example, text=Frequency [MeasureFreq:0]hz : [MeasureRandom], [volmult]#CRLF#Max.: #MaxValue#