Open303 - open source 303 emulation project - collaborators wanted

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

Post

That's a really important fact/finding... so every note the glide is reset with a glide "follow" mode rather than retaining its previous/continuous state. That should be an extremely audible effect so of high or even critical importance.

This all sounds like severe dejavu to me though. I recall arguing about this stuff years and years ago. I wonder what my arguments were. I think generally these things are somewhat esoteric "extreme 100% accuracy" factors... but some of them definitely will be audible even if people don't know exactly what they're hearing or reliably A/B, they will hear a difference.

So cool stuff from the perfection point of view... but I also find it cool to look at features like the glide being technically a "follow from last note" or the way the capacitor creates those "snappy" effects for the pulse waveshaper. I feel like that makes the circuit even more interesting to apply as a module.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

aciddose wrote: Sat Jun 29, 2019 10:55 pm That's a really important fact/finding... so every note the glide is reset with a glide "follow" mode rather than retaining its previous/continuous state. That should be an extremely audible effect so of high or even critical importance.
Well, assuming the switch can pass enough current. The datasheet seems to suggest we should expect the switch to have "on resistance" of somewhere around 100ohms, which might not be entirely negligible when you're looking at a 8us window...

edit: assuming the 100ohm, the RC time constant comes down to about 22us(?), which would the glide only really has time to jump about 1/3rd of the way towards the target.. which is still a glitch if the tempo is high enough that the pitch hasn't settled yet, but assuming a perfect switch doesn't exactly seem right either.. :)

sort of off-topic remark: it is somewhat hilarious that apparently Roland realised their "user interface" might not be the most intuitive, given that the service manual lists a number of symptoms "likely to be found by the user" where they basically expect PEBKAC issues..

Post

Since the glide time is only 50ms to 90%, it means we get to 50% after only 15.05ms... so within the usual range of tempo it doesn't seem likely to produce much notable effect since the glide would have already finished anyway.

The 4066 though only has 100 ohm "typical" resistance with a 4.5v supply. Since it's supplied by 12v in the tb-303 the typical is actually 30 ohm, while the maximum guaranteed is 70 ohm. So the actual likely time constant would be based upon 30 ohm = 6.6 us which means it would most likely be guaranteed to fully jump to the previous note at the start of every glide.

The only question then would be what percentage of the glide would be jumped across at what tempo + mode. Since a 1/4 note (beat at 4/4) at 120 = 500 ms and 1/16 = 125 ms, 15.05 ms starts to look pretty short.

16th triplet = 20.8333~ ms... so then we start to get into territory where it would make a big difference. Likewise for faster tempos, but just to get to the 90% point at 50 ms requires a tempo of at least 300 bpm playing 16ths which is pretty much impossible or at least pointless (does anyone run 16th notes at 300 bpm, normally for basslines?)

It definitely would make a substantial difference for triplets though.

For 20.8333 ms you'd have reached 61.688% which = 7.4 semitones given a slide of an octave width. So the correction would be 4.6 semitones during the 8 us pulse. It would be sort of over-kill to go to the effort to simulate that to find out exactly how audible it is but I'm fairly certain it is actually audible.

I'm also fairly certain it's rather esoteric though :)
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

Oh, but the time constant might be wrong since we're talking 200k and 220n, right? I'm using the number for the waveshaper... duh.
2pi * 200e3 * 220e-9 = ~276.46 ms glide
This is the time constant to reach 1 - 1 / e, and 90% = ~636 ms.

So that's quite a bit different. Now 50% = 191 ms so we're well past that with 16th notes at 120 bpm. So not at all esoteric in that case. ... although now I really wonder if my math is right this time or not :)
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

don't u 2 just need the time window and non-linearity for glide,
in a pure computing sense?

Post

