Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

dsp terms and their meaning

For general discussion related FlowStone

dsp terms and their meaning

Postby tulamide » Wed May 20, 2015 5:50 pm

Once again I'm confused by various terms. I hope, some of you will be able to help me in a not-so-specialized language, because it won't help me in understanding, if a technical term is explained with other technical terms that need explanations, too :lol:

1) Say, I have two sample values from a sound sampled @ 44.1 kHz. First is 0.5, second is 1.0. Now (for example in Ruby) I double both. 0.5, 0.5, 1.0, 1.0 Is that equivalent to the term "2x oversampling"?

2) I now manipulate the 4 values, so that they follow the same linear progression as before: 0.5, 0.66~, 0.83~, 1.0. Is there a term for this operation, other than linear interpolation?

3) Those values can't be used to play the sound, of course, since the system still expects a sample rate of 44.1 kHz. So I would halve the number of values again. Is that equivalent to "2x undersampling"?

4) Taking only every other sample would distort the signal. Instead of "0.5, 1.0" like the original, it would now read "0.5, 0.83~". Is there any situation where this would make any sense?

5) What would be a standard application for undersampling? A Bitcrusher?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: dsp terms and their meaning

Postby MyCo » Wed May 20, 2015 6:40 pm

1. I would call it upsampling with step interpolation... That's not used for Oversampling though, at least I haven't seen that being used for it. The quality would be very bad :lol:

2. When you go from [0.5, 1] to [x, 0.5, 0.75, 1] then it would be linear upsampling, or upsampling with linear interpolation (x would be unknown because it depends on the previous sample). Your values [0.5, 0.66, 0.83, 1] would correspond to a single 4x Upsampling step with linear interpolation. Single step means you upsampled directly 4 times the sample rate, and didn't upsample 2 times with 2x Upsampling. For a 2x2 Upsampling the result would be:
Code: Select all
1. step [x, 0.5, 0.75, 1]
2. step [x, x, x, 0.5, 0.625, 0.75, 0.875, 1]


3. This would be downsampling/decimation

4. Yes, downsampling without filtering/interpolation isn't used that often. However you can use it for a decimator/samplerate reducer distortion effect, when you don't care about aliasing

5. Proper resampling is quite important. Most modern and "good" digital distortion effects use it to reduce aliasing. Have a look at the Oversampling toolkit. There is an example that shows the differences of oversampling on a samplerate reducer effect.
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: dsp terms and their meaning

Postby martinvicanek » Wed May 20, 2015 8:12 pm

MyCo beat me on this. :lol: I would only add the oversampling tut at the good old SM Web site.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: dsp terms and their meaning

Postby KG_is_back » Wed May 20, 2015 10:41 pm

tulamide wrote:1) Say, I have two sample values from a sound sampled @ 44.1 kHz. First is 0.5, second is 1.0. Now (for example in Ruby) I double both. 0.5, 0.5, 1.0, 1.0 Is that equivalent to the term "2x oversampling"?


2x oversampling is a fancy way of saying "doubling the point density". The method you described is called "round to nearest" method. It is the cheapest oversampling method (you basically pick the closest value form the original sample-set, in this case the previous one).

tulamide wrote:2) I now manipulate the 4 values, so that they follow the same linear progression as before: 0.5, 0.66~, 0.83~, 1.0. Is there a term for this operation, other than linear interpolation?

This is some kind of filtering. I dunno what's the actual name nor formula of it. It isn't linear interpolation though.

tulamide wrote:3) Those values can't be used to play the sound, of course, since the system still expects a sample rate of 44.1 kHz. So I would halve the number of values again. Is that equivalent to "2x undersampling"?

Yes. However, before undersampling you usually want to remove frequencies over the new nyquist frequency (Ny=half the sample rate = 22.05kHz), to prevent aliasing. Aliasing occurs during undersampling, because frequencies above the (new halved) nyqist mirror back into 0Hz-to-Nyquist range as "Aliases" (usually undesirable).

