Open303 - open source 303 emulation project - collaborators wanted
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
nollock: but "cheaper" ? and yet the same result?
btw, i just had a wierd idea (based on an accident)
the tb-303 filter always having a little feedback, even when Resonance knob = 0?
i really gotta mess with this, because it makes sense in some places
btw, i just had a wierd idea (based on an accident)
the tb-303 filter always having a little feedback, even when Resonance knob = 0?
i really gotta mess with this, because it makes sense in some places
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr
-
Music Engineer Music Engineer https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=15959
- KVRAF
- Topic Starter
- 4379 posts since 8 Mar, 2004 from Berlin, Germany
i just uploaded a new revision onto the sourceforge. this new revision makes now some of the internal parameters available as user parameters by conditional compilation (#ifdef). i have spent a lot of hours on trying to get the waveshape for the saw right by various filter tweaks (highpass mainly, but i also tried allpasses, phaser-stuff, whatever) - alas, the when the result was somewhat close for one frequency, it got spoiled at another frequency and vice versa. so i figured, that this might be a dead-end road. instead, i'm now considering to use convolution but i actually want to avoid that. i'll try some more general filters by directly placing poles and zeros into the z-plane. if that works out - good. if not, i will seriously consider convolution
-
Music Engineer Music Engineer https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=15959
- KVRAF
- Topic Starter
- 4379 posts since 8 Mar, 2004 from Berlin, Germany
yup, FFT is just an efficient algorithm to calculate the DFT (or the inverse DFT for that matter). there are no approximations introduced, just clever ways to avoid redundant calculations. and - as nollock pointed out - inverse DFT is basically a summation of sinesantto wrote:but "cheaper" ? and yet the same result?
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
where can i read about it (something short, and simple, so i can *understand* how it works..) erm.. i mean the inverse DFT..
btw, sawtooth, it's basicaly a combination of 3 HP filters (there *might* be one more, tho, it's kinda hard to tell) as i mentioned before
btw, i'm now messing around with the idea that the tb-303 filter might always have some feedback, and i get better results
previously i mentioned about the tb-303 filter being at a higher maximum cutoff frequency, compared to mine, in the no-resonance audio sample (anttosawsqr_blahblah.wav)
well, it was odd, because when resonance was increased - both filters act the same way
so i just increased my resonance knob a little, and the curve on the FFT got right
also, phases changed, so i had to change my HP filters again, but now i got better results with the waveforms
and my feedbackHP doesn't need to be as low as it had to before that (i mentioned 54Hz or something, and i wasn't happy)
oh, and my square "tricks" have to be retweaked
but i think this is it..
and i also thing this "minimum feedback level" might vary between different units, it's probably something with the knob (potentiometer or whatever it's called)
btw, what goes wrong with your sawtooth? give a sample, convolution is great, i have lot's of ideas about it, but it sounds scary when you mention it here
btw, sawtooth, it's basicaly a combination of 3 HP filters (there *might* be one more, tho, it's kinda hard to tell) as i mentioned before
btw, i'm now messing around with the idea that the tb-303 filter might always have some feedback, and i get better results
previously i mentioned about the tb-303 filter being at a higher maximum cutoff frequency, compared to mine, in the no-resonance audio sample (anttosawsqr_blahblah.wav)
well, it was odd, because when resonance was increased - both filters act the same way
so i just increased my resonance knob a little, and the curve on the FFT got right
also, phases changed, so i had to change my HP filters again, but now i got better results with the waveforms
and my feedbackHP doesn't need to be as low as it had to before that (i mentioned 54Hz or something, and i wasn't happy)
oh, and my square "tricks" have to be retweaked
but i think this is it..
and i also thing this "minimum feedback level" might vary between different units, it's probably something with the knob (potentiometer or whatever it's called)
btw, what goes wrong with your sawtooth? give a sample, convolution is great, i have lot's of ideas about it, but it sounds scary when you mention it here
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr
-
Music Engineer Music Engineer https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=15959
- KVRAF
- Topic Starter
- 4379 posts since 8 Mar, 2004 from Berlin, Germany
i think, this is rather good:antto wrote:where can i read about it (something short, and simple, so i can *understand* how it works..) erm.. i mean the inverse DFT..
http://www.dspdimension.com/admin/dft-a-pied/
O.K. i'll try that and come backbtw, sawtooth, it's basicaly a combination of 3 HP filters (there *might* be one more, tho, it's kinda hard to tell) as i mentioned before
-
Music Engineer Music Engineer https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=15959
- KVRAF
- Topic Starter
- 4379 posts since 8 Mar, 2004 from Berlin, Germany
mmmhh...or well, probably nothing new for you in there. it's possibly a bit too basic. i guess, dspguide will also have some good explanantions and one step further, there's of course Julius Smith's excellent MDFT:Robin from www.rs-met.com wrote:i think, this is rather good:antto wrote:where can i read about it (something short, and simple, so i can *understand* how it works..) erm.. i mean the inverse DFT..
http://www.dspdimension.com/admin/dft-a-pied/
https://ccrma.stanford.edu/~jos/mdft/
-
Music Engineer Music Engineer https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=15959
- KVRAF
- Topic Starter
- 4379 posts since 8 Mar, 2004 from Berlin, Germany
new revision is up. i could get the sawtooth now much closer to the 303 samples by a combination of 2 highpasses, an allpass and a (subsonic) notch filter. moreover, there's now a new (measurement based) mapping/knob-response for cutoff and envmod, taking also their coupling into account.
next, i would like to fine-tune the resonance dependence on the cutoff frequency. currently, this is done via a highpass filter in the feedback path of the main filter but maybe this can be improved by some more fancy filter or by explicitely coupling the feedback gain to the cutoff frequency. in order to investigate this in more detail, i will possibly need some more samples, but first, i'll have a look into the material i already have...
next, i would like to fine-tune the resonance dependence on the cutoff frequency. currently, this is done via a highpass filter in the feedback path of the main filter but maybe this can be improved by some more fancy filter or by explicitely coupling the feedback gain to the cutoff frequency. in order to investigate this in more detail, i will possibly need some more samples, but first, i'll have a look into the material i already have...
-
Music Engineer Music Engineer https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=15959
- KVRAF
- Topic Starter
- 4379 posts since 8 Mar, 2004 from Berlin, Germany
...O.K. - well, no, nothing suitable among them, so here is a new sample request:Robin from www.rs-met.com wrote:i will possibly need some more samples, but first, i'll have a look into the material i already have...
waveform: saw, reso: max, envmod: min, decay: min, accent: min and cutoff should go through the 11 tick-marks on the panel. then for each tick-mark, play a long and low note (the lowest possible, so we can observe the frequency response at a dense spacing of the harmonics).
from these samples, i will be able to see, how the resonance changes according to cutoff frequency over the range of the cutoff knob (roughly 300-2400 Hz). to see it in the range above, i would like to have a sample like above but with cutoff, envmod and decay at max (everything else stays the same - slow continuous sweep through the high range of cutoff frequencies) and another one with cutoff at min to see it in the range below 300 Hz (sweep through the low range).
rv0, if you read this, could you record this for me?
thanks in advance
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
i think you should have in mind that the lowest resonance level might be a little over 0.0 actually (at least in rv0's TB)
i got better results like that, and i am still afraid of allpass filters in there
btw, you got any audio samples of your saw?
FFT: ok, i had an (rough) idea what it is.. the first article you linked to was very good
but now, how do i generate a table of a sawtooth faster/cheapr than my straigth-forward sin() approach? or i missed something? again..
i got better results like that, and i am still afraid of allpass filters in there
btw, you got any audio samples of your saw?
FFT: ok, i had an (rough) idea what it is.. the first article you linked to was very good
but now, how do i generate a table of a sawtooth faster/cheapr than my straigth-forward sin() approach? or i missed something? again..
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr
-
- KVRist
- 251 posts since 24 May, 2009
Something a bit shorter and simpler:Robin from www.rs-met.com wrote:mmmhh...or well, probably nothing new for you in there. it's possibly a bit too basic. i guess, dspguide will also have some good explanantions and one step further, there's of course Julius Smith's excellent MDFT:
https://ccrma.stanford.edu/~jos/mdft/
http://www.analog.com/en/embedded-proce ... /fca.html#
Section 5 is about FFT, 28-page PDF.
-
Music Engineer Music Engineer https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=15959
- KVRAF
- Topic Starter
- 4379 posts since 8 Mar, 2004 from Berlin, Germany
O.K. - i created some screenshots of the oscilloscope with your 3-highpasses (at 14.7, 27, and 17 Hz, as you said) for notes C1,C2,C3 and C4 (green is the original 303, blue the saw with the 3 highpasses (and some lowpass to emulate the main filter)):antto wrote:i am still afraid of allpass filters in there
btw, you got any audio samples of your saw?




images of my HP->HP->AP->BR filter chain will follow...
-
Music Engineer Music Engineer https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=15959
- KVRAF
- Topic Starter
- 4379 posts since 8 Mar, 2004 from Berlin, Germany
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
it looks like it's on the right road, but still far away
i guess this is the moog ladder?
and, where exactly did you put the feedback-HP filter?
i recently changed my code a little, and it was better that way:
/* EDIT: i was talking about the first pictures
btw, you know allpass is "cheating" ;]
but acceptable, as long as it doesn't fail at some point later
*/
x0 = HP1(input); // DC-Killer
feedback = x0 - k * y4;
feedback = HP2(feedback); // the resonance adjuster
.. stage1 .. tanh(feedback) ..
btw, 27Hz is too damn low for the fb-HP
for a fair-match the HPF there should be somewhere above 90Hz, i currently use 110 to 130Hz (not yet decided, but it's somewhere there)
you can approximate this value with the folowing test:
get a sample where the TB-303 is playing low notes (sawtooth, simple to look at) with max resonance, cutoff=max, envmod=max
and possibly rendered at 88200Hz..
now my observations/impressions were:
the TB-303 filter, compared to a moog (or any other resonant filter actually) looses resonance at low (cutoff) frequencies
the interesting thing is that with the sawtooth, in a lowish note the resonant wave has almost equal amplitude, no matter what the cutoff frequency is
this is one thing you cannot get with another filter (except if you put a HP on the feedback, as we did with ours)
anyway, the important thing to look out for is how the resonant waveform looks
it almost dies out right before the next peak of the sawtooth comes in, and this is almost the same at any cutoff frequency, i can draw a picture which'll explain it better than me, but then, you can see what i'll draw in most audio samples already
i needed a low fb-HP frequency before, because i just couldn't match one specific behaviour of the sawtooth, it had something to do with the phases_vs_harmonics
but as i was decreasing that value, i knew it was wrong even if i had good results in the no-resonance case
now i figured that this problem is solved by just restricting the resonance from 0.0
now resonance is always above 0.025 (or something like that)
1) spectrum is improved, now the filter has sharper edges, and looks closer on the FFT to the real curve, without messing up my 28KHz measurement
2) phases were changed by the small resonance, which simplified things a _lot_
i will implement all of these changes to the moog ladder too (since i am mainly working on kunn's filter)
i like both these filters, i think kunn's is the closest one in terms of both behaviour, response, and yet, still cheap to process, and no problems with tuning (tested at 44100 and 192000, passed)
the moog ladder has a little bit different sound and behaviour
i could do some tricks to make the moog act like the other one (gain-scaling mainly) and you wouldn't be able to tell which is which, especialy in the mix
blah, anyway, i am still trying to match the square
this time i want to configure my setup in such a way that when i got the sawtooth matched close, i won't need to change any HP filter value to get the same phases for the square (this is tricky, very tricky)
unfortunately, i fall asleep right infront of the monitor everyday, just 2 hours after i get back from work.. so tired, waiting for sunday.. can't do much now
i guess this is the moog ladder?
and, where exactly did you put the feedback-HP filter?
i recently changed my code a little, and it was better that way:
/* EDIT: i was talking about the first pictures
btw, you know allpass is "cheating" ;]
but acceptable, as long as it doesn't fail at some point later
*/
x0 = HP1(input); // DC-Killer
feedback = x0 - k * y4;
feedback = HP2(feedback); // the resonance adjuster
.. stage1 .. tanh(feedback) ..
btw, 27Hz is too damn low for the fb-HP
for a fair-match the HPF there should be somewhere above 90Hz, i currently use 110 to 130Hz (not yet decided, but it's somewhere there)
you can approximate this value with the folowing test:
get a sample where the TB-303 is playing low notes (sawtooth, simple to look at) with max resonance, cutoff=max, envmod=max
and possibly rendered at 88200Hz..
now my observations/impressions were:
the TB-303 filter, compared to a moog (or any other resonant filter actually) looses resonance at low (cutoff) frequencies
the interesting thing is that with the sawtooth, in a lowish note the resonant wave has almost equal amplitude, no matter what the cutoff frequency is
this is one thing you cannot get with another filter (except if you put a HP on the feedback, as we did with ours)
anyway, the important thing to look out for is how the resonant waveform looks
it almost dies out right before the next peak of the sawtooth comes in, and this is almost the same at any cutoff frequency, i can draw a picture which'll explain it better than me, but then, you can see what i'll draw in most audio samples already
i needed a low fb-HP frequency before, because i just couldn't match one specific behaviour of the sawtooth, it had something to do with the phases_vs_harmonics
but as i was decreasing that value, i knew it was wrong even if i had good results in the no-resonance case
now i figured that this problem is solved by just restricting the resonance from 0.0
now resonance is always above 0.025 (or something like that)
1) spectrum is improved, now the filter has sharper edges, and looks closer on the FFT to the real curve, without messing up my 28KHz measurement
2) phases were changed by the small resonance, which simplified things a _lot_
i will implement all of these changes to the moog ladder too (since i am mainly working on kunn's filter)
i like both these filters, i think kunn's is the closest one in terms of both behaviour, response, and yet, still cheap to process, and no problems with tuning (tested at 44100 and 192000, passed)
the moog ladder has a little bit different sound and behaviour
i could do some tricks to make the moog act like the other one (gain-scaling mainly) and you wouldn't be able to tell which is which, especialy in the mix
blah, anyway, i am still trying to match the square
this time i want to configure my setup in such a way that when i got the sawtooth matched close, i won't need to change any HP filter value to get the same phases for the square (this is tricky, very tricky)
unfortunately, i fall asleep right infront of the monitor everyday, just 2 hours after i get back from work.. so tired, waiting for sunday.. can't do much now
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr
-
Music Engineer Music Engineer https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=15959
- KVRAF
- Topic Starter
- 4379 posts since 8 Mar, 2004 from Berlin, Germany
yes, moog ladder with feedback highpass and the highpass sits exactly in the feedback path, so it doesn't matter here since all these samples are without feedback. ahh, and i pick up the output after the 3rd stage already for the 18 dB/oct - yeah, i know that all this 3-pole talk is BS, but nonetheless does the spectrum looks more like 18 dB/octantto wrote:it looks like it's on the right road, but still far away
i guess this is the moog ladder?
and, where exactly did you put the feedback-HP filter?
aha, so you apply HP2 also to the input signalx0 = HP1(input); // DC-Killer
feedback = x0 - k * y4;
feedback = HP2(feedback); // the resonance adjuster
.. stage1 .. tanh(feedback) ..
sure, but i was not talking about the feedback HP - i was refering to your earlier post were you said, saw is just 3 highpasses on a 'normal' saw, and the cutoff frequencies were taken from some even earlier post of you (which i think you were refering to in this second post)btw, 27Hz is too damn low for the fb-HP
mm...must try thatnow resonance is always above 0.025 (or something like that)
1) spectrum is improved, now the filter has sharper edges, and looks closer on the FFT to the real curve, without messing up my 28KHz measurement
2) phases were changed by the small resonance, which simplified things a _lot_
so how is kunn's filter different from the moog ladder? ...hmm maybe i have to sift through this monstrous thread...i will implement all of these changes to the moog ladder too (since i am mainly working on kunn's filter)
i like both these filters, i think kunn's is the closest one in terms of both behaviour, response, and yet, still cheap to process, and no problems with tuning (tested at 44100 and 192000, passed)
the moog ladder has a little bit different sound and behaviour
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
kunn said it is modeled after the TB-303 filter, it's another ladder, yet different transfere function than what we were doing before that, tho, both filters have that great ladder sound ;]
when i was testing both filters against audio samples, kunn's filter almost perfectly matched the gain-loss when resonance is 0 and 1, while the moog ladder had quite a difference (i guess this has to do something with the k=4 vs k=17 selfoscillation feedback gain blahblah)
and, uhm, it also matches the spectrum quite close (no-reso to full-reso)
so far, it didn't fail, it was about this "minimum resonance level" that was keeping me from getting closer..
tho, i still love the moog, and anything i do with kunn's filter, i will do to the moog too, even that it won't give me "better" results when compared with a sample, i still love both filters sound ;]
about the feedback-HP
before this scheme, i wasn't sure how important would be the placement of the feedback and input HP filters
so i (carelessly) did it this way:
x0 = HP1(input); // dc-killer
feedback = x0 - k*HP2(y4);
.. stage1 .. tanh(feedback);
there is some slight difference, this is where i started asking wether a digital implementation of an analog filter would have the same phase response or not (since i couldn't get the right phase and harmonics at the same time, only one or the other)
and then i switched the fb-HP filter around in this scheme you commented
now the input is filtered (i call it DC-Killer, since it is probably part of the oscillator, whatever, not really related to the way the main-filter works)
and this input is combined with the feedback (k*y4) and then the result (input+fb) is filtered by the fb-HP filter, then the tanh() shaper comes last
now there is one more possible combination i can think of (that i haven't tested, for an unknown reason)
it'll be:
x0 = input; // not yet
feedback = HPF2(k*y4); // resonance adjuster
feedback = HPF1(x0 - feedback);
.. stage1 .. tanh(feedback) ..
but just looking at it, i *know* the resonance level will get ugly, because the y4 signal (which is the real feedback) will be filtered by 2 HP filters
1 6dB HP proved to be good, maybe one more won't hurt if it's really low, but it might mess up something else, phases for example (might mess with the tuning)
when i was testing both filters against audio samples, kunn's filter almost perfectly matched the gain-loss when resonance is 0 and 1, while the moog ladder had quite a difference (i guess this has to do something with the k=4 vs k=17 selfoscillation feedback gain blahblah)
and, uhm, it also matches the spectrum quite close (no-reso to full-reso)
so far, it didn't fail, it was about this "minimum resonance level" that was keeping me from getting closer..
tho, i still love the moog, and anything i do with kunn's filter, i will do to the moog too, even that it won't give me "better" results when compared with a sample, i still love both filters sound ;]
about the feedback-HP
before this scheme, i wasn't sure how important would be the placement of the feedback and input HP filters
so i (carelessly) did it this way:
x0 = HP1(input); // dc-killer
feedback = x0 - k*HP2(y4);
.. stage1 .. tanh(feedback);
there is some slight difference, this is where i started asking wether a digital implementation of an analog filter would have the same phase response or not (since i couldn't get the right phase and harmonics at the same time, only one or the other)
and then i switched the fb-HP filter around in this scheme you commented
now the input is filtered (i call it DC-Killer, since it is probably part of the oscillator, whatever, not really related to the way the main-filter works)
and this input is combined with the feedback (k*y4) and then the result (input+fb) is filtered by the fb-HP filter, then the tanh() shaper comes last
now there is one more possible combination i can think of (that i haven't tested, for an unknown reason)
it'll be:
x0 = input; // not yet
feedback = HPF2(k*y4); // resonance adjuster
feedback = HPF1(x0 - feedback);
.. stage1 .. tanh(feedback) ..
but just looking at it, i *know* the resonance level will get ugly, because the y4 signal (which is the real feedback) will be filtered by 2 HP filters
1 6dB HP proved to be good, maybe one more won't hurt if it's really low, but it might mess up something else, phases for example (might mess with the tuning)
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr
..as long as it has BASS and it's LOUD!
irc.libera.chat >>> #kvr




