Playing sounds recorded by an accelerometer in different g(acceleration) levels

I have some stereo sound recorded using an accelerometer (A/600/TC DJB Instruments) on Audacity that i want to play on the vibration shaker V406 of BKSV. BKSV have their own software for playbacks but only for mono sounds. So i want to use Audacity to play the recorded stereo sounds.

Since the sounds were recorded using an accelerometer, i suppose that the magnitude observed in Audacity is also proportionnal to the acceleration unit ‘g’ and not to dB. But since Audacity only has a dB scale i don’t know what i am seeing exactly in Audacity. Could anyone shed some light on this?

I would like to be able to play the sounds on the shaker at a specific level, for example at 0.5g and then at 1g etc. However, since dB and ‘g’ are not proportionnal i’m not exactly sure how to do it. I’m not even sure if this is possible for the dB scale, since i am a new user of Audacity.

Any help in this matter is well appreciated.

Don’t worry about the difference between dB and g.

If a piece of string is 12 inches long, it doesn’t matter whether you measure it in inches, cm or nautical miles, the string is still the same length.
Similarly, when Audacity records a signal, it is just storing a string of numerical values. The date (the numeric values) is the same whether they are represented on a dB scale or any other scale.

The more important issue is whether Audacity can see the shaker device. Is the device listed as a playbayback device in the device toolbar? If not, then Audacity can’t see it and so cannot play through it.

magnitude observed in Audacity is also proportionnal to the acceleration unit ‘g’ and not to dB. But since Audacity only has a dB scale i don’t know what i am seeing exactly in Audacity. Could anyone shed some light on this?

If you have an independent way of measuring g-force you can make a calibration and do the calculations on a spreadsheet, but there are couple of tricky things, especially if you’re not familiar with decibels -


If you look to the left of the waveform you’ll see a scale from zero to +/- 1. 1.0 (or 100%) is the digital 0dB reference. Normal soundwaves waves (and natural vibration) is symmetrical with approximately equal positive & negative deviations. So, you can ignore the negative values, or take the absolute values, or average the absolute values, or calculate the RMS, etc. (With digital audio we are usually interested in the absolute-peak values.)


There is no default calibration. For example if you play a 0dB audio file, the actual loudness depends on the particular digital-to-analog converter (or soundcard), the volume control setting, the gain/power of the amplifier, the efficiency of the speakers, how close you are to the speakers, and any sound reflections in the room. The same is true on the recording side. And, the same will be true for g-forces.

Note that the reference for dB SPL (sound pressure level or acoustic loudness) is approximately the threshold of hearing (the quietest sound that a person with normal hearing can hear). So digital dB levels are usually negative numbers and dB SPL is a positive number.

However, there is a direct correlation. If you reduce the digital level by 3dB, the acoustic level will also drop by 3dB. (That’s assuming everything is linear so you’re not driving the amplifier into distortion or something like that.)

\

Decibels are always relative, and since they are logarithmic subtraction is a ratio.

It might be better if you look up the formulas because the forum doesn’t seem to allow subscripts or superscripts. Note that the amplitude formulas use a factor of 20 and the power/energy formulas use a factor of 10, so make sure you are using the amplitude formulas…

A = Amplitude (g in your case)

A = Aref x 10 to the power of (dB/20)

dB = 20log x A/Aref

…Everybody that works with audio knows that 6dB is an amplitude factor (or ratio) of 2. (+6dB is double, and -6dB is half.)

So here’s an easy example of a 6dB increase -

Let’s say we have a calibration/reference of 2g = -10dB. Then, let’s say we now have -4dB on the digital scale. That’s a +6dB difference so we plug +6db into the formula:

g = 2g x 10 to the power of (6/20) = 4g

…That’s all very easy once you have a calibration reference and a formula in your spreadsheet. Note that your recording & playback calibration references will be different.

Don’t worry about the difference between dB and g.

If a piece of string is 12 inches long, it doesn’t matter whether you measure it in inches, cm or nautical miles, the string is still the same length.
Similarly, when Audacity records a signal, it is just storing a string of numerical values. The date (the numeric values) is the same whether they are represented on a dB scale or any other scale.

I need to play the sound to the shaker in different ratios of g, so if they are not proportional is not the same as changing the ratio of the SPL by adding or substracting dB.

