VU Level Metres in Rainmeter?

Help with creating, editing & fixing problems with skins
User avatar

Re: VU Level Metres in Rainmeter?

November 13th, 2017, 5:16 pm
sl23
   [281 posts]

The Gravity option is identical to Rm's PeakDelay option. It's simply the rate of fall, ie how long it takes the indicator to drop to zero. It's the PeakHold that interests me. That keeps it at it's peak for the specified length of time, before the Gravity/PeakDelay kicks in.

I always am interested in other skins and how they are coded,

Don't expect much from me, I only know the basics of programming Rainmeter! I always loved the idea of making my own apps, or just changing existing apps to suit my needs, but I don't think I have the brain power to do what you and others here are capable of with something as relatively simple as Rainmeter!

I just about understand how this audiolevel stuff works! But then I'm trying to pick apart existing skins to add features like colour picker, different bar styles, different widths, etc. But my missus doesn't like me on my PC too much :lol: :oops:
Which is fair as I tend to be a bit obsessive with it all! :lol:

Once I'm done I'll post everything here for others to use if required. It may take some time though! :oops:

Thanks again for everyone's help, and to jsmorley for possibly THE best windows app ever :thumbup:
User avatar

Re: VU Level Metres in Rainmeter?

November 13th, 2017, 9:48 pm
sl23
   [281 posts]

:welcome:
Well, I've been working on this all day, still much I'd like to do yet, but for now I need help with the Peak indicators again!
Sorry, I just don't understand the code used to position them. :oops:
I don't know how to adjust it to the correct position so it's working accurately. The Peaks are not even close to the end of the metre yet the Clip is lighting up.

Any chance some amazing bod could help please :D

Here's the skin package and a current pic in action:
OcenVUMetre InAction.png

OcenVUMetre_1.0.rmskin
(6.5 KiB) Downloaded 2 times


EDIT: I managed to get the Peak located correctly, but they overrun the VU metre by 1 pixel! Is there anything I can do about this?
With a bit of trial and error, I simply added the '26+' in this line:
X=(26+200*[mPeakLeft])

Here's an updated version of the skin, still not finished so maybe parts not working yet:
OcenVUMetre_1.1.rmskin
(6.58 KiB) Downloaded 3 times
User avatar

Re: VU Level Metres in Rainmeter?

November 14th, 2017, 1:09 pm
sl23
   [281 posts]

I can't seem to get the peaks working right! I've set PeakGain=2.0 and the RMSGain=2.5 which seems to get them both working better, but at low levels, typically around and below -48db, the VU goes higher than the Peaks! :confused:

But if I set both to 2.5 then the Peaks seem way too high and are maxing out when the VU's are at around halfway? :???:

Can you please advise on a solution, here's the latest skin update:
OcenVUMetre_1.3.rmskin
(7.62 KiB) Downloaded 4 times


Thanks :thumbup:
User avatar

Re: VU Level Metres in Rainmeter?

November 15th, 2017, 8:46 pm
sl23
   [281 posts]

