It is currently October 4th, 2024, 12:44 am

AudioAnalyzer [1.1]

Share and get help with Plugins and Addons
rxtd
Posts: 100
Joined: April 30th, 2017, 11:51 am

AudioAnalyzer [1.1]

Post by rxtd »

This plugin can measure RMS and peak of sound wave, do Fourier Transform, draw waveform, draw spectrogram.
All can be done separately for different channels.
Yes, that sounds almost like description of AudioLevel. See list of improvements below.

Examples of usage
Plugin has lots of options, but if you only want to make something pretty, then you will probably be happy with default values, so it's actually very easy to use.
Here are two skins: Spectrum analyzer
2019-01-20_01-52-24.png
and test skin, containing RMS, Peak, Waveform and Spectrogram
2019-01-20_01-53-01.png
Download:
AudioAnalyzer Example 1.1.rmskin

Documentation
Can be found in the archive with binaries.

Sources
Can be found on Github.


Comparison to AudioLevel
AudioLevel doesn't have Spectrogram.
AudioLevel doesn't correct attack/decay values when sample rate changes.
AudioLevel doesn't do proper channel mapping. For example, it doesn't recognize 4.0 channel layout.
AudioLevel can't resample wave when sampling rate is high.
AudioLevel only allow you to declare one calculation of values for all channels. It doesn't allow you to define FFT for only one channel and RMS for one another.
AudioLevel calculates values differently:
RMS: AudioLevel doesn't have RMS. It calculates filtered squared wave value instead.
Peak: AudioLevel doesn't have Peak. It calculates filtered absolute wave value instead.
FFT: AudioLevel doesn't do proper normalization of the values. This leads to great change of values when size if changed. To be precise, FFT of size 16384 is 32 times bigger than FFT of size 16.
AudioLevel doesn't have cascaded FFT.
AudioLevel don't let you define relative size of the FFT, only absolute (this causes a big problems when sample rate of your sound card changes or when you want to distribute your skin).
AudioLevel doesn't correct zeroth value of the FFT.
Band: AudioLevel's Band feature always calculates sum of the FFT bins instead of average, which is not always desirable.
AudioLevel calculates bound using squared values of the FFT, which leads to incorrect filtering and (as far as I can tell) incorrect final values (they are much spikier than they need to be).
AudioLevel's Band doesn't blur values.
Plugin supports changing the majority of the options using !SetOption bang, but doesn't support DynamicVariables=1 because on each option change all values are reset!
Skin using this plugin should have low update interval. Best 16-17 ms. At most 100 ms. Otherwise some (or most) of sound values will be lost. It's a defense against too computations heavy options. I don't know yet how to make this more convenient.

Download
Binaries and this Readme:
AudioAnalyzer 1.1.zip


Version history:
1.0 — initial release.
1.1 — list of changes.
You do not have the required permissions to view the files attached to this post.
Last edited by rxtd on February 3rd, 2019, 2:14 am, edited 4 times in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5537
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: AudioAnalyzer [1.0]

Post by eclectic-tech »

:jawdrop Very impressive!

Question: How to set colors for bars? I know I can set the bar color in the 'bar' meters, but could not determine if your 'Colors:', as described in your documentation, is applicable?

I see the examples for Waveform and Spectrum, but could not figure out for each bar or all bars...

In the ini format of 'KeyWord=Value', having 'Values' with equal signs in them looks 'muddy' to me when trying to learn the syntax.
Is it possible to use a different designation symbol? Perhaps | like for InlineSettings?

Looking forward to seeing what your hard work can do!

Thanks for sharing :great:
rxtd
Posts: 100
Joined: April 30th, 2017, 11:51 am

Re: AudioAnalyzer [1.0]

Post by rxtd »

eclectic-tech, thank you for your feedback.
eclectic-tech wrote: January 20th, 2019, 1:53 am Question: How to set colors for bars? I know I can set the bar color in the 'bar' meters, but could not determine if your 'Colors:', as described in your documentation, is applicable?

