Open303 - open source 303 emulation project - collaborators wanted

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

Post

mztk wrote:hi all,
found this via the wikipedia entry about the filter
http://www.timstinchcombe.co.uk/synth/d ... diode.html
edit:oh, you've been there already.
http://www.timstinchcombe.co.uk/synth/d ... iode2.html

yes, Tim's articles are great.
ah. that was new to me. thanks for the pointer.
if i may chip in, i feel it'd begood to keep the sequencer style, albeit with a more convenient editing mode/alternative view
personally, i'm more interested in emulating the synth rather than in the sequencer. i hope to arrive at a good open-source synth engine that can then be used inside bass-synths which may or may not provide a sequencer and if they do, it may or may not resemble the 303-sequencer. my own derivative will be the AcidDevil in which i will provide this dot-grid-style of editing (which you presumably have already seen in the beta (posted somewhere here in thread))?.
once its nailed, soundwise etc. it can get its mods, no?
exactly my line of thinking.
antto's plugin is just great, especially the sequencer operation, the acidevil sounds pretty good too.
yup, thanks. but the sound will certainly still be subject to changes.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

Robin from www.rs-met.com wrote:
mztk wrote:if i may chip in, i feel it'd begood to keep the sequencer style, albeit with a more convenient editing mode/alternative view
personally, i'm more interested in emulating the synth rather than in the sequencer. i hope to arrive at a good open-source synth engine that can then be used inside bass-synths which may or may not provide a sequencer and if they do, it may or may not resemble the 303-sequencer. my own derivative will be the AcidDevil in which i will provide this dot-grid-style of editing (which you presumably have already seen in the beta (posted somewhere here in thread))?.
yeah, but you better use that to make the rest of the synth "respond" to the sequencer the right way
for example, i've rewritten the synth-side of my sequencer, now it only outputs Pitch Gate and Accent signals, so, the rest of the synth doesn't recieve any other information.. now i could replace the sequencer with any other that outputs these 3 signals and it'll work
Robin from www.rs-met.com wrote:
mztk wrote:once its nailed, soundwise etc. it can get its mods, no?
exactly my line of thinking.
me too

now i was thinking of doing one more attempt for solving the FEnv curve..
you know i got a good approximitation for the end result
i want to find a shaper for a RC that will output the same curve
so, i'm thinking.. what is the reverse of an exp() ? ;]
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

ok, so if we use a RC-decay for the Filter envelope, this is the shaper:

Code: Select all

  c = x * 1.0030155 -0.003256; // correction (approximate)
  return (0.00241417 + 0.73544449 * c + -1.7966594 * (c*c) + 5.0150912 * (c*c*c) + -5.4878067 * (c*c*c*c) + 2.5322128 * (c*c*c*c*c));
that's a 5th order polynomial, the correction was added to "normalize" it a little
now i have to figure out the time-scale of this, so it corresponds to my previous linear-envelope time
gonna edit this post when i do..

i'll "optimize" the c*c*c*c stuff at the end, then i'll remove the linear decay (which includes another if-statement to work) and the previous linear>303curve shaper, which involved an exp() and division
so in the end, i *hope* the new thing will work even faster!
i'm only not sure about denormal problems with all of the RC-decays i have, tho, i'm using double precision everywhere.. hm..

EDIT: so..
using the exp(-1 / (tau * Fs)) for the RC decay time, my time coefficients must be scaled by 0.82725 to match my previous behaviour
it's something like this:

Code: Select all

exp(-1 / (0.82725 * (0.341 + (1.0 - ACC) * dknob * (4.651 - 0.341)) * Fs));
where "ACC" is 1.0 when there is accent, "dknob" is the decay knob (0.0 to 1.0)
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

:D
that's a bit over my head, but i am trying to read thru and pick up
some knowledge, don't count on me to be any use at that altitude!
but can one copy that into waveshaper2 's parameters? never really used
the waveshaper yet, not for envelopes.
did an accidental experiment back in june that ended up as a sequenced
bass synth with a cascaded '18dB' lpf ( all that stuff abt capacitors was
a revelation ); has a take on such a sequencer UI which is easier, but i
never got the slides to really do much at all. can upload it if you wanna
have a look at it.

