Open303 - open source 303 emulation project - collaborators wanted

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

Post

what i think i *could* do with my sequencer, is:
make a "pattern processor" which will "process" the pattern whenever the user edits it with the "modern" editing controls
the processor will analyze the pattern, and do whatever needed to restrict the pattern to be as much 303 legal as possible
and, the 303-style pattern display, which i mentioned earlier
guess that's gonna be all i can do
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

i messed a little with the 303-ish moog filter (you know which one, mystran's transfere function + Robin's (old) moog-tuning + my dirty HP filters)
the only thing that needed to be fixed was the gain-loss for high cutoff frequencies + high resonance
so i did this:

double gc = k * 0.25; // divided by 4.0 ***
gc = (gc - 1.0) * r + 1.0;
gc = (gc * (1.0 + r));
-----------------
K is the feedback coefficient, depends on the cutoff frequency(DSP), it must be calculated by the moog tuning formulas (by Robin in this case)
R is the resonance parameter which normaly is 0 to 1.0
then, scale the filter output with GC
*** four, because that's the "perfect" feedback level for the filter, but it grows in the digital implementation
erm, i hope you understand

because of all the shapers inside the filter, it can't explode, but it screams like hell, so nice, and with this gain-loss-fix it's better
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

antto wrote: rv0: i guess if i am able to do a 1:1 clone of the sequencer (pattern programing and memory stuff) i won't be able to have some of my modern editing tools, like shift-the-whole-pattern-left/right, randomize-accents, randomize-slides..
that's sad..
I don't really understand why this wouldn't be possible.
I can think of many ways to implement it myself...
A friend of mine has built a computer interface for the TB303 and it's is capable (technically) of doing just that.
antto wrote: this XML thing, it has too many words/tags, my own NSP format just takes 41 bytes space! (and 8 of them are for a silly header, which can be ignored)
we are 2009. Storage constraints don't really matter at all.
XML is the de facto standard nowadays to do about anything.
It's the easiest most compatible way of exchanging information. You don't have to define rules for it in your program: the XML Schema (.xsd) contains the rules.
I you really want (and if nobody else can do better than me) I can make an xml schema or we can discuss my examples till we come up with a standard that can be implemented in an xml schema.
antto wrote: the XML thing still looks like it needs monospaced fonts to look OK (tho, most programing languages do)
actually it doesn't really matter.. It does look way better with syntax highlighting though.
I'm a web programmer, I'm used to staring at these tags.
antto wrote: it also looks hard for a human to open up a text editor and write down a pattern in this format (he has to write the tags and stuff)
sure but thats not the intention.
I mean, how many people do you think, will be editing text files?

You could make a webpage where the user gets a GUI and at the push of the button it will spit out an xml file. Thats an advantage of xml: generating it is so very easy and cross platform. navigating the document too (because it's a validated tree structure)

I can even make a droplet app, where you throw the xml file on, and then you get a .TXT file in abl format (or whatever).. These things are so simple to make..

Post

Hey Robin, you seem to know a lot about filters and the math behind them. Last night I was wondering if one can compensate for the phase shift inside the lowpass cascade by pre-filtering with an allpass which shifts the phase at FC to match -PI.

Like this (pseudo code ahead^^):

Code: Select all

phase_allpass = -phase_lowpass_cascade - PI;
allpass.setPhase(phase_allpass)
//...
output = lowpass_cascade(allpass(input))
Would this work?
... when time becomes a loop ...
---
Intel i7 3770k @3.5GHz, 16GB RAM, Windows 7 / Ubuntu 16.04, Cubase Artist, Reaktor 6, Superior Drummer 3, M-Audio Audiophile 2496, Akai MPK-249, Roland TD-11KV+

Post

isn't that phase shift there in the analog filter too? or is it a "side effect" of the digital implementation?
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

Well, yes ... I was just thinking about this cascaded lowpass thingy and the tuning formulas from Robin.
My idea was, to simply specify lowpass coefficients and pre-filter by an allpass, to make the phase of the whole filter at cutoff equal to -PI for
exact resonance.


... but I bet this won't work :D
... when time becomes a loop ...
---
Intel i7 3770k @3.5GHz, 16GB RAM, Windows 7 / Ubuntu 16.04, Cubase Artist, Reaktor 6, Superior Drummer 3, M-Audio Audiophile 2496, Akai MPK-249, Roland TD-11KV+

Post

nah, it works well, why bother?
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

neotec wrote: My idea was, to simply specify lowpass coefficients and pre-filter by an allpass, to make the phase of the whole filter at cutoff equal to -PI for
exact resonance.
... but I bet this won't work :D
What is important is the phase shift between the feedback and input, so pre-filtering wont work as that will affect both equally and hence cancel out. The allpass would need to be in the feedback path so that it only affects that.

But main problem is that there is **too much** phase shift, you have the phase shift from the 4 lowpass poles, and the phase shift from the 1 sample delay. Which means as you get towards nyquist the phase shift at the cutoff gets closer to -2PI rather than staying at -PI.

Unfortunately an allpass filter can only add more phase shift, not remove it. So you cant move the phase shift back to where it needs to be with an allpass filter.

You may think two allpass filters could add enough to make a -3PI phase shift and so drag the cutoff round again to the correct phase. But then you'd have two resonant peaks. One lower down where the phase response goes past PI the first time, and the 2nd one at -3PI.

Post

Jup ... *sigh*

I would kill for knowing how Audiorealism made their Bassline ... it's so
low on CPU so I think they use some 'simple' approximations ... but it
sounds cool.
Hmm ... what kind of filter topology do they use ... damn^^, I am trying
to get a 'real-TeeBee' lowpass filter since I started coding Synths ...
yet no success :D
... when time becomes a loop ...
---
Intel i7 3770k @3.5GHz, 16GB RAM, Windows 7 / Ubuntu 16.04, Cubase Artist, Reaktor 6, Superior Drummer 3, M-Audio Audiophile 2496, Akai MPK-249, Roland TD-11KV+

Post

well, actually.. the filter is not sooo important as most people think
you know, when you say the words "emulation, TB-303" they all say "nah, the filter can't be emulated, it's so squelchy, blah blah"

in practice, you can get close to the sound of the 303 even with a moog ladder
it's all about the HP filters mainly

the sound of the TB-303 is 50% the sequencer, the other 50% are split between the envelopes/accent/gimmick and the filter
i bet you can get convincing acid even if you put a dumb-old-plastic-StateVariable filter, you just need the HP filters to match the characteristics of the (wierd) 303 ladder

http://www.kvraudio.com/forum/viewtopic ... 67#3779367 <- try this, with the default settings, then switch the filter from 18 to 36 (don't get confused by these, both filters are 4-pole -24dB/Oct, just the GUI hasn't been updated)
so, which one sounds better? hard to say.. i bet, if you ask 10 people, 5 will say the 18 is better, the other will say the 36 is better
ask me? they are a little different, but they both sound good ;]
some people might try to "simulate" the filter circuit, to get the exact sound of that 303 filter, well, i think there is not a big need for such detail, even a moog ladder works fine here

