0
$\begingroup$

Hi Blender enthusiasts.

I've been trying to understand how the ffmpeg shoswpectrumpic function works. It allows you to generate a spectrogram from an audio file using either a linear, or logarithmic scale for the frequency.

I've generated a tone getting higher at a constant rate, and generated 2 spectrograms from it :

I want to understand what kind of operation ffmpeg applies when using the "log" option.

My idea is to distort the Y axis on the UVmap so I can 'morph' the linear image to the log image. But I don't know what operation I should apply to go from linear to log ?

enter image description here

If you have any idea of how to approach this problem please share, I've been at it for hours...

Here's my blend file :

edit : ok I've found an operation that seems to work, but I don't understand why...

enter image description here

The operation goes like this :

y = 10^(-3*(1-y))

Anybody knows why this particular operation works ?

$\endgroup$
4
  • $\begingroup$ Have you tried the logarithm operation in the math node? $\endgroup$ Commented Jul 22, 2023 at 18:38
  • $\begingroup$ I tried it and it does curves the UVs, but it goes the wrong way, and the curve doesn't match the one I'm trying to copy... $\endgroup$
    – holybobine
    Commented Jul 22, 2023 at 19:15
  • 1
    $\begingroup$ Your file has been deleted, can you share it again? blend-exchange.com $\endgroup$
    – taiyo
    Commented Jul 22, 2023 at 22:43
  • $\begingroup$ Thanks @taiyo it should be good now ! $\endgroup$
    – holybobine
    Commented Jul 23, 2023 at 0:05

0

You must log in to answer this question.

Browse other questions tagged .