Open303 - open source 303 emulation project - collaborators wanted
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
i missed something in one of rv0's samples, time to look at it closer
there is something really ugly in the square wave, it's not just a shaper(saw+offset)
there is probably a nasty filter in there
refering to the combinedtests.ogg, the very last part (playing all notes transposed really low)
gonna analyze it these days
there is something really ugly in the square wave, it's not just a shaper(saw+offset)
there is probably a nasty filter in there
refering to the combinedtests.ogg, the very last part (playing all notes transposed really low)
gonna analyze it these days
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
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
new square wave clues: my previous suggestion about square = shape((saw+offset)*amp) is wrong (kinda close tho..)
reference: rv0 -> "combinedtests.ogg"
looking at the extremely low notes played in the last part of the "full note range" test thing..
first of all, the "PW" looks pretty assymetric, and it smoothens up close to 50:50 quite fast when the pitch gets higher
so first suggestion: sqare = tanh(hpf(saw)*amp)
this high pass filter replaces the offset in the previous formula..
then, something ugly shows up on the very low notes
right after the negative (the softer) peak, there is a "bump" (tiny and smooth)
this must be a result of some hard clipper which clips off an edge somewhere on the negative peak of the shaped saw
or something similar
so, second suggestion: either there is a HPF after the shaped saw, and a hard clipper after that, <or> the (original) sawtooth is combined with the shaped-saw, and fed to the hard-clipper
or both..
but i got a feeling there is more than 1 HPF after the shaper
btw, the tuning of the TB-303 playing that sample is about 1.02970 (if someone want's to compare something to it)
the interesting thing is that this "bump" there, on lower notes it shows up in the middle between the negative and the positive peaks
but when pitch raises, the bump moves "shifts" left, and "joins" with the negative peak
i feel this exactly as a result of a highpassed (or maybe twice) sawtooth, fed to a hardclipper to clip only the negative peak
at low frequencies, the filtered waveform will have a "bigger" part which is below zero (because of the HPF filtering) and the clipper will clip the edge longer (in time)
while at higher, frequencies, the "end" of the clipped edge will arive sooner after the negative peak
so, if i am right here, and if i get the same results as the waveform in that ogg, i will assume that i've "emulated" the oscillator section ;]
but this is very tricky, every component (either HPF filter, or hard clipper, or shaper) must be carefully placed in the right placed, with the right values, need more knobs and a magnifier
currently, i matched the PW with the tanh(hpf(saw)*amp)
the hpf frequency i used was ~13Hz
amp is still around 45 to 90 (i'm using 60 now)
oh, another thing, the amplitude of the positive and negative peaks
they change depending on frequency too
this was the clue that made me think about combined shaped-saw + filtered-saw
having the negative peak smoother < this solves the resonance character of the square
but the amplitudes of the peaks..
two things for sure:
1. on higher notes - the negative peak is louder
2. on lower notes - not
so i suppose this is because of that "bump" which seems to be "joining" the shaped sawtooth at higher notes
so, if you combine the shaped-saw (which looks like a pulse) with the same saw you used to get that pulse - your negative peak will be louder, and the result will look like some odd pulse
blah, got to sleep
reference: rv0 -> "combinedtests.ogg"
looking at the extremely low notes played in the last part of the "full note range" test thing..
first of all, the "PW" looks pretty assymetric, and it smoothens up close to 50:50 quite fast when the pitch gets higher
so first suggestion: sqare = tanh(hpf(saw)*amp)
this high pass filter replaces the offset in the previous formula..
then, something ugly shows up on the very low notes
right after the negative (the softer) peak, there is a "bump" (tiny and smooth)
this must be a result of some hard clipper which clips off an edge somewhere on the negative peak of the shaped saw
or something similar
so, second suggestion: either there is a HPF after the shaped saw, and a hard clipper after that, <or> the (original) sawtooth is combined with the shaped-saw, and fed to the hard-clipper
or both..
but i got a feeling there is more than 1 HPF after the shaper
btw, the tuning of the TB-303 playing that sample is about 1.02970 (if someone want's to compare something to it)
the interesting thing is that this "bump" there, on lower notes it shows up in the middle between the negative and the positive peaks
but when pitch raises, the bump moves "shifts" left, and "joins" with the negative peak
i feel this exactly as a result of a highpassed (or maybe twice) sawtooth, fed to a hardclipper to clip only the negative peak
at low frequencies, the filtered waveform will have a "bigger" part which is below zero (because of the HPF filtering) and the clipper will clip the edge longer (in time)
while at higher, frequencies, the "end" of the clipped edge will arive sooner after the negative peak
so, if i am right here, and if i get the same results as the waveform in that ogg, i will assume that i've "emulated" the oscillator section ;]
but this is very tricky, every component (either HPF filter, or hard clipper, or shaper) must be carefully placed in the right placed, with the right values, need more knobs and a magnifier
currently, i matched the PW with the tanh(hpf(saw)*amp)
the hpf frequency i used was ~13Hz
amp is still around 45 to 90 (i'm using 60 now)
oh, another thing, the amplitude of the positive and negative peaks
they change depending on frequency too
this was the clue that made me think about combined shaped-saw + filtered-saw
having the negative peak smoother < this solves the resonance character of the square
but the amplitudes of the peaks..
two things for sure:
1. on higher notes - the negative peak is louder
2. on lower notes - not
so i suppose this is because of that "bump" which seems to be "joining" the shaped sawtooth at higher notes
so, if you combine the shaped-saw (which looks like a pulse) with the same saw you used to get that pulse - your negative peak will be louder, and the result will look like some odd pulse
blah, got to sleep
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
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
blah, i did a picture to show what i'm talking about
http://www.box.net/shared/a29673h57l <- picture
top: my synth, only the PW at different osc frequencies approximated with the shape(hpf(saw)*amp) (no bump thing)
bottom: combinedtests.ogg
the red lines.. this is how the "unfiltered" waveform looks
on the bottom, there might be another HPF that filters this hard-clipped combined waveform too (because of the way the bump looks like)
i'm pretty sure now, just need time to test it
http://www.box.net/shared/a29673h57l <- picture
top: my synth, only the PW at different osc frequencies approximated with the shape(hpf(saw)*amp) (no bump thing)
bottom: combinedtests.ogg
the red lines.. this is how the "unfiltered" waveform looks
on the bottom, there might be another HPF that filters this hard-clipped combined waveform too (because of the way the bump looks like)
i'm pretty sure now, just need time to test it
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
-
- KVRAF
- 3404 posts since 15 Sep, 2002
Wow. Good detective work.
Swing is the difference between a drum machine and a sex machine.
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
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
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
i just started up a new project in SynthEdit, to test the oscillator section sepparately, kinda got a setup with a bunch of knobs, and i can tweak it to match (by eye) the characteristics i described
could it be? 3 HP filters in the oscillator!?
- first, and i'm sure about this the shape(hpf(saw)*amp)
- then, this whole thing gets filtered by a second HP filter
and the "bump" probably comes from another copy of the (unfiltered) saw, clipped and HP-filtered
so the whole thing i did looks like this:
saw > hpf1 > amp+shaper > hpf2 > OUT
saw > hpf1 > amp2 > OUT
saw > clipper > hpf3 > amp3 > OUT
so, the signal after hpf1 is split, one part goes to the amp+shaper (to form the square) the other one is amplified, and added to the output directly (this adjusts the positive vs negative peak volume)
and also the "raw" sawtooth also goes to a hardclipper, which only cuts off the positive peak (kinda a bit over 0.0) this makes an edge, which is then HP filtered and added to the output, this is what makes the bump
when the osc frequency is increased, this "bump" moves forward to the negative peak of the other part of the waveform, and "joins" it, just like i explained earlier
i'll take this "circuit" and code it into my osc, and i'll try it in the synth.. hope i get good results ;]
could it be? 3 HP filters in the oscillator!?
- first, and i'm sure about this the shape(hpf(saw)*amp)
- then, this whole thing gets filtered by a second HP filter
and the "bump" probably comes from another copy of the (unfiltered) saw, clipped and HP-filtered
so the whole thing i did looks like this:
saw > hpf1 > amp+shaper > hpf2 > OUT
saw > hpf1 > amp2 > OUT
saw > clipper > hpf3 > amp3 > OUT
so, the signal after hpf1 is split, one part goes to the amp+shaper (to form the square) the other one is amplified, and added to the output directly (this adjusts the positive vs negative peak volume)
and also the "raw" sawtooth also goes to a hardclipper, which only cuts off the positive peak (kinda a bit over 0.0) this makes an edge, which is then HP filtered and added to the output, this is what makes the bump
when the osc frequency is increased, this "bump" moves forward to the negative peak of the other part of the waveform, and "joins" it, just like i explained earlier
i'll take this "circuit" and code it into my osc, and i'll try it in the synth.. hope i get good results ;]
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
- 239 posts since 22 Jan, 2007 from Germany
Hmm, here's the teebee's VCO schematics (not complete, but the interesting part for the saw/pulse output):

So, the saw output passes two ways, a 100k resistor(R35) and a 0.01u cap(C10) with a 10k resistor(R34). Looks like the 'raw' saw gets mixed with a 'softened' saw.
The mixed current 'drives' the next transistors base which 'controls' the throughput of some current, which is again 'softened' by a cap (C11) which is connected to ground.
Hmm, my EE knowlegde is poor, but maybe anyone with better knowledge can correct me and add some more explanations
EDIT: The C10/R34 path is looking like a highpass, isn't it?
EDIT: Then C11/R35 is a lowpass, huh?

So, the saw output passes two ways, a 100k resistor(R35) and a 0.01u cap(C10) with a 10k resistor(R34). Looks like the 'raw' saw gets mixed with a 'softened' saw.
The mixed current 'drives' the next transistors base which 'controls' the throughput of some current, which is again 'softened' by a cap (C11) which is connected to ground.
Hmm, my EE knowlegde is poor, but maybe anyone with better knowledge can correct me and add some more explanations
EDIT: The C10/R34 path is looking like a highpass, isn't it?
EDIT: Then C11/R35 is a lowpass, huh?
... 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+
---
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+
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
i'm not sure, i can't even see where the saw-generator is there (grrr)
but i got almost similar results here (not exactly, but similar)
vb303_rv0_sqr_low01.wav (1.6MB)
Left: my synth, Right: rv0's TB-303 (combinedtests.ogg)
but i got almost similar results here (not exactly, but similar)
vb303_rv0_sqr_low01.wav (1.6MB)
Left: my synth, Right: rv0's TB-303 (combinedtests.ogg)
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
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
vb303_square_test01.jpg
a block scheme of what i did.. it's probably not exactly what happens in the TB-303, but similar, i've also drawn the waveform (by eye) to show how it looks without being processed by the filter, or the DC-Killer before the filter..
EDIT: the first HP filter there (which is before the tanh() shaper) mainly determines the "PW" symmetry across the frequency range of the whole thing
i figured it's approximately set to 13Hz
it makes the square very asymetrical for low osc frequencies, and it's getting better at higher
EDIT2: .. the 1pole HP there is the perfect thing to use, because it matches the PW variation across the whole usable range of the oscillator, the only thing that needs to be determined is the perfect cutoff frequency, which is around 13Hz somewhere
a block scheme of what i did.. it's probably not exactly what happens in the TB-303, but similar, i've also drawn the waveform (by eye) to show how it looks without being processed by the filter, or the DC-Killer before the filter..
EDIT: the first HP filter there (which is before the tanh() shaper) mainly determines the "PW" symmetry across the frequency range of the whole thing
i figured it's approximately set to 13Hz
it makes the square very asymetrical for low osc frequencies, and it's getting better at higher
EDIT2: .. the 1pole HP there is the perfect thing to use, because it matches the PW variation across the whole usable range of the oscillator, the only thing that needs to be determined is the perfect cutoff frequency, which is around 13Hz somewhere
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
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
btw, is it possible to switch a 1 pole HPF between 1x and 4x oversampling (while runing), without loosing it's buffers (so you don't get a click) ?
this is supposed to be an optimization trick
while the synth isn't audiable (when it played one note, and waits to play the next, between these "gaps" of silence) some sections of the synth still need to be processed (IMO)
for example the OSC has to run, and the main filter must process that input (that's what the analog synth does) it matters for when the next note hits, you already got some resonant stuff over the waveform going on, this would be lost otherwise
but, between the gaps, the oscillator may switch to pure sawtooth (you know, non-bandlimited mathematical ramp thing) it'll drive the filter, no problem
also, if the oscillator was running at 4x oversampling, it could also switch to 1x, (phase wrapping floor() usage will be minimised)
also, the HP filters that are inside the Square shaping circuit could switch to 1x oversampling, hm.. can they?
till now i figured there are 3 1pole HP filters inside the saw-to-square shaper, they are (i believe) set at fixed frequencies, and probably never change
so the coefficients for the HP filters could be precalculated on init (in two flavours, for 1x and 4x oversampling), and never again (except if the sampling rate changes, blah)
now while they are running at 4x, could i just "switch" to 1x without any clicks or wierdness?
at one point i just start processing the filter only once per output sample instead of 4 times, and use the other precalculated coefficients (for 1x)
will the values in the buffers be OK after the "switch", or do they need to be scaled up/down to prevent clicks?
this is supposed to be an optimization trick
while the synth isn't audiable (when it played one note, and waits to play the next, between these "gaps" of silence) some sections of the synth still need to be processed (IMO)
for example the OSC has to run, and the main filter must process that input (that's what the analog synth does) it matters for when the next note hits, you already got some resonant stuff over the waveform going on, this would be lost otherwise
but, between the gaps, the oscillator may switch to pure sawtooth (you know, non-bandlimited mathematical ramp thing) it'll drive the filter, no problem
also, if the oscillator was running at 4x oversampling, it could also switch to 1x, (phase wrapping floor() usage will be minimised)
also, the HP filters that are inside the Square shaping circuit could switch to 1x oversampling, hm.. can they?
till now i figured there are 3 1pole HP filters inside the saw-to-square shaper, they are (i believe) set at fixed frequencies, and probably never change
so the coefficients for the HP filters could be precalculated on init (in two flavours, for 1x and 4x oversampling), and never again (except if the sampling rate changes, blah)
now while they are running at 4x, could i just "switch" to 1x without any clicks or wierdness?
at one point i just start processing the filter only once per output sample instead of 4 times, and use the other precalculated coefficients (for 1x)
will the values in the buffers be OK after the "switch", or do they need to be scaled up/down to prevent clicks?
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
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
only two ways? hm..neotec wrote:Hmm, here's the teebee's VCO schematics (not complete, but the interesting part for the saw/pulse output):
So, the saw output passes two ways, a 100k resistor(R35) and a 0.01u cap(C10) with a 10k resistor(R34). Looks like the 'raw' saw gets mixed with a 'softened' saw.
The mixed current 'drives' the next transistors base which 'controls' the throughput of some current, which is again 'softened' by a cap (C11) which is connected to ground.
Hmm, my EE knowlegde is poor, but maybe anyone with better knowledge can correct me and add some more explanations
EDIT: The C10/R34 path is looking like a highpass, isn't it?
EDIT: Then C11/R35 is a lowpass, huh?
where does it get shaped? which element is that?
am i right that the shaped saw is combined with the unshaped one?
lowpass? well, don't know, but if there is a lowpass filter, i guess the only place where it makes sence for it to be would be filtering the output of the tanh() shaper (assuming i'm right about the saw+shape(saw))
about the resistors and capacitors there, 100K i guess means 100 KiloOhms, right? and 0.01uF is probably that wierd character..
could you tell the approximate cutoff frequency of a HP/LP filter just by knowing the "values" of the resistor and capacitor?
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
- 239 posts since 22 Jan, 2007 from Germany
The oscillator's (which is not shown here) output is at the top (left of 2SK30) which then 'flows' to the right (look the saw waveform drawings, the arrow marks the saw output).
The saw->pulse shaper circuit is position in the upper-left quarter of the schematics.
The R34/R35/C10 circuit does some filtering, as I think (but I really don't know how this works in this case. I tried some simulations in Multisim, but no good results).
The 'tanh' stage should be Q8, which is 'controlled' by the shaped saw input (from R34/R35/C10) and throuputs some current/voltage which is filtered (as it seems) by a RC lowpass (R45,C11).
I'm not sure about all this ... neither about the units they use, but if this is a RC lowpass, then cutoff can be calculated by 1/(2 * PI * R * C):
1/(2 * PI * 22K * 0.02u) = 361Hz .... hmm
*sigh* ... I just don't get it
. Maybe I should rebuild the whole oscillator in Multisim and make some tests ...
The saw->pulse shaper circuit is position in the upper-left quarter of the schematics.
The R34/R35/C10 circuit does some filtering, as I think (but I really don't know how this works in this case. I tried some simulations in Multisim, but no good results).
The 'tanh' stage should be Q8, which is 'controlled' by the shaped saw input (from R34/R35/C10) and throuputs some current/voltage which is filtered (as it seems) by a RC lowpass (R45,C11).
I'm not sure about all this ... neither about the units they use, but if this is a RC lowpass, then cutoff can be calculated by 1/(2 * PI * R * C):
1/(2 * PI * 22K * 0.02u) = 361Hz .... hmm
*sigh* ... I just don't get it
... 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+
---
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+
- KVRAF
- 2569 posts since 4 Sep, 2006 from 127.0.0.1
this is what i was also trying to do, with another circuit simulator
one thing that confuses me is the transistor
on the paper, the "base" is on right side, while in my simulator, it's on the left
also, somewhere near that section (but not visible on your image) i see another transistor, which i *think* is the same, but the base is on the left side
what's going on?
is that a PNP or not? are both these the same type or the other (base-left) is different?
blah
and, isn't C11 a diode!? i can't see it clearly
1/(2*pi*R*C) <- are you sure about the R and C being KOhms and uF?
what does this return? KHz i suppose?
and where does the 0.02uF come from? 1/50 on the paper?
what about the highpass before the tanh() shaper?
the R34/R35/C10 thing is strange to me, it should be some kind of a highpass filter if it's before the tanh() shaper
and if it is, the cutoff should be around 13Hz
this is what i'm 90% sure of..
warning: i'm not sure if you can understand what i wrote here, i am confused myself too
one thing that confuses me is the transistor
on the paper, the "base" is on right side, while in my simulator, it's on the left
also, somewhere near that section (but not visible on your image) i see another transistor, which i *think* is the same, but the base is on the left side
what's going on?
is that a PNP or not? are both these the same type or the other (base-left) is different?
blah
and, isn't C11 a diode!? i can't see it clearly
1/(2*pi*R*C) <- are you sure about the R and C being KOhms and uF?
what does this return? KHz i suppose?
and where does the 0.02uF come from? 1/50 on the paper?
what about the highpass before the tanh() shaper?
the R34/R35/C10 thing is strange to me, it should be some kind of a highpass filter if it's before the tanh() shaper
and if it is, the cutoff should be around 13Hz
this is what i'm 90% sure of..
warning: i'm not sure if you can understand what i wrote here, i am confused myself too
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
- 239 posts since 22 Jan, 2007 from Germany
Hmm, here are some virtual oscilloscope pics.
The saw wave has 10V/div scale, the square 5V/div.
Looks interesting ... 25% duty cycle?
The saw wave has 10V/div scale, the square 5V/div.
Looks interesting ... 25% duty cycle?
... 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+
---
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+
-
- Banned
- 18651 posts since 2 Oct, 2001 from England
i get the impression thta certain ppl are basing their facts on samples form an unknown source...without looking at drawings or even a real 303
i know devs who have ripped open 303's to do real research into this machine, seems very odd that someone would try to build an accurate 303 emu and not have one in front of them, but rather use samples to judge everything
i know devs who have ripped open 303's to do real research into this machine, seems very odd that someone would try to build an accurate 303 emu and not have one in front of them, but rather use samples to judge everything