others might say about the square wave sounding sooo unique..
well, 2 things:
1. a waveshaped sawtooth, the resultant square wave is not perfectly symmetrical (it's like a pulse)
2. because of the shaper, the soft transition of the sawtooth has less sharpness after being shaped, so the filter doesn't resonate much on that "edge" there when the cutoff is high
any other synth that uses something like a comparator for a square wave wouldn't sound like this, because both edges will be sharp, and the filter will get excited on both
and don't forget about the HP filters in the main filter, which take-off the resonance at low cutoffs

AudioRealism probably optimized a lot
i think there isn't too much internal oversampling, so it's probably a nice filter (2x oversampling maybe)

if you run ABL at 88200Hz Fs you get better sound (which is normal) but the same behaviour (which is perfect)
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

neotec wrote:Hey Robin, you seem to know a lot about filters and the math behind them. Last night I was wondering if one can compensate for the phase shift inside the lowpass cascade by pre-filtering with an allpass which shifts the phase at FC to match -PI.
nollock already gave the answer. but why do you want to do it with an allpass anyway if the phase-based design formulas work?
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

I was thinking about this 'cascaded-lowpasses-with-different-cutoff' thing :)

But nevermind, it doesn't work.
... when time becomes a loop ...
---
Intel i7 3770k @3.5GHz, 16GB RAM, Windows 7 / Ubuntu 16.04, Cubase Artist, Reaktor 6, Superior Drummer 3, M-Audio Audiophile 2496, Akai MPK-249, Roland TD-11KV+

Post

neotec wrote:I was thinking about this 'cascaded-lowpasses-with-different-cutoff' thing :)

But nevermind, it doesn't work.
Sure it does (at least in the LTI sense). The catch is just that with a naive implementation, the highest pole frequency will be over 3 times the nominal cutoff, so you need around 4 times oversampling with bilinear transform just to obey the Nyquist condition.

edit: there can be some problems at higher cutoffs with regards to the warping of frequencies though.. it won't matter when the poles are equal (and ignoring extra delay in closed loop if any) but it should probably be taken into account when the cutoffs aren't equal, if you want to keep self-oscillation gain constant... and as a result of taking that into account the tuning can get a bit messy too.. but .. well.. :)

Post

" and as a result of taking that into account the tuning can get a bit messy too.. but .. well.. "

Some analog synths could tune themselves and their filters. I suppose you could set Q high and do any FFT to tune it at each MIDI note. Or maybe check zero crossings, or watch the amplitude as you sweep the osc. :-)
Swing is the difference between a drum machine and a sex machine.

Post

mystran wrote:
neotec wrote:I was thinking about this 'cascaded-lowpasses-with-different-cutoff' thing :)

But nevermind, it doesn't work.
Sure it does (at least in the LTI sense). The catch is just that with a naive implementation, the highest pole frequency will be over 3 times the nominal cutoff, so you need around 4 times oversampling with bilinear transform just to obey the Nyquist condition.
I'm quoting myself because I just realized whoever wrote my comment is a bloody idiot. Anyway..

If one does prewarping for the nominal cutoff (to get that particular frequency where it should be), then scales the poles to whatever they should be in the linearized analog prototype, and finally transforms each of them using bilinear transform, one should end up with properly prewarped tuning and the whole thing should work up to Nyquist, because the bilinear transform will just map infinity to Nyquist, but other than the frequency warping, it's kinda exact (for the open loop anyway). That does not solve the closed loop delay problem though (although it can be trivially solved for example with some iteration scheme, if efficiency isn't a concern; or in LTI case just analytically, though that'll change the structure then).

I guess that's academic though, because I don't see why one would want to do it like that in practice (because you probably want the non-linearities). But .. well .. had to correct my stupidity anyway..

Post Reply

Return to “DSP and Plugin Development”