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

Over the top frequency

For general discussion related FlowStone

Over the top frequency

Postby BobF » Thu Jun 09, 2016 9:12 pm

Hello gang,
Ok I know I create some wierd modules it has been said, but now I have a weird question. I know the highest oscillator frequency is like 44100 Hz correct ? So let's say I am using a frequency doubler (ring modulater, etc), frequency shifter, or pitchshifter, and I go above 44100 Hz, what happens to the frequency ?

Just wondering because I need something above 44100, but I guess it is not possible, again correct?

Thanks for any insight on this.

Later then, BobF.....
BobF
 
Posts: 598
Joined: Mon Apr 20, 2015 9:54 pm

Re: Over the top frequency

Postby TheOm » Thu Jun 09, 2016 10:33 pm

No, the maximum frequency that an oscillator can produce (including overtones) is the Nyquist frequency, which is always half the sampling rate (e.g. 22050Hz at a Sample rate of 44100Hz). Any frequency that would be higher than this limit will get mirrored back into the 0 to Nyquist range. This is called aliasing and should usually be avoided.
To be able to temporarily process frequencies higher than Nyquist you have to employ oversampling.
TheOm
 
Posts: 103
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany

Re: Over the top frequency

Postby BobF » Thu Jun 09, 2016 10:59 pm

Hello Om or is it TheOm,

Thanks for the responce. You know I really thought it was 22050, but I let my brain get fooled. I have several oscillators that have there freq knobs marked from 1Hz to 44100Hz so I was not thinking. Guess it is old age creating in also.

So how high with oversampling? Do you have an example?

P.S., Say your name is not familiar, have you posted at all before or on the old Synthmaker sight?
Hope to hear more from you in the future. Again thanks, much appreciated.

Later then, BobF.....
BobF
 
Posts: 598
Joined: Mon Apr 20, 2015 9:54 pm

Re: Over the top frequency

Postby Spogg » Fri Jun 10, 2016 8:15 am

TheOm wrote:No, the maximum frequency that an oscillator can produce (including overtones) is the Nyquist frequency, which is always half the sampling rate (e.g. 22050Hz at a Sample rate of 44100Hz). Any frequency that would be higher than this limit will get mirrored back into the 0 to Nyquist range. This is called aliasing and should usually be avoided.
To be able to temporarily process frequencies higher than Nyquist you have to employ oversampling.


I've often wondered about oversampling so maybe I need some education. My starting point is my "understanding" that FS addresses and processes all audio threads once per sample, say at 44.1kHz and this is locked into the software (SynthEdit is every 6 samples IIRC). So, how can we make this happen twice as fast for example? Is this possible if we use assembler and if so, does the asm code block get executed more frequently than the sample rate?

Cheers

Spogg
User avatar
Spogg
 
Posts: 3324
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Over the top frequency

Postby martinvicanek » Fri Jun 10, 2016 8:25 am

No, you process at samplerate. For instance to oversample by a factor of 2 you would process two streams in parallel, one for the odd samples and another for the even samples. However, before sending the result to the sound card, you need to decimate (= lowpass and keep only every other sample).
User avatar
martinvicanek
 
Posts: 1319
Joined: Sat Jun 22, 2013 8:28 pm

Re: Over the top frequency

Postby Spogg » Fri Jun 10, 2016 9:38 am

martinvicanek wrote:No, you process at samplerate. For instance to oversample by a factor of 2 you would process two streams in parallel, one for the odd samples and another for the even samples. However, before sending the result to the sound card, you need to decimate (= lowpass and keep only every other sample).


Thanks Martin but, and I'm so sorry, I really don't understand the advantage of what you suggest. Samples are created or come in one at a time, even, odd, even... so how does this technique manage to process them in parallel? Presumably a buffer would be needed? Plus, you then apparently discard some information.
Also, is what you're describing really oversampling? I referred to this article...
https://en.wikipedia.org/wiki/Oversampling
...and this led me to understand that it's done by the sample rate or frequency.

Cheers

Spogg
User avatar
Spogg
 
Posts: 3324
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Over the top frequency

Postby KG_is_back » Fri Jun 10, 2016 10:54 am

Spogg wrote:Samples are created or come in one at a time, even, odd, even... so how does this technique manage to process them in parallel? Presumably a buffer would be needed? Plus, you then apparently discard some information.


In order to convert higher sample-rate to lower sample-rate, you need to remove the frequencies above new Nyquist frequency - otherwise they'd be turned into aliasing.

Processing even/odd samples in parallel is just a hack to overcome the FS limitation. It isn't really parallel - the code is still executed serially. It is just that you use two identical blocks of code.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Over the top frequency

Postby martinvicanek » Fri Jun 10, 2016 12:02 pm

Spogg wrote:sorry, I really don't understand the advantage of what you suggest.
My bad, I didn't explain it well. Instead of "odd" and "even" samples I should have written perhaps "integer" and "half-integer" samples, so in effect you process twice as many samples at unchanged rate. You do that in two code blocks in order to get the job done in time. There used to be a nice oversampling tutorial on the SM Web site. :(
MyCo posted an improved oversampling toolkit here a while ago, dunno if he's included some examples.
User avatar
martinvicanek
 
Posts: 1319
Joined: Sat Jun 22, 2013 8:28 pm

Re: Over the top frequency

Postby BobF » Fri Jun 10, 2016 1:00 pm

Hello all,

Ok I can kind of picture the idea, but a nice example would be nice for total clarification. How would you perform the oversampling to get a higher frequency and how high can you really go?.

Thanks, BobF.....
BobF
 
Posts: 598
Joined: Mon Apr 20, 2015 9:54 pm

Re: Over the top frequency

Postby tester » Wed Jun 29, 2016 9:53 am

Long time ago - there was a nice discussion about advantages and disadvantages of oversampling vs double precision in context of filters. Everyone wants to get the best of their designs. But simplicity sometimes is better.

You must keep in mind, that "improvement methods" will always produce some kind of artifacts, because they use approximations. For example - you may get better details and clarity on highs, mut more artifacts in low frequency ranges. Or you may handle higher frequency span, but in the process - phase linearity across the spectra will be affected due to approximations used. So it's not only about the processing speed, but about the limitations of the output.

Instead of adding useless numbers to your modules - add functional tricks, that improve overall sounding quality. These would be your "proprietary algorithms" so to speak.

One note that you may wish to know, if the problem is with playback preview.

Long time ago, I thought I had a problem with oscillators, because when I lowered the volume - at some point the sound was shutting down (and generally the quality get worse at low levels). Then I realized, that the problem was not with oscillators... Directsound and it's 16bit playback settings was the "killer feature". Which means, that at c.a. 90dB below the 0=max of my soundcard - sound was shutting down, because there was not enough bits to handle the playback! (96dB = 16bit). And also remember, that bit depth (dynamic range in use) defines your sound quality when you preview sounds. If you set internally (in FS) the playback at -48dB, then although you deal with 32bit file - if directsound limit is 16bit, then you listen to 8-bit dynamic range (it does not affect 32bit+ processing). This may give the impression, that there is something wrong with the sound. That's why ASIO helps when previewing sounds.

So these are some practical thoughts on ordinary use.

//edit:

One final thought.

I think more and more people just simply use audio files initially at higher samplerate, like 96kHz or 192kHz (which gives respectively 48k or 96kHz band). The reason is simple. If you have 4 plugins, each with oversampling, then you repeat the oversampling and downsamplig process 4 times, which will affect your sound quality. If artifact types are comparable in type, then the problem will be stronger. Or?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet


Return to General

Who is online

Users browsing this forum: No registered users and 43 guests