Basic Sample Value Question

DSP related issues, mathematics, processing and techniques
Post Reply
Rocko
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Basic Sample Value Question

Post by Rocko »

Hi,

Sometimes the basic questions are the most important.

In FS environment, are all audio samples converged to [-1:1], or are there audio sample with a abs value greater than 1?

Thanks,
Rocko
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Basic Sample Value Question

Post by tester »

Output (and some processing modules in your schematic) requires, that you scale your audio values into the range (-1;+1), not abs (abs just means, that there will be values between 0 and 1 for that case). Everything else depends on you, i.e. you may use unscaled streams inside the schematic.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Basic Sample Value Question

Post by KG_is_back »

The is <-1,1> range rather an industry standard. What it means, your soundcard outputs values in this range and expects values in this range. If you exceed this range clipping occurs. However, that happens only inside your soundcard - in your FS schematic you can use any values you like.

Can audio input/output of your plugin be outside <-1,1> range? It should not, but it can. Most DAWS do not clip audio in between plugins, so it it very well possible that your plugin receives signal that is above the range ("in the red area" on the meters), alhough end-user (ie. the mixing engineer) should avoid that. You can also send out such data, but be warned: 1.soundcards will clip if such high input gets to them. 2.some plugins may also have some clipping in them, to prevent such high signals from damaging the soundcard.
And you should do that too. I recommend putting clipper module just before output (and possibly also just after input) and put a warning in a manual that your software clips the audio if it's too hot. Or don't put the clippers there and warn the user, that your software may output sound above 0dBFS ( = outside <-1,1> range) and may damage his/hers gear/hearing if used incorrectly.
Post Reply