The glide is fully linear (in terms of it's an RC filter, not non-linear). We're talking about the pitch that the glide would sit at when a new note starts... so a glide that hasn't finished yet from a previous note.

Say for example you're going from C2 to C4, but you've only made it 50% to C3. The glide then "follows to last note" and jumps up super fast to C4 before it starts gliding back to the next note.

So that would give you sharp "jumping" edges in pitch unlike a "retain" glide. While retaining the pitch say you had C2, C4, C2, C4 over and over. If the tempo was high enough the pitch would just wobble back and forth really close to C3 and never reach C2 or C4. Since the tb-303 triggers a "follow" it means it does jump to each note before beginning the next glide.

... although I'm not sure where the 22 us came from, since:
2pi * 30 * 220e-9 = ~4.1469e-5 = 30 ohm = ~41.47 us.
Conversion to 90% rather than 1 - 1/e: = ~95.49 us.

100 ohm = ~138 us, 90%: = ~318 us.

So that would be far outside the window of an 8 us pulse anyway and would really depend upon the true pulse length for the 4066 being open on the opamp output side to the capacitor, and the true "on" resistance. So while I'm still not 100% certain about all the numbers it looks like given these numbers we can't yet say the tb-303 uses a "follow" glide and that this is indeed just a minor glitch. percent(coefficient(0.9, 95.49), 8) = ~17.54%

If my numbers are off-by-ten somewhere it would mean 9.55 us, which would be a major glitch (8 / 9.55 = ~85% of destination pitch.)
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

aciddose wrote: Sun Jun 30, 2019 7:36 am Oh, but the time constant might be wrong since we're talking 200k and 220n, right? I'm using the number for the waveshaper... duh.
A couple of pages (and a couple of years) back, the effective resistance of the resistor maze was discussed and from the capacitor it looks like 100k, because it effectively always has two 200k paths in parallel.

The MC14066B (which is what the service manual says on second page) datasheet from OnSemi that I looked at was REALLY confusing in terms of the on-resistance, with the table values and graphical plots contradicting each other, but the table values come out as roughly 10ohm when you pick the mid-point between 10V and 15V values. In parts lists the Service manual claims it's HD14066B from Hitachi instead, but the table values from the datasheet of that one are very similar.. again giving about 100ohm (typical at 25 celcius).

Whether these values are actually right, I don't know. I don't have any around to measure (and the hobbyist friendly component store nearby moved much further, so I'm not going to bother fetching one). Maybe it's less, maybe there's a lot of variation. Either way, both datasheets list maximum values at much higher and unless Roland actually picked them by hand, every TB-303 might be somewhat different in this sense.

Post

I agree... somewhat. The question remains about the actual on-resistance for the part they used and designed with. So depending on that we could see either the glide follow is intentionally implemented (the strobe pulse was timed to fit the follow time) or in the case the original design has the strobe length less than the time constant it would point to the effect having been a design flaw or bug and unintentional.

Maybe "it's not a bug it's a feature! LUCKY!!!" only, generally we don't do that where minor variations in temperature or batches of parts would significantly impact performance.

My 4066s have measured actual on resistances between 20 and 50 AFAIK... I'm not sure if I have any on hand at the moment. Still though the math works out such that we're not "well within" the bounds of component variation while ensuring a full follow for the glide... so I'm looking at "okay, where did I mess up the math?" or that this is most likely a glitch or bug.

edit: You're right though, from 25C ratings, this Toshiba datasheet from 97 gives 70 ohm for 15v and 110 ohm for 10v, so 12 = ~95 ohm (the effect is non-linear.) That's way different from the Fairchild datasheet which gives 30 ohm typical for 12v and <70 ohm guarantee... so it would likely give 20 ohm to 50 ohm like the ones I remember measuring at 15v.

So it seems the part varies wildly by manufacturer and process... it may be partly due to different CMOS process widths or similar and I'd speculate more modern, smaller transistors should have lower resistances... but I suspect that's also controllable to a degree by varying the mask widths and such.

So it's possible even different batches or revisions of the same manufacturer could produce widely varied resistances... there may be a 4066B and 4066C or similar where B = ordinary, C = low on-resistance. The exact part from the service manual is the HD14066BP ... I assume P = plastic package, but which year isn't specified. They do include a little snippet from the datasheet though:

Image

Says: "VDD: 3 x 10^2 Ohms typ"

Do they mean 300 ohm?
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

aciddose wrote: Sun Jun 30, 2019 6:25 pm I agree... somewhat. The question remains about the actual on-resistance for the part they used and designed with. So depending on that we could see either the glide follow is intentionally implemented (the strobe pulse was timed to fit the follow time) or in the case the original design has the strobe length less than the time constant it would point to the effect having been a design flaw or bug and unintentional.
The CPU is nominally running at 440kHz (ie. about 2.3us/clock, though the service manual says you should measure 2.2us), so the 8.75us strobe (from the paper) would be slightly less than 4 clocks. That suggests it might be a case of just doing it as fast as the CPU can handle.

What strikes me as odd though is the much longer (ie. about 20 clocks) slide-on strobe for notes that are not supposed to slide... unless the reason is that they parse the pattern on the fly and it takes that long to figure out that we don't actually want a slide?
My 4066s have measured actual on resistances between 20 and 50 AFAIK... I'm not sure if I have any on hand at the moment. Still though the math works out such that we're not "well within" the bounds of component variation while ensuring a full follow for the glide... so I'm looking at "okay, where did I mess up the math?" or that this is most likely a glitch or bug.
I'm willing to bet that they didn't want a slide reset, but they had to strobe the signal anyway to latch the pitch and accent... so they strobed the signal as fast the CPU could, never worried too much about the on-resistance of the switch and it passed QA just fine 'cos they probably weren't running the thing at 150BPM+ and for significantly lower tempo the slides have long completed anyway.

Post

o hai there guys

iirc the slide signal in the 303 has to be bumped shortly in the beginning of every step, the x0xb0x has a dedicated pin for IC9 CLK (NOTE_LATCH), while the 303 uses the SLIDE signal for that, they were short on GPIO pins
however, i don't think this short bump causes the slide to turn off during multiple slid notes (i've not seen a difference between 303 recordings and my x0xb0x or my software approximations)

i've written a chunk of text about the 303 and MIDI, where i also have rough illustrations how the gate/slide/accent signals look like, and explain how the 303 sequencer plays patterns
there sequencer has "more work" to do in the middle of every step, not so much in the beginning of the step
on the beginning of each new note, the VCA envelope may take a surprisingly (to me) long time to charge up before it opens, iirc up to 5ms

and the square wave was indeed the most difficult thing to approximate in the 303, also the filter cutoff coupling (but guest (from the x0x forum) came up with a magical formula from the schematic, which did the whole magic)
in vb404, i decided to try and make a "cheap" model of the 303 square, not aiming to make it too accurate, it just had to sound similar
so as i know, the most audible aspects of the "square" are the frequency-dependant PW and frequency-dependant soft middle edge
so i made a silly model with a sawtooth into an adjustable hard clipper, slapped all the interesting variables onto temporary knobs and went to calibrate this model against the x0xb0x at a number of frequencies, writing down the settings
then plotted the resulting values and fitted curves.. and it sounds pretty "similar", it looks like its made of linear segments tho
i also added 1st order lowpass onto these, to make the variables "morph" when the pitch changes

the exact shape of the square does matter as soon as you have nonlinearities, and especially if you slap a distortion effect on the 303


if you wonder how a x0xb0x sounds like at 700BPM.. clik here https://www.youtube.com/watch?v=wrRtDacfxd0

and speaking of envelopes, i got this kool picture showing the difference between accent knob at zero versus at max:
Image
orange = accent 0
blue = accent max
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

If you want to hear how Open303 written by Robin Schmidt sounds like. You can try the my web version called BassMatrix.

https://olawistedt.github.io/BassMatrix/

Press "Start web audio!" button to begin. Reload page if you want a new random sequence.

I have not my self run a real TB-303 so any input is welcome.

Post

Hiya, a year and a half later after reading this thread, I can confirm that the glide circuit is as simple as it looks.

The "on resistance" of the 4066es is negligible, and with a real TB303 and a Behringer TD3 the rise time is immeasurable even on my 400MHz sillyscope. The capacitor is driven directly from the output of the opamp so it slews to pitch instantly because it's driven by a low impedance source that can deliver infinite current (not really infinite, the battery wouldn't last five minutes, but close enough for our purposes).

