It is currently June 19th, 2021, 6:39 pm

Image Audio Visualizer

Help with creating, editing & fixing problems with skins
MashedPotato
Posts: 5
Joined: February 14th, 2018, 8:18 am

Re: Image Audio Visualizer

Post by MashedPotato »

eclectic-tech wrote:Yes, the Clamp bang definitely needs the comma... :17nodding

But I would suggest a different approach with the audio level measure.

I modified your audiolevel measure settings to reflect a different way to obtain a value for low frequencies.

Since you only want to measure bass levels, it is not necessary to create FFT sections, and much less resource intensive to use the PEAK/RMS scale. It gives you a reading that reflects the amplitude of the audio (bass is usually strongest).

To read the PEAK/RMS you need a child measure of the audiolevel plugin and control the image alpha using that measure.
And I averaged the size of that measure, so the alpha change is less psychotic! :sly:

Adjust the Sensitivity value to get the reaction you want.

Code: Select all

[Rainmeter]
Update=16
DynamicWindowSize=1

[Metadata]
Name=Bloody Cut(Yandare Background)
Author=IkiruRiyu
Information=Background Bass Visualizer
Version=1.0

[MeasureAudioBase]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=0
RMSDecay=0
RMSGain=1
PeakAttack=0
PeakDecay=0
PeakGain=1
; FFTSize=1024
; FFTOverlap=(#FFTSize#/2)
; FFTAttack=15
; FFTDecay=100
; Bands=
; FreqMin=20
; FreqMax=100
Sensitivity=35
; Documentation: https://docs.rainmeter.net/manual-beta/plugins/audiolevel/

[MeasureAudioBaseChild]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudioBase
Channel=Sum
; Type=Peak OR Type=RMS
; Peak gives a faster change
Type=Peak
; You can average the measure to smooth changes; 1~? is the number of value changes to average
AverageSize=1

; Background image to cover the current wallpaper (black 0,0,0,255 OR white 255,255,255,255)
[Back]
Meter=Image
W=#WorkAreaWidth#
H=#WorkAreaHeight#
SolidColor=0,0,0,255

[MeterHeart]
Meter=Image
ImageName=#@#Bloody Chan~.png
;Test Image
;#@#background_2.jpg
X=0
Y=0
; Rather than a preset size, set it to the screen work area width and height
W=#WorkAreaWidth#
;1366
H=#WorkAreaHeight#
;768
PreserveAspectRatio=0
Imagealpha=(Clamp(([MeasureAudioBaseChild]*255),0,255))
Imagetint=255,255,255
Antialias=1
DynamicVariables=1
Let us know if you want something different... :welcome:
First off, sorry I haven't been able to reply, been busy these days. Thank you for the reply, I learned a lot :17readbook . I'll remember what you said for future skins I might create... but :confused: it just doesn't work the way I want it to be... IT shows itself everytime now. Sorry if im asking too much, but this is what im trying to do. This is my previous wallpaper, I simply used Fountain of colors, and put it behind an image, so I didnt really do any coding. Sorry for the unnecesary stuff, skip to 0:55.
https://youtu.be/iyU5mlf9EfM


This is the menu for the game, after a few seconds it changes drastically. So the psychotic change that you mentioned was intentional. What I'm trying to do is make it kinda like a surprise that only shows itself on "bass drops", so before that the skin must not show as much as possible


This is another video I use to test the skin. The bass is at 0:25.

Thank you so much for your help, I hope Im not bothering you guys. This is really my 1st skin, and I dont know anything about rainmeter and lua, so I appreciate your help.

Also how do I pack the whole config?
User avatar
balala
Rainmeter Sage
Posts: 12797
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Image Audio Visualizer

Post by balala »

MashedPotato wrote:Also how do I pack the whole config?
https://docs.rainmeter.net/manual-beta/distributing-skins/#SkinPackager
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4304
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Image Audio Visualizer

Post by eclectic-tech »

While waiting for the package, you could try this modification...

Instead of a ramping imagealpha, it will set visibility on/off based on the level of the low frequency: none if below 0.5, fully visible if above 0.5. I create 2 bands because band 0 can be unreliable in my experience, then test the level of band 1 to determine whether to show the image or not.

See if this is closer to what you wanted; you can adjust the sensitivity and/or the threshold (0.5) in the ImageAlpha conditional statement: ([MeasureAudioChild]>0.5? 255:0)

Code: Select all

[Rainmeter]
Update=16
DynamicWindowSize=1

[Metadata]
Name=Bloody Cut(Yandare Background)
Author=IkiruRiyu
Information=Background Bass Visualizer
Version=1.0

[MeasureAudioBase]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=0
RMSDecay=0
RMSGain=1
PeakAttack=0
PeakDecay=0
PeakGain=1
FFTSize=1024
FFTOverlap=512
FFTAttack=10
FFTDecay=30
Bands=2
FreqMin=20
FreqMax=200
Sensitivity=30
; Documentation: https://docs.rainmeter.net/manual-beta/plugins/audiolevel/

[MeasureAudioBaseChild]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudioBase
Channel=Sum
BandIdx=1
; You can average the measure to smooth changes; 1~? is the number of value changes to average
AverageSize=1

; Background image to cover the current wallpaper (black 0,0,0,255 OR white 255,255,255,255)
[Back]
Meter=Image
W=#WorkAreaWidth#
H=#WorkAreaHeight#
SolidColor=0,0,0,255

[MeterHeart]
Meter=Image
ImageName=#@#Bloody Chan~.png
;Test Image
;#@#background_2.jpg
X=0
Y=0
; Rather than a preset size, set it to the screen work area width and height
W=#WorkAreaWidth#
;1366
H=#WorkAreaHeight#
;768
PreserveAspectRatio=0
; Conditional statement: (SomeTest? TrueValue:FalseValue)
Imagealpha=([MeasureAudioBaseChild]>0.5? 255:0)
Imagetint=255,255,255
Antialias=1
DynamicVariables=1
Last edited by eclectic-tech on February 24th, 2018, 8:20 pm, edited 1 time in total.
MashedPotato
Posts: 5
Joined: February 14th, 2018, 8:18 am

Re: Image Audio Visualizer

Post by MashedPotato »

eclectic-tech wrote:While waiting for the package, you could try this modification...

Instead of a ramping imagealpha, it will set visibility on/off based on the level of the low frequency: none if below 0.5, fully visible if above 0.5. I create 2 bands because band 0 can be unreliable in my experience, then test the level of band 1 to determine whether to show the image or not.

See if this is closer to what you wanted; you can adjust the sensitivity and/or the threshold (0.5) in the ImageAlpha conditional statement: ([MeasureAudioChild]>0.5? 255:0)

Code: Select all

[Rainmeter]
Update=16
DynamicWindowSize=1

[Metadata]
Name=Bloody Cut(Yandare Background)
Author=IkiruRiyu
Information=Background Bass Visualizer
Version=1.0

[MeasureAudioBase]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=0
RMSDecay=0
RMSGain=1
PeakAttack=0
PeakDecay=0
PeakGain=1
FFTSize=1024
FFTOverlap=512
FFTAttack=10
FFTDecay=30
Bands=2
FreqMin=20
FreqMax=200
Sensitivity=30
; Documentation: https://docs.rainmeter.net/manual-beta/plugins/audiolevel/

[MeasureAudioBaseChild]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudioBase
Channel=Sum
Band=1
; You can average the measure to smooth changes; 1~? is the number of value changes to average
AverageSize=1

; Background image to cover the current wallpaper (black 0,0,0,255 OR white 255,255,255,255)
[Back]
Meter=Image
W=#WorkAreaWidth#
H=#WorkAreaHeight#
SolidColor=0,0,0,255

[MeterHeart]
Meter=Image
ImageName=#@#Bloody Chan~.png
;Test Image
;#@#background_2.jpg
X=0
Y=0
; Rather than a preset size, set it to the screen work area width and height
W=#WorkAreaWidth#
;1366
H=#WorkAreaHeight#
;768
PreserveAspectRatio=0
; Conditional statement: (SomeTest? TrueValue:FalseValue)
Imagealpha=([MeasureAudioBaseChild]>0.5? 255:0)
Imagetint=255,255,255
Antialias=1
DynamicVariables=1
Once again thank you for your help, really appreciate it. Its good but it still shows up, it just needs a bit of tweaking i think. Ill reply asap.

How exactly do I change the threshold? is 1 the max?
Also, I think it would look a bit better with a bit of decay, but changing the RMS, Peak, or FFT decay doesnt work.... :confused:

Heres the skin. Thanks :D
https://sta.sh/0ttuvw1lmk