Oscillator, about wavetable size and interpolation

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi there

AM is interesting , I'll have to have a look into it

Cheers

Jon

Post

Just listened, I think they sound and look OK.
I think i'll experiment with it.
Thanks,
A.F.
stefancrs wrote:
Can you show us some examples of your waveform ?
observe: my waveforms are not alias free, nor are oversampled waveforms, they are just anti-aliased (reduced aliasing).

ftp://217.215.143.219/

both wav's and mp3's
duty cycle modulation on all the examples, except on the latter part of the triangle example where it is a pure sawtooth all the way. nothing but one oscillator is active. It was a few years since I wrote this softsynth, so it's not really up to date with anything :)

Post

Well. I have replaced them by now with self-phase-feedback oscillators or whatever one should call them :) I found that method way cooler and more flexible. (way less amounts of code, less cpu usage, higher sound quality)
Stefan H Singer
Musician, coder and co-founder of We made you look Web agency

Post

stefancrs wrote:Well. I have replaced them by now with self-phase-feedback oscillators or whatever one should call them :) I found that method way cooler and more flexible. (way less amounts of code, less cpu usage, higher sound quality)
You mean, the samples I listened yesterday : trianglething... are not using that method you were talking about. They sound really analog to me... What is it all about ? Can you send me a short code to get started ? Please :)
Cheers,
A.F.

Post

The stuff you listened to was my old oscillators, the ones using integration and stuff. Now I use the y = sin(phase + y * feedback) and the different variatons of them. You don't need no code-snippet to try those out.
Stefan H Singer
Musician, coder and co-founder of We made you look Web agency

Post

stefancrs wrote:The stuff you listened to was my old oscillators, the ones using integration and stuff. Now I use the y = sin(phase + y * feedback) and the different variatons of them. You don't need no code-snippet to try those out.
Nice, i will try for sure :D
Hope I'll have the time.

Post

Muon Software Ltd wrote:
This is why I have to assume your implementation might have gone wrong somewhere - even putting aside my own work, there is Iblit and PolyIblit out there that sound OK to me, not mention Mercury 1.
Funny, soundwise those synths are my absolute favourites :)

Post

stefancrs wrote:The stuff you listened to was my old oscillators, the ones using integration and stuff. Now I use the y = sin(phase + y * feedback) and the different variatons of them. You don't need no code-snippet to try those out.
Just tryed. Nice, waveform ...
BUT: It's way too mouch bandlimited. For 440 Hz it's limited at ~5KHz. So how did you made it ? If the feedback is too big, it distorts the whole thing.
I'm thinking of creating 1-4 harmonics of this wave and mix them using amplitude 1/n (n=1...harmonics).
Any other methods ?
Thanks,
A.F.
:?

Post

Well, actually it isn't bandlimited, it's just a matter of not having that many overtones in it. You will get aliasing at really high tones, you could avoid this by decreasing the feedbacks at higher frequencies (I will try that out later). And I have found that you get more overtones with negative feedback than with positive feedback. Or if it was the other way around :)
If you like the sound of it, use it. I have these different waveforms (shape goes from 0.0 to 1.0)
sine->saw
out = sinf(phase + lastOut * (shape - 0.5f) * 2.0f);
lastOut = out;

saw->square
out = sinf(phase + lastOut * (1.0f - shape) * + lastOut * lastOut * shape);

pwm square1
square1 = sinf(phase - lastOut1 * lastOut1);
lastOut1 = square1;
square2 = sinf(phase + shape * pi * 2 - lastOut2 * lastOut2);
lastOut2 = square2;
out = (square1 + square2) * 0.5f;

pwm square2
float square1 = sinf(phase - lastOut1);
lastOut1 = square1;
float square2 = sinf(phase + shape * pi2 - lastOut2]);
lastOut2 = square2;
out = (square1 - square2) * 0.5f;

though they aren't exactly like this, I have tweaked the feedbacks everywhere, having them at like 1.1 instead of 1.0, giving for instance float square1 = sinf(phase - lastOut1 * 1.1f); in the pwm square2. Some trial and error :)
Stefan H Singer
Musician, coder and co-founder of We made you look Web agency

Post

stefancrs wrote:Well, actually it isn't bandlimited, it's just a matter of not having that many overtones in it. You will get aliasing at really high tones, you could avoid this by decreasing the feedbacks at higher frequencies (I will try that out later). And I have found that you get more overtones with negative feedback than with positive feedback. Or if it was the other way around :)
If you like the sound of it, use it. I have these different waveforms (shape goes from 0.0 to 1.0)
sine->saw
out = sinf(phase + lastOut * (shape - 0.5f) * 2.0f);
lastOut = out;

saw->square
out = sinf(phase + lastOut * (1.0f - shape) * + lastOut * lastOut * shape);

pwm square1
square1 = sinf(phase - lastOut1 * lastOut1);
lastOut1 = square1;
square2 = sinf(phase + shape * pi * 2 - lastOut2 * lastOut2);
lastOut2 = square2;
out = (square1 + square2) * 0.5f;

pwm square2
float square1 = sinf(phase - lastOut1);
lastOut1 = square1;
float square2 = sinf(phase + shape * pi2 - lastOut2]);
lastOut2 = square2;
out = (square1 - square2) * 0.5f;

though they aren't exactly like this, I have tweaked the feedbacks everywhere, having them at like 1.1 instead of 1.0, giving for instance float square1 = sinf(phase - lastOut1 * 1.1f); in the pwm square2. Some trial and error :)
Yes, I noticed that a feedback of 1.1 makes better results. And at higher freq i will need to reduce the feedback. The results were nice, but still not bright enough. And the waveform was not really saw, it has is V- peak rounded a little. I also compared with a pure saw wave made with FFT, and this sounded mouch cleaner, but darker also.

Post

stefancrs is a MSVC user :?

Post

helium wrote:stefancrs is a MSVC user :?
Ok...But why are you telling me this ? :?

Post

And the waveform was not really saw
Most aren't if you by saw mean a linear sloping |\|\|\| or /|/|/|. Take a look at a few from different synths.
Stefan H Singer
Musician, coder and co-founder of We made you look Web agency

Post

'cos it's so damn boring here. And I just found it out by looking at

Code: Select all

sine->saw 
out = sinf(phase + lastOut * (shape - 0.5f) * 2.0f); 
lastOut = out; 

Post

I found a way to make it more like a saw wave...
Instead of phase feedback, i feedback the waveform itself. The waveform it's closer to a saw wave, the spectrum is bright. Little more alias.

out =(sin(phase + out* feedback*3)+(out* feedback*3)+0.78)*0.3;//0.78 (tweaks for DC offset)

Post Reply

Return to “DSP and Plugin Development”