With glide on, the story is a bit different. The capacitor is in series with a resistor, formed by that R/2R DAC network, right? But how do we know what it is? Well we can apply a bit of Thevenin and Norton to the problem, like I learned in university, or we can just simulate it and see what happens. Build the DAC, drive the pins with 5.333V (that's the clever bit, 5.333 / 64 = 0.08333V, or one semitone at 1V/oct). With all the outputs on you get 5V at the top of the DAC. Strap that to ground and measure the current - 50μA. Okay so V/I = R = 5V/0.00005A = 100kΩ resistance. Switching the voltages at the input resistors makes no difference, because you're just wiring them in parallel with one resistor or another.

So your "glide off" time constant is nothing, instant, and your "glide on" time constant is RC = 100kΩ/0.22μF 100000Ω/0.00000022F = 0.022 seconds, 22ms time constant, which is the time to reach 37% (or so) of the target voltage. Over the full swing, this is nearly 100ms, which you can either work out with an exponential function or determine experimentally.

Post

Hi you all!

Just wanted to share some news. I've gone ahead and ported the open303 engine to JUCE to make it super easy for Linux, MacOS, and Windows users to compile and distribute it hassle-free. Plus, I've whipped up a shiny new interface for it!

Image

You can snag it over at this link: https://midilab.co/jc303

Now, here's a little heads up: Since I don't have an Apple developer account, I couldn't sign the MacOS plugins. So, if you're on MacOS, you'll need to give it the green light to run manually.

I also wanted to take a moment to give a big shoutout and thanks to all the awesome folks involved in creating this beautiful piece of software. Seriously, it's the best digital emulation I've ever laid my ears on! 🎶👏

Post

Very cool! Thanks!
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post

Great to see the code getting some more use! Let there be acid! :hyper: And thanks for making your project also open source and for the kind words of endorsement! That's very flattering! :love: Looks like you have some other interesting projects going on there as well! Meanwhile, I have semi-recently included some fun features into the sequencer of my own version in ToolChain:

https://www.youtube.com/watch?v=ZJBlx-lGvKU

But it's not yet available in any official release yet. I guess, really need to prepare some update of ToolChain someday semi-soon. It's been a while since the last official release on my website. There are lots of new features - but so many of them are half-baked and there are also quite a lot of bugs. :scared: Lots of loose ends. Tweaking algorithms and getting cool results is one thing - preparing a proper software release is a different story. We'll seeeee...
Last edited by Music Engineer on Wed Sep 20, 2023 2:06 am, edited 2 times in total.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post Reply

Return to “DSP and Plugin Development”