< Back to IRCAM Forum

Amplitude values

Bonjour,

When analyzing-exporting “amplitude” values, I wonder what “kind of” amplitude values they refer to??? (Db, DbSPL, Db (A) etc etc)
(I guess not linear Amp.(?))
The two analyses I use is Partiels and Peaks. The values looks different depending on which one I use.
Please enlighten me!

Merci!

Savannah

Hello Savannah

The short answer is: indeed the values refer to linear amplitudes.

A bit longer:
Peaks and partials are stored in the SDIF format. For storing peaks we use the 1PIC format, and for partials depending on the analysis we use 1TRC or 1HRM matrices. You can read more about these matrices here http://recherche.ircam.fr/anasyn/sdif/standard/types-main.html where you can find all the respective SDIF matrices.

Best
Axel

Dear Axel,

Thank you for your answer, and sorry to be late on the ball!

I still don’t quite understand what the amplitude values really “are” (?), since they are negative also,
and I dont se pairs of real/imag numbers.
(I need to get to the magnitude and possible Db also)

Thank you for your help!

Best, Savannah

Hi Savannah

I still don’t quite understand what the amplitude values really “are” (?),

Did you read the sdif pages? Normally they explain this pretty well. If you want to understand we ned a bit of mathematics

The amplitudes are the amplitudes of a sinusoidal model.
If you generate a sinusoid you have to specify the amplitude, frequency and phase.

For example the samples of a sinusoidal signal can be written mathematically as

x(n) = A sin(2 pi f n / r +p)

n indicates sample position, A the amplitude, f the frequency in Hz, r the sample rate in Hz, and p the phase at sample position 0.
Now the values you find in peak and sinusoidal analysis as amplitude is the A.

since they are negative also,

They should never be negative. If yo see negative amplitudes please send me the sound file, and the command parameters you used to generate these files.

and I dont se pairs of real/imag numbers.

As these are amplitudes there are no real and imaginary parts. You get those only if you deal with amplitudes and phases.

(I need to get to the magnitude and possible Db also)

The values are the magnitudes, to convert to dB you would apply

A_dB = 20 log10(A/A_ref)

where A is the value you get from the analysis and A_ref is a reference value that you can choose as you like (dB is a relative measure). If you choose A_ref = 0.5 you would get the dB compared to full scale of the audio signal for example (might as well be A_ref= 1 tis depends on how we scale the amplitude, I don’t remember this but I could check).

Best
Axel

Dear Axel,

Oh, sorry to not be clear. I am all clear about the info in the SDIF files and so on.
My problem and confusion is/was the negative numbers.
But Hey, I think I know now why… so when I deselect phase info in the export from SDIF to txt I get the phase info, and lose the magnitude values. (I also lose the number of partials info)
I did that as a start, and could just not make any amplitude sense from all the phase values.(obviously :wink:
Sorry for the mess, and thanx for the math to get to Db! :slight_smile:

All the best and thank you for your help!

Savannah

Dear Savannah

I am happy to hear that you are seeing clearer now. I feel, however, that your summary gives a quite confusing impression. You say you get the phase info if you deselect the phase and you loose the amplitudes? This would seem like a bug to me, but after a few trials with deactivating phases I cannot reproduce what you describe. Whenever I deselect phases the phases (and the negative values) disappear. I don’t know the export to ascii stuff however, and there are really many options in this export dialog, and a few things are not quite clear there so I would prefer to wait for Charles Picasso coming back from holiday to help us with that.

During my trials I found however that the proper normalization A_ref for converting to dB would be 1, so if you want to get amplitude in dB with respect to the maximum full scale sinusoid that can be represented in the sound file then you should use

A_dB = 20 log10(A)

Best
Axel

Hi Axel,

:slight_smile: Yes. sorry for being so short in my communication. That brings confusion.
It is just in due to lack of time and internet connection at the moment.

Yes, it seems like a bug, I did not report it like that, because I am with Audiosculpt 3.0, and thought this might be different in the latest version. I just loaded the last version down, and will try it asap.
I’ll let you know if how it goes!

And again: thanx for the help!

Best wishes, Savannah