Here's an almost final version. Just need to iron those little niggles out if possible, not having much luck with it I'm afraid! :( :uhuh:
I know you guys are probably very busy, but if you could help me finish this by sorting out the Peaks a bit better, I'd be very grateful. :great:

Anyway here's a quick screenshot in action and the latest version.
If you click on the speaker icon it toggles the volume between 40 and 100%.

OcenVUMetre v1.4.png

OcenVUMetre v1.5.PNG

OcenVUMetre_1.4.rmskin
(10.91 KiB) Downloaded 6 times


Thanks for your help... :thumbup:
User avatar

Re: VU Level Metres in Rainmeter?

November 20th, 2017, 11:46 am
sl23
   [281 posts]

Updated to v1.5:
2 versions of skin - Original and a new one that has only the volume control and the metre's with a transparent background.
You may not like this second skin, but for my needs I keep it on the taskbar and so prefer the minimal approach.
Also cleaned the code, removed unnecessary components.

Here's the new Skin, remember the background is completely transparent so the black is actually my windows taskbar.
2. OcenVUMetre.png

OcenVUMetre_1.5.rmskin
(12.98 KiB) Downloaded 3 times


Hope you like it... :thumbup:

I do have some issues still with the setup which doesn't seem to be possible to resolve by adjustment of the settings for the three metre's within the skin. May I ask, is this meant to be simply a 'fun' tool or is it meant as a 'pro' reference tool?
I suspect the former, which is a shame.
But one thing that seems difficult to get right is the fact that the peaks and clipping don't 'match' each other. for example, how can the clipping show when the peaks aren't at the end of the metre? Or, the vice versa, how can the peaks max out but not clip? I'm trying to get as close to resembling my DAW metre's as possible but am failing! :oops: :?

I expect it's a calibration issue, but I am not a VU calibration expert so have no idea of the correct settings, is there someone that could help please?
One thing that isn't really explained is the sensitivity of the Gain setting. For example, can you set it to 2.05? Or even 2.005? These settings are possibly neglible but could present a more accurate representation of the signal level.

I would like to know if Peak returns a value? So When the Peak reaches Max it then, and only then, turns the Clip on for a specified time.

Thanks :thumbup:

As a side note, can we please have an option to save to a specified folder, it's a bit annoying having to keep locating a folder to save to each time you want to create an *.rmskin package, thanks ;-)
Last edited by sl23 on November 21st, 2017, 5:51 pm, edited 1 time in total.
User avatar

Re: VU Level Metres in Rainmeter?

November 21st, 2017, 10:25 am
sl23
   [281 posts]

I've just been reviewing the earlier posts in this thread, and have looked again at balala's code for the peaks, is there a way to adapt this so that it hold's and then resets/drops/decays? This would then be what I'm looking for. A peak that holds for a short time, then decays to the next peak value, and so on.

This seems to be a more accurate way because the current way doesn't seem to work? Even though you specify certain parameters, it's not possible to get them working as they should in a real hardware VU display.

I would imagine it's a matter of specifying a wait time before performing a reset on the meter? But the code used is beyond me! :oops: :confused:

Thanks :thumbup:
User avatar

Re: VU Level Metres in Rainmeter?

November 21st, 2017, 4:32 pm
balala
Rainmeter Sage   [4982 posts]

I just downloaded the last package you've posted above (OcenVUMetre_1.5.rmskin), wanting to modify it according to your request. But for me at least, it doesn't work, because, according to the Log, a 0.png file is missing. The posted package isn't complete? Please review and fix it and upload it again, then I'll try to modify it.
Or am I missing something?
User avatar

Re: VU Level Metres in Rainmeter?

November 21st, 2017, 5:53 pm
sl23
   [281 posts]

Strange? Not sure what happened there!

Re-uploaded. Try again ;-)

EDIT: I just reread your post, there is no 0.png file?! :confused:
EDIT: I just checked the log, that's a lot of errors from something that doesn't exist!!! Any idea what that's about?
Last edited by sl23 on November 21st, 2017, 7:48 pm, edited 1 time in total.
User avatar

Re: VU Level Metres in Rainmeter?

November 21st, 2017, 7:45 pm
balala
Rainmeter Sage   [4982 posts]

sl23 wrote:Strange? Not sure what happened there!

Re-uploaded. Try again ;-)

Also not sure what happened, but removing the [mProcessFoobar] and [mProcessMuLab] measures fixed the issue, and although there still are errors, at least the skin works now. Probably the problems are related by the fact that I have no installed foobar2000 and also have no idea what the mulab.exe process is.

So, about the solution: first replace the [mPeakLeft] and [mPeakRight] measures with the following ones:

Code: Select all

[mPeakLeft]
Measure=Calc
Formula=( Max ( mPeakLeft, mLeft ))

[mPeakRight]
Measure=Calc
Formula=( Max ( mPeakRight, mRight ))

With these Calc measures the peaks will be set not by the AudioLevel plugin measures.
Also I think there was a small issue in your code: both the [PeakLeft] and the [PeakRight] meters was set to use the [sPeak] style. But this section had been set to place the meters which use it, to X=(26+200*[mPeakLeft]), which means that both peak meters are placed on the same position. To fix this, I removed the above X option from the [sPeak] section and added the following options to the [PeakLeft] and [PeakRight] meters:

Code: Select all

[PeakLeft]
...
X=(26+200*[mPeakLeft])

[PeakRight]
...
X=(26+200*[mPeakRight])

Now the last step would be to reset the [mPeakLeft] and [mPeakRight] measures in the proper moments. I give you two methods: 1. reset them when the peak(s) reach certain point and 2. after certain amount of time if the peaks don't move:

  • Add the following two options to both the [mPeakLeft] and [mPeakRight] measures:

    Code: Select all

    IfCondition=(#CURRENTSECTION#>=#ResetLevel#)
    IfTrueAction=[!DisableMeasure "#CURRENTSECTION#"][!UpdateMeasure "#CURRENTSECTION#"][!EnableMeasure "#CURRENTSECTION#"]

    If you define the ResetLevel variable in the [Variables] section, as a number between 0 and 1 (eg ResetLevel=0.5), when any of the two peaks achieve this defined level, the appropriate one peak is reset.
  • If you want to reset the peak when any of them doesn't change for a while, first you should define in the [Variables] section the interval which has to pass before the peak is reset, eg:

    Code: Select all

    [Variables]
    ResetTime=3

    with this solution if any of the maxs doesn't change for three seconds, the appropriate peak is reset.
    Also add the following two measures:

    Code: Select all

    [MeasureTimeLeft]
    Measure=Calc
    Formula=( MeasureTimeLeft + 1 )
    IfCondition=(#CURRENTSECTION#=#ResetTime#)
    IfTrueAction=[!DisableMeasure "mPeakLeft"][!UpdateMeasure "mPeakLeft"][!EnableMeasure "mPeakLeft"]
    UpdateDivider=40

    [MeasureTimeRight]
    Measure=Calc
    Formula=( MeasureTimeRight + 1 )
    IfCondition=(#CURRENTSECTION#=#ResetTime#)
    IfTrueAction=[!DisableMeasure "mPeakRight"][!UpdateMeasure "mPeakRight"][!EnableMeasure "mPeakRight"]
    UpdateDivider=40

    [MeasureTimeLeft] will reset the left peak, and obviously [MeasureTimeRight] the right peak.
    Now you have to restart these measures every time the appropriate max is changing. For this, add the following two options to the [mPeakLeft] and [mPeakRight] measures:

    Code: Select all

    [mPeakLeft]
    ...
    OnChangeAction=[!DisableMeasure "MeasureTimeLeft"][!UpdateMeasure "MeasureTimeLeft"][!EnableMeasure "MeasureTimeLeft"]

    [mPeakRight]
    ...
    OnChangeAction=[!DisableMeasure "MeasureTimeRight"][!UpdateMeasure "MeasureTimeRight"][!EnableMeasure "MeasureTimeRight"]
Now you have to decide which solution do you prefere. Me personally probably would prefere the second one, but this is up to you.
User avatar

Re: VU Level Metres in Rainmeter?

November 21st, 2017, 8:45 pm
eclectic-tech
Rainmeter Sage   [2323 posts]

I noticed the same issues balala pointed out about style.

I also received a playertype error; add PlayerType=STATUS to the mPlayer section.

The image error message refers to both a '0.png' and '1.png' image on my system.

Rube here:
You could create transparent 1x1 pixel images and save them as '0.png' and '1.png'; (Rube Goldberg hard at work! :D ) this will eliminate the errors and you not have to remove the measures testing for processes.
However, I use winamp which meant these measure always hide the bars because neither process is active. If you are going to distribute, you would need to compare the player process used by end users.

One note on balala's last suggestion (which I like!)... because the skin has an Update of 25 ms, in order to "hold" the value for 3 seconds, the 'ResetTime' variable would have to be 40 times the number of seconds, so instead of 3 set it to 120 to hold the value for 3 seconds (25*120=3000ms).

Enough from me! ;-)

Return to “Help: Rainmeter Skins”



Who is online

Users browsing this forum: No registered users and 4 guests