I see the examples for Waveform and Spectrum, but could not figure out for each bar or all bars...
Spectrum analyzer doesn't use my plugin's graphics, there are only Bar meters. And, well, bar colors are kinda hardcoded. Although it has different name, but it was just second test skin, so I didn't bother to make it comfy to change.
Colors, that are described in first post, are only applicable to images that my plugin draws, and for now it draws only waveform and spectrogram.

P.S. Spectrum is a set or current values of frequencies — 1D, spectrogram is values change in time — 2D.
eclectic-tech wrote: January 20th, 2019, 1:53 am In the ini format of 'KeyWord=Value', having 'Values' with equal signs in them looks 'muddy' to me when trying to learn the syntax.
Is it possible to use a different designation symbol? Perhaps | like for InlineSettings?
It sure possible to change symbol, but I'm not sure what will be better.
InlineSettings set one option at a time, so it uses | symbol to separate option name and option value.

My plugin is mush more like Shape meter: there are several my "options" in one Rainmeter option. Shape separates options by | and separates option name from option value by , while my plugin uses and = respectively. It makes sense to change my separation symbols to match those of Shape meter, but is it really needed?

There are already places in Rainmeter where you have to use = in the value of the option: in formulas, in String measures and meters. For example, it's perfectly valid to write Formula=1=SomeMeter in Calc measure.

key=value syntax, on the other hand, resembles Rainmeter options, so for me it's intuitive to use.

I'm not saying that I'm against changing my syntax, I just don't know what will be better.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5537
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: AudioAnalyzer [1.0]

Post by eclectic-tech »

Oops, yes, I meant 'spectrogram' (not spectrum) :uhuh:

I thought the answer would be to use a bar style, not a problem.

I think using separators similar to the Shape meter may reduce the 'learning curve' when setting parameters in your measures. But that is just my opinion.

Thank for all your work on this rtxd!
Going to play with this, as soon as I clear several feet of snow that fell yesterday and overnight :o
rxtd
Posts: 100
Joined: April 30th, 2017, 11:51 am

Re: AudioAnalyzer [1.1]

Post by rxtd »

Plugin updated to version 1.1.
This version includes compatibility breaking changes, so plugin name was changes to "AudioAnalyzer_1_1" to prevent problems with existing skins.

List of changes:
Fix: fft could not be used directly as source for spectrograms
Using | and " "(white space) as option separators instead of " "(white space) and =
All options are case-insensitive
BandAnalyzer removed, several handlers added to replace its funstions.
Add "RandomDuration" option to FFT.
Add check for reverse dependencies.
Add check for unused options.
Open sources.
User avatar
MarcoPixel
Posts: 42
Joined: June 8th, 2012, 9:43 am
Location: Austria

Re: AudioAnalyzer [1.1]

Post by MarcoPixel »

Looks really interresting, i think i'll have to make some experiments with this plugin in the next time :)
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: AudioAnalyzer [1.1]

Post by drakulaboy »

oh wow, new toy to play with, gonna try to make something cool too like some visualizers from youtube
User avatar
Axinoe
Posts: 14
Joined: April 27th, 2018, 10:52 pm

Re: AudioAnalyzer [1.1]

Post by Axinoe »

Using this plugin, I've noticed that low frequency bands have significantly lower travel, and high frequency bands have significantly more travel. Also, adjusting BinWidth seems to change how high the bands travel as well. Is this all normal behavior?

This plugin has a lot of nice features, but these problems are stopping me from using it the way I intended.
User avatar
Axinoe
Posts: 14
Joined: April 27th, 2018, 10:52 pm

Re: AudioAnalyzer [1.1]

Post by Axinoe »

It took me a little too long to realize I was missing an important handler: BandCascadeTransformer!
Adding the missing handler fixed the issues I was having. User error... :D
Judian81
Posts: 180
Joined: May 6th, 2021, 2:57 pm

Re: AudioAnalyzer [1.1]

Post by Judian81 »

wow this plugin is awsome. i have one question. is it possible to keep the animation high even if i change the volume level?