Read wave data

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderator: Gurus

Read wave data

Postby Aff » Sun Apr 15, 2012 2:38 pm

Is there any possibility to read the PCM data of a song in a script without the use of an external program?
If not, it would be a great enhancement to easily implement any kind of analysis or visualization script.

An idea is to create a script that analyzes songs for clipping and dynamic range (DR). The results would be written to the database and tags, using the custom tagging interface.

As MM scans the files to calculate ReplayGain, I guess there is already an internal function that could be made available publicly to scripts? The format could be 32 bit integer array with variable channels and sampling rate, or downsampled to 16bit 44.1kHz stereo.
Aff
 
Posts: 206
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Read wave data

Postby Thanasis » Thu Apr 19, 2012 3:03 am

This would be great idea.....

But I think it is easier to do it in C#. I need to do a bit of research though !!!

I have not done such a thing before but if you are interested,
lets share the project and do it together if you like !!!

I am deeply interested in writting a basic, on the fly Limiter plugin.
The other things you mentioned (like reporting and writting results in the Custom fields) are not a problem at all !!

We can exchange our ideas in this thread.

Setting the Dynamic Range you would need 2 variables.
1. The single Peak Signal of the Track at a certain Frequency !!!
2. Chronical Point(s) that the signals close to the Peak Signal Happen.

Then If the Peak Signal is Low then add Gain......

So a report can be of the type:
Code: Select all
Peak Signal 8.5

Other Peak Points around Peak Signal (from 8.0 to 8.5)

Signal :      8.3 ------ 8.5 ----- 8.0 ----- 8.2
Point(in ms) 12234-----55145----115333-----115666


Then you can fantasize !!!!



Thanasis
Thanasis
 
Posts: 84
Joined: Sun Aug 28, 2011 2:53 am

Re: Read wave data

Postby Aff » Fri Apr 20, 2012 4:04 pm

So you would write something like a DSP plugin? I guess you would only get the signal of the currently playing song? For my purposes this would not be suitable, as I'd like to scan all songs in the library in a background task. But let me know of your progress, maybe we can share some findings.

(BTW: modern songs are already heavily compressed and limited, I would need some magic expander and de-clipping therefore...)
Aff
 
Posts: 206
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Read wave data

Postby Thanasis » Fri Apr 20, 2012 4:47 pm

Ohhh. I think you are looking for "hard" plug-ins.
Thanasis
 
Posts: 84
Joined: Sun Aug 28, 2011 2:53 am


Return to Addons developer forum

Who is online

Users browsing this forum: No registered users and 0 guests