It is currently March 28th, 2024, 12:27 pm

Speakers with Bass mode! Help

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
mrbison
Posts: 3
Joined: April 21st, 2017, 11:45 pm
Location: Brasil
Contact:

Speakers with Bass mode! Help

Post by mrbison »

I'm with the following problem,
I would like to make these speakers beat only with bass sounds,
They are beating with any sound,
Is working with sound volume and not with frequency.
Can anyone give me one help

https://mega.nz/#!VlhEiCRA!AkdarOZoRtuvhG_DlEnZgO8dRT2TDeHTfu3bBnL5_RI
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Speakers with Bass mode! Help

Post by eclectic-tech »

Having 3 skins with each running a separate audiolevel measure is going to add unnecessary load on the CPU.
One main audiolevel measure, with 3 child audiolevel measures to obtain the desired effect, is a much leaner solution.
The main measure will grab the sound and separate it into as many logarithmic frequency bands as you want. I chose 3 for bass, mid, and high tones.
The 3 child measures are set to one of those 3 frequency bands and responding only to those frequencies.

A few notes on your code...
You are using audiolevel2, which is designed for waveform display... I would use the main audiolevel.dll instead.
You set update=1 in your skins; 16 is the practical low limit for a skin update rate.
Rather than RMS, use FFT and disable RMS.

Here is your code modified to show 3 speakers; large for bass, medium size for mid tones, and small high frequency sounds.

Code: Select all

[Rainmeter]
Author=ALIENWARE ASUS
Update=16
OnRefreshAction=!Execute [!ZPos "-1"][!Redraw]

[Metadata]
Skin name=speaker
Version=1
License=Creative Commons Attribution-Noncommercial-Share Alike 3.0 License


-----------------------------

[MeasureSpeaker]
Measure=Plugin
Plugin=AudioLevel
Port=Output
Channel=Sum
Type=FFT
FFTSize=1024
FFTOverlap=512
FFTAttack=20
FFTDecay=80
FreqMin=20
FreqMax=14000
; Disable RMS
RMSGain=1.0
RMSAttack=0
RMSDecay=0
; Set to obtain desired response to sound levels
Sensitivity=30
; Divide the frequencies into 3 logarithmic bands
Bands=3