The more important issue is whether Audacity can see the shaker device. Is the device listed as a playbayback device in the > device toolbar> ? If not, then Audacity can’t see it and so cannot play through it.

A BKSV engineer assured me that using a sound card to connect the shaker Audacity would be able to detect it. Although, as your remarked i need to find a different sound card.

If you have an independent way of measuring g-force > you can make a calibration > and do the calculations on a spreadsheet, but there are couple of tricky things, especially if you’re not familiar with decibels -

What do you mean by independent way of measuring g-force and make a calibration? The accelerations of the recordings were measured once during the recording, with an accelerometer, and they were also measured in the LASER Usb software where the accelerometer served for the control.

But their amplitude in dB was not measured. I do not understand what you mean with calibration reference either.


There is no default calibration. > For example if you play a 0dB audio file, the actual loudness depends on the particular digital-to-analog converter (or soundcard), the volume control setting, the gain/power of the amplifier, the efficiency of the speakers, how close you are to the speakers, and any sound reflections in the room. The same is true on the recording side. > And, the same will be true for g-forces.

Note that the reference for dB SPL (sound pressure level or acoustic loudness) is approximately the threshold of hearing (the quietest sound that a person with normal hearing can hear). So digital dB levels are usually negative numbers and dB SPL is a positive number.

Yes the reference for dB is the smallest variation in pressure that the ear can detect and it is 20µPa i think. So what do you mean there is no default calibration? The notion of calibration that i have in mind is the calibration of a microphone using a pistonphone for example.

Decibels are always relative, > and since they are logarithmic subtraction is a ratio.

It might be better if you look up the formulas because the forum doesn’t seem to allow subscripts or superscripts. Note that the amplitude formulas use a factor of 20 and the power/energy formulas use a factor of 10, so make sure you are using the amplitude formulas…

A = Amplitude (g in your case)

A = Aref x 10 to the power of (dB/20)

dB = 20log x A/Aref

I have read somewhere that in order to convert g in dB you have a reference of 1µPa but i think these dB are different than the dB SPL. Anyhow, in order to have the same dB SPL using pressure and Aref the reference value should be always constant. Like in the case of Pref where:

SPL = 20log(P/Pref)

Note that your recording & playback calibration references will be different.

You mean because the sensitivity of the sound card and the shaker are different than the ones of the equipment used for the recording?

Thanks a lot for your answers and excuse me for further enquiring but there are some notions i didn’t get.

I also found this conversion chart which i find a bit strange.
http://www.gracey.co.uk/downloads/db_units_chart.pdf

For example for 80 dB, we are at the value of 0.2.
If we calculate the SPL of 0.2:
SPL_0.2 = 20*log(0.2/2e-5) = 80dB so 0.2 is in Pa and not in g.

Anyway, remembering what Steve said about Audacity using numerical values i think i get what you said DVDdoug. I just need the reference value Aref that it will be used in Audacity when i + or - dB values and its not a matter of SPL. But, which one is this referenence value, how do i find it?

Thanks in advance for your help guys, it’s much appreciated.

“Full scale” (when the waveform vertical amplitude = full track height) is 0 dB = numeric range +/- 1.0

“Sample Data Export” (https://manual.audacityteam.org/man/sample_data_export.html) allows you to export the numeric values of a selection of samples (select “Linear” as the units).

I have exported both of the files in linear values that you can find attached here. The linear values are doubled so everything is in order.

In fact the reference value does come in play at all since no matter the reference value in the calculations we just have 20log(2). So in this case i still don’t understand what you were saying DVDdoug about the calibration reference and the formula.
sample-data2.txt (1.88 KB)
sample-data.txt (1.88 KB)

In fact the reference value does come in play at all since no matter the reference value in the calculations we just have 20log(2). So in this case i still don’t understand what you were saying DVDdoug about the calibration reference and the formula.

We don’t know what g-force those numbers represent. Do you know?

If you have ONE known g-force for a certain (peak) numerical or dB reading you can make a calibration. A +6dB change would be double the g-force but the change/difference probably isn’t helpful to you without a calibration point.

And… You need separate calibration values for recording/measurement and playback/generation calibration. The (recorded/measured?) values in your text file are rather low so I’d guess if you play them back through your vibration device you’ll generate lower g-values than you were measuring. And since the numbers are low, you may need some analog amplification for the accelerometer. (Of course, any amplification changes the calibration.)