It is currently April 18th, 2024, 5:53 pm

Win7Audio audio range

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

Re: Win7Audio audio range

Post by ItsJustRyan »

Thanks, I'll have a look!
Also, I thought sensitivity was for what it can detect.

Edit --> For some reason I cant get the laser light thing to work. I can open the settings skin but not the skin itself.
ItsJustRyan
Posts: 81
Joined: October 25th, 2019, 1:20 am

Re: Win7Audio audio range

Post by ItsJustRyan »

I think my music doesnt seem to suit the beat thing xD. It changes everytime the person sings or some brass instrument plays something. I'll do some tweaking and see lul

edit--> I tried to fix the problem by having something pulse or jump when the beat changes.

Code: Select all

[Rainmeter]
Update=16
AccurateText=1
Group=#RootConfig#

[Variables]
Dir=1
jump=0
decrease=0
test=0
AudioSensitivity=50

[mAudioLevel]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FreqMin=20
FreqMax=200
Sensitivity=#AudioSensitivity#
RMSAttack=30
RMSDecay=300
RMSGain=1
PeakAttack=0
PeakDecay=0
PeakGain=1

[mAudioOut_RMS_Sum]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudioLevel
Channel=Sum
Type=RMS

[Beat]
Measure=Calc
Formula=mAudioOut_RMS_Sum
AverageSize=32
IfCondition=mAudioOut_RMS_Sum>(#CurrentSection#+0.075)
IfTrueAction=[!SetVariable jump 240]
IfCondition2=(#jump# < 0)
IfTrueAction2=[!SetVariable jump 0]
DynamicVariables=1

[beatfall]
Measure=calc
Formula=jump
IfCondition=(#jump# > 0)
IfTrueAction=[!Setvariable jump (#jump#-15)]
IfConditionmode=1
Dynamicvariables=1

;[textnum]
;meter=string
;text=#jump#
;y=22
;fontcolor=255,255,255
;dynamicvariables=1

;[something]
;meter=string
;text=[Beat], [mAudioOut_RMS_Sum]
;fontcolor=0,0,255
;y=3
;Dynamicvariables=1

[backing]
meter=shape
shape=rectangle 0,0,240,3 | fill color 0,0,0,1 | strokewidth 0

[beatthing]
Meter=shape
Shape=rectangle 0,0,#jump#,3 | Fill Color 255,136,0 | Strokewidth 0 
dynamicvariables=1
Last edited by ItsJustRyan on December 11th, 2019, 10:33 am, edited 1 time in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Win7Audio audio range

Post by eclectic-tech »

I will try your code tomorrow afternoon... got a busy day and it may be late before I can try it.
What genre of music are you testing? I have used everything from classical to DubStep...

As for Laserlight, are you seeing any error messages in the log? What player are you using?

I'll check back later tomorrow...
ItsJustRyan
Posts: 81
Joined: October 25th, 2019, 1:20 am

Re: Win7Audio audio range

Post by ItsJustRyan »

eclectic-tech wrote: December 11th, 2019, 4:17 am I will try your code tomorrow afternoon... got a busy day and it may be late before I can try it.
What genre of music are you testing? I have used everything from classical to DubStep...

As for Laserlight, are you seeing any error messages in the log? What player are you using?

I'll check back later tomorrow...
I think it's classified as blues. Some songs from Edith Piaf and Annie Trosseau. Also: Fly me to the moon, Marble soda, my way, raining in my heart, rainy sunday, rocket man a whole bunch of different genres.
AIMP Player
Doesnt say that theres an error as far as i saw
The laser light thing i working, theres lights everywhere. I hadn't refreshed the app then, so all the visualisers didnt show either

Also, does the code you sent find the average of the whole song, and does that average reset every time rainmeter refreshes? The [beat] portion takes the average of the last 32 values right? I was testing it with some bass heavy songs. At the start, it reacted to all the bass beats and occasionally voice, but towards the end almost nFoone of the beats did anything.
For example one song had a few consecutive drum beats. The first few triggered the beat thing, but the last 2/3 didnt have an effect anymore
ItsJustRyan
Posts: 81
Joined: October 25th, 2019, 1:20 am

Re: Win7Audio audio range

Post by ItsJustRyan »

i just had an idea. For the average thing, is it possible for there to be a way so that as a new value is added to the total it adds one more values to the total.That way, we have a running average instead of averaging the last certain number of values, while not adding when the value is 0.

Code: Select all

[Rainmeter]
Update=16
AccurateText=1s

[Variables]
AudioSensitivity=50

[mAudioLevel]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FreqMin=20
FreqMax=200
Sensitivity=#AudioSensitivity#
RMSAttack=30
RMSDecay=300
RMSGain=1
PeakAttack=0
PeakDecay=0
PeakGain=1

[mAudioOut_RMS_Sum]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudioLevel
Channel=Sum
Type=RMS

[baseline]
meter=shape
shape=rectangle 0,60,140,1 | fill color 255,0,0 | strokewidth 0

[Beat]
Measure=Calc
Formula=mAudioOut_RMS_Sum
AverageSize=100
DynamicVariables=1

[Graph]
Meter=Line
MeasureName=Beat
W=140
H=60
LineColor=FFFFFF
SolidColor=0,0,0,0
AntiAlias=1
Dynamicvariables=1

[Value]
Meter=String
MeasureName=Beat
FontFace=Century Gothic
FontSize=12
FontColor=FFFFFF
StringAlign=CenterCenter
X=30
Y=10
AntiAlias=1
Numofdecimals=5
Autoscale=1
Dynamicvariables=1

[Graph2]
Meter=Line
MeasureName=mAudioOut_RMS_Sum
W=140
H=60
LineColor=FFFFFF
SolidColor=FFFFFF00
AntiAlias=1
Dynamicvariables=1

[Value2]
Meter=String
MeasureName=mAudioOut_RMS_Sum
FontFace=Century Gothic
FontSize=12
FontColor=FFFFFFs
StringAlign=CenterCenter
X=110
y=10
AntiAlias=1
Autoscale=1
Numofdecimals=5
Dynamicvariables=1
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Win7Audio audio range

Post by eclectic-tech »

Sorry for the delay in getting back to this... :Whistle

I spent some time today considering the options to achieve your desired result. It seem to me that you want to indicate the RHYTHM of many music genres, and using low frequencies is not going to be reliable.

In my previous suggestions, I used average RMS levels (which is already an average :x ) and compared that to the current level. That as you noticed also had issues with different genres.

My solution is to keep it as simple as possible and detect when PEAK audio level starts to increase when compared to the recent PEAK levels; the positive and negative changes indicates the rhythm of the music. The [mRhythm] section returns '1' when the audio level change is positive (a rhythm beat is coming), '0' if no change, or '-1' when the audio level is decreasing. K.I.S.S. :lol:

I use that value to control the alpha of a red rhythm indicator, but it can be used to control any action bang. I tested this with many music genres and it indicates the rhythm of most music fairly accurately. Hopefully, this is closer to what you are trying to achieve...

Here is example image, the code, and skin package (all you need is the code, but someone may find it easier to install a package :D ).
rhythm.gif

Code: Select all

[Metadata]
Name=Rhythm
Author=Eclectic Tech
Information=Detects rhythm in all genres
License=CC SA-BY-NC 4.0
Version=1.2019.12.12

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

[Variables]
; Adjust the gain of the parent to control moving bar position via mouse scroll over bar for different music genres
Gain=2.5

; Set audio parameters
[MeasureAudio]
DynamicVariables=1
Measure=Plugin
Plugin=AudioLevel
Port=OutPut
; Disable RMS
RMSAttack=0
RMSDecay=0
RMSGain=1
PEAKAttack=25
PEAKDecay=1250
PEAKGain=#Gain#
Sensitivity=30
; Documentation: https://docs.rainmeter.net/manual-beta/plugins/audiolevel/

; Get the PEAK audio level
[MeasurePeak]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Channel=Sum
Type=Peak

; Calculate the PEAK average audio level over last 6 updates
[MeasurePeakAvg]
Measure=Calc
Formula=MeasurePeak
AverageSize=6
MaxValue=1

; Calculate the PEAK average audio level over last 2 updates
[MeasurePeakAvg2]
Measure=Calc
Formula=MeasurePeakAvg
AverageSize=2

; Calculate change, zero or...
; If the change is positive, then a rhythm beat is detected and sets value to 1
; If the change is negative, the value is set to -1
; Value will set alpha for the red rhythm indicator
; The value can also be used to control any other action bang you desire
[mRhythm]
Measure=Calc
Formula=SGN(2*(MeasurePeakAvg-MeasurePeakAvg2))
DynamicVariables=1
MaxValue=1
MinValue=-1
AverageSize=2

; Added a back for reference
[SoundbarBack]
Meter=shape
Shape=rectangle 0,0,20,105 | FillColor 64,64,64 | Strokewidth 0
Shape2=rectangle 0,0,20,5 | FillColor 255,0,0,(Clamp([mRhythm]*255,0,255)) | Strokewidth 0

; Adjust gain of the parent measure between 1~5 for best response across multiple genres
MouseScrollUpAction=[!WriteKeyValue Variables Gain (Clamp(#Gain#+0.5,1,5))][!Refresh]
MouseScrollDownAction=[!WriteKeyValue Variables Gain (Clamp(#Gain#-0.5,1,5))][!Refresh]
DynamicVariables=1

; Bar moves based on value of PEAK Level
[Soundbar]
Meter=shape
Shape=rectangle 0,(100-(Clamp([MeasurePeak]*100,0,95))),20,5 | FillColor 255,255,255 | Strokewidth 0
DynamicVariables=1

[Gain]
Meter=String
X=10
Y=105
FontColor=0,0,0
InlinePattern=Gain(.)
InlineSetting=Size | 10
InlinePattern2=Gain
InlineSetting2=Size | 7
Text=Gain#CRLF##Gain#
StringAlign=Center
NumOfDecimals=1
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.