and what about hardware clones? have any of them got exact replica circuitry?
is that not the way to achieve an 'exact' sound? ( i figure analogue solutions must have wanted to do that, tho i don't know )

this would seem a good way to go, if it's possible. not very quick though!
i see that you want to find out 'why' things take place too, and that's
something one would discover with a close approximation of the real circuit,
tweaking here and there to see... ??? will show where the stuff happens.
at least its a theory. my little bodge project in SE let me try this, try
that, quite quickly. mind you, i haven't been able to follow it up yet; it's
fascinating, but as i say, my skills are, to say the least elementary. i used
a combination of sequencer control2 and one of dr ambient's sequencer prefabs,
modified; it's weird though, and i had to quantise the pitches with a gate triggered sample and hold, bla bla bla. gonna dig it out again.

Post

I, for one, would love to hear an implementation of Tim Stinchcombe's filter model.

Post

me too
IIRC i tested kunn's ladder filter with 5 extra HP filters approximately at the places where Tim said they were, but it was a horror to make it work..
maybe a circuit simulation should be made first, and if it works there.. but who knows.. i'm happy with kunn's filter right now (really happy to be exact)

btw, you wanna hear how it sounds with a 12dB StateVariable LP? (erm, i've modified it a little, but it's still just a boring SVF..) :hihi:
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

this one:

http://www.timstinchcombe.co.uk/synth/d ... iode2.html

yeah, me too. but i think this would be a beast to implement. mmm... i guess, given wc and k, one could find the poles and zeros of the transfer function via a polynoimal root solver ...but then: how would they relate to the parameters of the ladder topology? and: running a polynomial root-solver at sample-rate is not really practical anyway.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

antto wrote: btw, you wanna hear how it sounds with a 12dB StateVariable LP? (erm, i've modified it a little, but it's still just a boring SVF..) :hihi:
Yeah I'm interested. Can you post the same sequence with different filter types?

Post

Well, you could implement Tim's model by using a laplace to Z transform of some sort, and hopefully end up with something causal. Another way of doing it is trying to integrate the direct form laplace function using Runge-Kutta and oversampling. Either way you will end up with a digital model that bears little resemblance to what the original filter is trying to do and be back in square one. This is the actual *hard part* of digital modeling.
Last edited by Mike Janney on Tue Jan 12, 2010 6:46 pm, edited 1 time in total.

Post

rola: http://www.box.net/shared/nixdczs80b
1. kunn's diode ladder
2. moog ladder
3. SVF LP

both the moog and the SVF have gain modification, this is "forcing" the overal gain to drop like the diode ladder filter (no resonance = normal gain, full resonance = very small gain)

and the three of them have a HP filter in the feedback

BTW: damn, the mp3 encoding f?cks up the high frequencies pretty bad, they sound like some sloppy noise..
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

i found a circuit section from the x0xb0x (i'm not exactly sure) of the square-shaper
and i tryied to recreate it in the CircuitSim applet

www.falstad.com/circuit
here's the code:

Code: Select all

$ 1 5.0E-6 23.47059216675035 94 5.0 50
t 288 256 224 256 0 -1 -0.5354568463257809 -0.5356639811266817 100.0
j 320 64 368 64 0 -4.0
w 320 64 320 0 0
c 320 64 320 112 0 1.0E-5 -4.406400027138446
g 320 112 320 128 0
w 368 80 496 80 0
w 496 80 496 160 0
w 496 160 528 160 0
w 496 160 448 160 0
w 448 160 448 208 0
r 496 160 496 224 0 10000.0
g 496 224 496 240 0
c 448 208 448 240 0 1.0E-5 -2.760203740748998
w 448 240 448 256 0
w 448 208 432 208 0
r 432 208 368 208 0 100000.0
r 448 256 368 256 0 10000.0
w 368 208 368 256 0
w 288 256 368 256 0
w 224 240 224 224 0
w 224 224 256 224 0
w 256 224 256 208 0
r 256 208 256 144 0 22000.0
w 224 224 176 224 0
w 176 224 176 256 0
c 176 256 176 288 0 0.44 4.996873830696483
g 176 288 176 304 0
w 224 272 224 304 0
w 224 304 320 304 0
w 320 304 320 320 0
w 320 304 496 304 0
w 496 304 496 288 0
w 496 288 528 288 0
r 320 320 320 384 0 10000.0
w 320 384 320 400 0
R 176 16 128 16 0 4 20.0 5.0 0.0 0.0 0.5
w 176 16 320 0 0
R 368 48 416 48 0 0 40.0 12.0 0.0 0.0 0.5
R 320 400 320 448 0 0 40.0 5.0 0.0 0.0 0.5
R 256 144 256 112 0 0 40.0 5.0 0.0 0.0 0.5
o 7 64 0 35 10.0 9.765625E-5 0 -1
o 28 64 0 35 9.353610478917778 3.5681192317648997E-7 1 -1
and the reference circuit i used: image
i only added a Sawtooth generator by trial and error, and 2 oscilloscopes
i'm not sure if i used the right elements and/or the right values for them (especialy the capacitors) but it kinda looks like the basic shape of the square, it's assymetrical, and the transition before the "longer" part is smoother

it seems that the smoothness of the edge comes from the (R34,R35,C10) section, which looks to me like some wacky lowpass filter or something!?
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

oo. that is a nice bit of software. goona check that out later.
the other night, i ran a saw through a comparator for a perfect square,
like it says in that article.
and its nice. very lively. then through a multifilter to see what happened.
not all of the character,no growl, but not bad at all. but now you're saying its smoothed off. start over...

Post

mztk: 75% of the magic in the 303 square sound is the fact that it's not a square at all..

i'm doing another attempt to approximate the square circuit, starting off with a highpass filter + correction_offset (if needed) fed to a new shaper, then i'll think later
the shaper compares the input, if it's below zero (erm that's the starting point of my sawtooth) it outputs -1.0
but otherwise, it runs a "hacked" 1 pole LP filter
..as the input goes above 0.0 (positive) this LP filter gets fed with the input (amplified quite a lot) with a -1.0 offset (so it kinda like starts from -1.0)
and the output of that LP is then clipped to +1.0
important thing is, that the memory of the LP during the other state (input below zero) is "forced" to be -1.0 (even tho it isn't processed)

currently, this solves only the smoothness and the symmetry (probably the correction will be needed, it won't be so brute) but it kinda looks better than my previous attemps (good result but there was nasty formulas for everything)
this also solves the behaviour of the smoother edge at higher Osc frequencies (because of the way i used the LP filter there)
i'm not sure about the "bump" tho..
i know where the clipper has to be (after the square-shaper, there are 2 HP filters before the main LP filter, this clipper must be between them)
but i still don't get how to "position" the bump in the right spot for the different Osc frequencies, without adding "correction" (DC) .. i can't use too strong or too weak HP filter neither, since then i won't match the "overshoot" (erm, this is like when you process a sawtooth by 2 HPs in series)
..i suspect this time it'll be easier on the CPU..

btw: i had an error in my last report about the FEnv curve with a RC decay, the shaper is correct, but the time-scale is not, it's more like 0.1 but i have to measure it again (against rv0's samples) .. but when i compared it to the 303 in the JoshWink HSOC track, i had to scale with 0.235 to get the same times for the max decay, which is either wrong somehow, or the 303 in that track was modded, or rv0's 303 is modded (i don't think so) or these timings vary too much between individual 303s.. no clue
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

so..
the symmetry of the square can be approximated also by 2 HP filters and a little DC offset (fixed)..
assuming the sawtooth is a ramp from -1 to +1 *** then:
saw > HP1 > HP2 > DC_offset > shaper
where both filters are at ~9.25Hz and the DC offset is -0.055
*** otherwise invert the DC offset value

having both filters with the same cutoff frequency doesn't seem to give "overshoots" if i can call it that way (at least in the usual oscillator range)
however, if it does - the first filter should have lower frequency and the second one should compensate with a little higher..

anyway, this works quite well now
previously i was using only DC offset approximitation (rational function):
double soff = (0.90412745 + -0.0082430065 * Fc) / (1.0 + 0.057837048 * Fc + 3.1131084e-005 * (Fc * Fc));
which is _very accurate_ but has two things i don't like:
1. division (tho, this is calculated at the sampling rate, not oversampled)
2. the symmetry is "static" it depends only on the Osc frequency

the 2_HPF approach is not "static" since it takes some time for the HP filters to "relax" after the Osc frequency has been changed, this makes the symmetry more "live" at the begining of notes with pitch different than the previous note.. i like that
plus - there is no division anywhere, they share the same coefficients, which can be precalculated on init (or Fs change, rare)
the only downside is that if the sawtooth is oversampled - these must be processed at the same rate
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

working my way backwards through the early stuff here.
that slide idea is brilliant :D
and beginning to know what all the other stuff is about.

nb: don't know if you fully covered the pitch and time input thing
to your satisfaction yet, but my very first adventure with synths
etc was with a tr626 and a sh101;
the sh has a a rest/tie thing, but i didn't bother with it then; i
just bashed in a series of notes, and then the drum machine had a gate
trig output which i used to clock the sh sequencer; quite fun: you could
move the gate times by having different patterns triggering the sequencer.
and that's when i debated whether to get a tb303, for 250quid at the time.
so what did i do? i bought a qy20, :(, and learnt about midi on that.
but thinking about it now, it wasn't such a different concept. you could sit
with it and knock up a few patterns via a cv+gate. god, it was fiddly though.
so: same note-stack idea, with the sh101
and...remembering the mc202, which has similarities with the sequencer, if
you look, it has a 'tap' button: you bash out something rhythmically on that,
and edit the pitches afterwards, OR, bash in notes sequentially, and arrange
the timings and lengths afterwards. or you can arduously step through the thing, one step at a time, before switching it off and losing everything! that's when i realised
i needed a tb-303, because it has the patterns!!! i'd been triggering a moog
rogue with the 202, getting all the slides(accents, no, i think)and it was
a beast, quite differnt from before, with any midi sequencer. a friend of mine swore by the sequential circuits pro-one triggered that way; so there you have it: the tb303 was an early bit of mini-kit, and was perhaps primarily a sequencer..for big synths, i mean, like modulars, etc.

any chance you could at some point knock up a guide to the randomise options
on the vb303? think i know what i'm randomising, but really not sure.

Post Reply

Return to “DSP and Plugin Development”