tulamide wrote:4) Taking only every other sample would distort the signal. Instead of "0.5, 1.0" like the original, it would now read "0.5, 0.83~". Is there any situation where this would make any sense?

The whole process you described is basically oversampled filter. upsample->filter->downsample. It's a common thing to do, because most filters behave rather funny near the nyquist frequency.

tulamide wrote:5) What would be a standard application for undersampling? A Bitcrusher?

Possibly yes. Bitcrusher is a little bit different though. Bitcrusher reduces the precision at which each sample is recorded - it doesn't do anything with sample rate. example (bitcrush to 4bit quality): 0, 0.125, 0.2544, 0.4588, 0.7862, 1.02 goes to 0, 0, 0.25, 0.5, 0.75, 1.0
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: dsp terms and their meaning

Postby tulamide » Thu May 21, 2015 12:12 pm

Thank you guys!

That was helpful, and especially KG's descriptions were easy to follow. I knew about the oversampling toolkit, but wasn't brave enough yet to look at it, because it doesn't make much sense if I don't even understand the basics right. But now I will have a look at it, and also at Martin's link. Thanks a bunch!

May I just ask one more question? Is there any difference between the terms "oversampling" and "upsampling", resp. "undersampling" and "downsampling"?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: dsp terms and their meaning

Postby martinvicanek » Thu May 21, 2015 9:00 pm

tulamide wrote:Is there any difference between the terms "oversampling" and "upsampling", resp. "undersampling" and "downsampling"?

I would say up- and downsampling simply means conversion, sometimes called resampling. Oversampling to me is sampling at a higher rate than would strictly be necessary, or higher than the target rate. Likewise, subsampling would be sampling at a lower rate than what one might consider adequate, or lower than the target rate,
As KG pointed out, when resampling you need to use lowpass filters in order to prevent introducing artifacts or aliasing.
Supersampling is often used to mitigate frequency warping in filters, or to suppress aliasing in oscillators or nonlinear processing devices like fuzz boxes. Subsampling may be used to emulate lo fi, or, in a more constructive way, to save CPU when your DSP can get away with less than 44 kHz (think of pitch extraction, where the fundamental is well below Nyquist).
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: dsp terms and their meaning

Postby KG_is_back » Thu May 21, 2015 11:32 pm

tulamide wrote:May I just ask one more question? Is there any difference between the terms "oversampling" and "upsampling", resp. "undersampling" and "downsampling"?


Not really, they are synonyms. There might be some stylistic difference where people tend to use them.
As Martin mentioned up/down sampling usually refers to conversion. Like when module takes input at 44kHz and outputs 88kHz it is upsampling.
Over/under sampling usually means that the module is internally over/undersampled. For example 3xoversampled SFZ filter means, that it takes input at 44kHz internally upsamples it, processes it and downsamples just before output (so 44kHz goes back out). Stock Flowstone SFZ filter is an example of that.
But again, it's a matter of style of speech = opinion, not a rock-solid term difference.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: dsp terms and their meaning

Postby KG_is_back » Thu May 21, 2015 11:54 pm

While reading SOS, I stumbled across this: http://www.soundonsound.com/information/Glossary.php
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: dsp terms and their meaning

Postby Perfect Human Interface » Fri May 22, 2015 6:31 am

KG_is_back wrote:While reading SOS, I stumbled across this: http://www.soundonsound.com/information/Glossary.php


Neat, didn't know about that. I think Sweetwater's excellent glossary trumps it though!
http://www.sweetwater.com/insync/category/glossary/
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: dsp terms and their meaning

Postby tulamide » Fri May 22, 2015 2:55 pm

Perfect Human Interface wrote:
KG_is_back wrote:While reading SOS, I stumbled across this: http://www.soundonsound.com/information/Glossary.php


Neat, didn't know about that. I think Sweetwater's excellent glossary trumps it though!
http://www.sweetwater.com/insync/category/glossary/

Nice one, PHI! Thanks for sharing. Bookmark'd right away :D
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany


Return to General

Who is online

Users browsing this forum: No registered users and 71 guests