[MeasureSpeakerB]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureSpeaker
BandIDx=0
Type=Band
; Condition test for bass frequencies
IfCondition=#CurrentSection# = 0
IfTrueAction=[!SetOption Speaker ImageName "0.png"][!UpdateMeter *][!Redraw]
IfCondition2=(#CurrentSection# >= 0) && (#CurrentSection# < 0.1300)
IfTrueAction2=[!SetOption Speaker ImageName "1.png"][!UpdateMeter *][!Redraw]
IfCondition3=(#CurrentSection# >= 0.1300) && (#CurrentSection# < 0.2700)
IfTrueAction3=[!SetOption Speaker ImageName "2.png"][!UpdateMeter *][!Redraw]
IfCondition4=(#CurrentSection# >= 0.2700) && (#CurrentSection# < 0.4200)
IfTrueAction4=[!SetOption Speaker ImageName "3.png"][!UpdateMeter *][!Redraw]
IfCondition5=(#CurrentSection# >= 0.4200) && (#CurrentSection# < 0.5600)
IfTrueAction5=[!SetOption Speaker ImageName "4.png"][!UpdateMeter *][!Redraw]
IfCondition6=(#CurrentSection# >= 0.5600) && (#CurrentSection# < 0.7000)
IfTrueAction6=[!SetOption Speaker ImageName "5.png"][!UpdateMeter *][!Redraw]
IfCondition7=(#CurrentSection# >= 0.700) && (#CurrentSection# < 0.8600)
IfTrueAction7=[!SetOption Speaker ImageName "6.png"][!UpdateMeter *][!Redraw]
IfCondition8=(#CurrentSection# >= 0.8600) && (#CurrentSection# <= 1)
IfTrueAction8=[!SetOption Speaker ImageName "7.png"][!UpdateMeter *][!Redraw]

[MeasureSpeakerM]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureSpeaker
BandIDx=1
Type=Band
; Condition test for middle frequencies
IfCondition=#CurrentSection# = 0
IfTrueAction=[!SetOption Speaker1 ImageName "0.png"][!UpdateMeter *][!Redraw]
IfCondition2=(#CurrentSection# >= 0) && (#CurrentSection# < 0.1300)
IfTrueAction2=[!SetOption Speaker1 ImageName "1.png"][!UpdateMeter *][!Redraw]
IfCondition3=(#CurrentSection# >= 0.1300) && (#CurrentSection# < 0.2700)
IfTrueAction3=[!SetOption Speaker1 ImageName "2.png"][!UpdateMeter *][!Redraw]
IfCondition4=(#CurrentSection# >= 0.2700) && (#CurrentSection# < 0.4200)
IfTrueAction4=[!SetOption Speaker1 ImageName "3.png"][!UpdateMeter *][!Redraw]
IfCondition5=(#CurrentSection# >= 0.4200) && (#CurrentSection# < 0.5600)
IfTrueAction5=[!SetOption Speaker1 ImageName "4.png"][!UpdateMeter *][!Redraw]
IfCondition6=(#CurrentSection# >= 0.5600) && (#CurrentSection# < 0.7000)
IfTrueAction6=[!SetOption Speaker1 ImageName "5.png"][!UpdateMeter *][!Redraw]
IfCondition7=(#CurrentSection# >= 0.700) && (#CurrentSection# < 0.8600)
IfTrueAction7=[!SetOption Speaker1 ImageName "6.png"][!UpdateMeter *][!Redraw]
IfCondition8=(#CurrentSection# >= 0.8600) && (#CurrentSection# <= 1)
IfTrueAction8=[!SetOption Speaker1 ImageName "7.png"][!UpdateMeter *][!Redraw]

[MeasureSpeakerH]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureSpeaker
BandIDx=2
Type=Band
; Condition test for high frequencies
IfCondition=#CurrentSection# = 0
IfTrueAction=[!SetOption Speaker2 ImageName "0.png"][!UpdateMeter *][!Redraw]
IfCondition2=(#CurrentSection# >= 0) && (#CurrentSection# < 0.1300)
IfTrueAction2=[!SetOption Speaker2 ImageName "1.png"][!UpdateMeter *][!Redraw]
IfCondition3=(#CurrentSection# >= 0.1300) && (#CurrentSection# < 0.2700)
IfTrueAction3=[!SetOption Speaker2 ImageName "2.png"][!UpdateMeter *][!Redraw]
IfCondition4=(#CurrentSection# >= 0.2700) && (#CurrentSection# < 0.4200)
IfTrueAction4=[!SetOption Speaker2 ImageName "3.png"][!UpdateMeter *][!Redraw]
IfCondition5=(#CurrentSection# >= 0.4200) && (#CurrentSection# < 0.5600)
IfTrueAction5=[!SetOption Speaker2 ImageName "4.png"][!UpdateMeter *][!Redraw]
IfCondition6=(#CurrentSection# >= 0.5600) && (#CurrentSection# < 0.7000)
IfTrueAction6=[!SetOption Speaker2 ImageName "5.png"][!UpdateMeter *][!Redraw]
IfCondition7=(#CurrentSection# >= 0.700) && (#CurrentSection# < 0.8600)
IfTrueAction7=[!SetOption Speaker2 ImageName "6.png"][!UpdateMeter *][!Redraw]
IfCondition8=(#CurrentSection# >= 0.8600) && (#CurrentSection# <= 1)
IfTrueAction8=[!SetOption Speaker2 ImageName "7.png"][!UpdateMeter *][!Redraw]

[Speaker]
Meter=Image
Imagetint=200,200,200
Y=0
ImagePath=Anim
Hidden=[MeasureState]
DynamicVariables=1

[Speaker1]
Meter=Image
Imagetint=200,200,200
X=70
Y=-50R
W=231
H=198
ImagePath=Anim
Hidden=[MeasureState]
DynamicVariables=1

[Speaker2]
Meter=Image
Imagetint=200,200,200
X=260
Y=10r
W=116
H=99
ImagePath=Anim
Hidden=[MeasureState]
DynamicVariables=1
Let me know if you have any questions.
User avatar
mrbison
Posts: 3
Joined: April 21st, 2017, 11:45 pm
Location: Brasil
Contact:

Re: Speakers with Bass mode! Help

Post by mrbison »

Thank you very much.
It's working as I expected it now.
I just changed the
Sensitivity = 10

:D
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Speakers with Bass mode! Help

Post by eclectic-tech »

I'm more sensitive! ;-)

Glad to help
User avatar
mrbison
Posts: 3
Joined: April 21st, 2017, 11:45 pm
Location: Brasil
Contact:

Re: Speakers with Bass mode! Help

Post by mrbison »

User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Speakers with Bass mode! Help

Post by eclectic-tech »

Looks good! :great:

I would lower the Max Frequency value from 24000 to 15000~20000, most people cannot hear frequencies above 15000.

You can increase the FFTSize to increase the responsiveness of the images. Use powers of 2 (1024, 2048, 4096, etc.) and set the FFTOverlap to half of the value of FFTSize.

Be aware this will increase the load on the CPU. You should be able to find a happy median between responsiveness and CPU load.

I think I prefer the 'fuzzy' version over than the LED, but both are pretty cool! 8-)

Click to animate...
speakers5.gif
EDIT: After thought... With only 5 frequency being used, increasing the FFTSize will not change the appearance that much, so you may be able to use an even lower value (and less CPU), see how it looks with 512 or 256 as the FFTSize.
User avatar
Lynsey-Evans
Posts: 1
Joined: August 24th, 2018, 6:47 pm

Re: Speakers with Bass mode! Help

Post by Lynsey-Evans »

Hey

I have just insatalled CB The Animated Woofer and i love it but there doesn't seem to be much movement in the speakers, is there a way to increase this to maximum by changing something in the code?

I have two of the large speakers on my laptop.

Any help from anyone and i would be very grateful.

TY
Post Reply