Category: OSCar

Bringing back the OSCar synth

  • Bit of an OSCar update

    It’s been months, I know. I’ve been quietly getting on with OSCar, and a few revisions to the Head Tracker, and dealing with the usual stuff of life. So I want to sneak out an update to that effect before publishing the usual ADC transcript.

    There was a bit of a strange play-fest a few months ago involving Synth Samurai where I played old and new OSCars together at Paul’s place while he filmed me surreptitiously. More work has happened since, of course. The factory presets on the two are now indistinguishable, except that the new OSCar is properly in tune, and electronically quieter.

    I’ve come to the conclusion that there’s three reasons for OSCar’s reputation for poor reliability:

    1. The SRAM backup battery was a NiCad and they always leak. Fortunately the battery was mounted to the control surface so, when the memory fails, it doesn’t take the rest of the synth with it.
    2. OSCar is held together by exquisitely-tuned timing circuits, set by ceramic capacitors and 74LS-series logic working to delay some rise and fall times with respect to others. Single-digit nanoseconds make all the difference, but capacitances drift as dielectrics age. Tricks like the ‘get eight control voltages and two audio signals out of a single mono DAC’ start to fail. And if anything goes wrong with the ‘read the wavetable data during the Z80 refresh cycle, let it settle in the DAC, and then poke it through the sample-and-hold demultiplexer gate before everything else wakes up again’ hack, going a bit noisy is the best-case scenario.
    3. The user interface design means that you’re only ever a button press away from losing the unsaved preset you’re working on, or saving over a slot you were using, of which there are only 36. You can’t preview, you can’t undo, and you can’t back things up to MIDI or cassette individually: it’s everything or nothing. I suspect a few OSCars have found their way into the studio car park via a first-floor window.

    All the dull stuff, like the bootloader and the proper production memory map, are now in place. Presets load and save, and the MIDI tools we give to sound designers for Mantis are now fully compatible with OSCar too. There’s a lot still left to do, though. I keep thinking of improvements to make to the user interface that fall under what I might loosely call my principles:

    • Respect the original restrictions and workflow: they are what makes Chris and OSCar Chris and OSCar.
    • If it’s genuinely broken, don’t make excuses but fix it instead.
    • Modern conveniences, like undo and working MIDI, are non-negotiable.
    • Leave some places to hide easter eggs, and try not to give the game away.

    These are almost always mutually incompatible, so it comes down to taste. It’s now a race to work these out because the front panel design freeze deadline is fast approaching.

  • You can play it!

    I’m not at Superbooth, but one of our OSCars is. There have been a few sleepless nights to get it over the line. Paul Whittington’s more camera-ready than I am. Here he is, surrounded by synths I’ve had a hand in designing.

    (Three models is just enough to use the verb ‘surrounded’, I think. Really, they’re all co-production credits. I’ve laid out a lot of boards, written a lot of firmware, and dealt with a lot of manufacturing stuff. But I don’t know how one crosses the floor in this industry from craftsman to auteur.)

    In the smoke-and-mirrors department, there’s still a lot OSCar doesn’t do. The list begins with saving patches, arpeggiating, sequencing, syncing, and the PWM and waveform-designing features, all of which are going to benefit from some user interface reappraisal.

    I also need an antialiasing day to prove to myself that I have determined the source of it all, and that I can fix it. In theory, OSCar will never alias: as covered in previous posts and talks ad nauseam, its sample rate is locked to the note frequency, so aliases become harmonics.

    Most of what you hear on that video, especially obvious on the Init Patch (nowhere to hide with a full-range sawtooth), is aliasing from a different source. The Superbooth unit has an uncorrected design fault on the CV filters, which I didn’t spot in time. The voltage references to the DAC therefore have a lot of the 35kHz CV carrier frequency on them, so the DAC dutifully turns into an amplitude modulator, makes a bunch of arbitrary sidebands, and then sample-and-holds the result. That’s what you’re hearing. When the filters work as intended, those sidebands will be more than 90dB down. I live in dread of finding out that the filters can still pick them out.

    I think I might also have a problem with the two oscillators interacting, but that’s just a hunch: if it’s happening it’ll be caused by the accurately clocked sample-and-hold at the end of the audio chain, that’s copied from OSCar, being driven by the wrong duty cycle or having the wrong capacitance. This is why I need a day just to make sure I’ve tackled all the fidelity issues before knocking out another PCB.

    Sound-wise, the other known problem to resolve is treating the PLLs that multiply up the clock. My design needs to restrict the multiplied-up clock range, which drives the sample rate, to a little over an octave, and fold over at that limit. PLLs don’t, of course, handle the step change too elegantly and you get a few clicks of complaint when that happens.

    OSCar didn’t have to fold over as much. First, because it was confined to a five-octave range that a VCO can easily manage. I don’t know if customers would be happy with that now: I wouldn’t. Second, because a lot of the clock folding was done by external counters, which can change rate instantly. Chris was therefore able to run his VCOs at more than 500kHz; mine trigger an interrupt each time so I can’t go quite that quickly. All of which leaves me a little exposed. Still, nothing that a bit of solder and a lot of thought can’t fix.

    The work is paying off because, apart from those flaws, it sounds pretty good (judge for yourself: playing starts at 4:20). This is pretty much the most success I’ve had from any design’s version-one hardware, although it’s kind of version two because I built that Z80 clone and learned from my mistakes.

    The downside of presenting a first-issue board is that it’s actually a sign that the second issue is overdue. The one at Superbooth is about four iterations deep of learn-something-fix-something. At some point you need to clean the slate, but I want to run a couple more tests first.

    Everyone’s a critic

    We’re long past the stage where it’s too early to solicit criticism. There’s always the risk of misaligned expectations, though. One of the certainties of a creative profession is that the first tentative outing will be judged by the same standards as a final product. One needs to learn to accommodate this kind of thing:

    It’s peculiarly gratifying to be reminded about why I’m already anxious. But, first, luxury product: price reflects performance, effort, and the fact that exclusivity is expensive. One selfish reason for keeping this blog is that the act of writing helps to clarify and focus the mind. But another is to signify the amount of thought, care, and skill involved in completing a synth, even — or especially — if the template is a product that already exists.

    Lest we forget, even if you scraped the new-old-stock parts together, got the PCBs faithfully copied, and tooled up to reproduce a design to Anthony Harrison-Griffin’s original spec, you could not legally sell a part-for-part replica of an OSCar today because it wouldn’t pass an EMC test and earn its FCC or CE accreditation. From time to time, of course, individuals do produce a short run of clones after this fashion, but they’re doing it out of love, are too small to go after, and frankly, you’d have to be a special kind of dickhead to want to spoil their fun.

    So first, we need to get to a completely working OSCar with production parts and a compliant design. Which we’ve also been fixing, hardware- and software-wise, in myriad ways, so it’s less fragile and electrically quieter than the original. We then add a load of conveniences: USB bus power, velocity sensitivity, comprehensive MIDI control, a frequency range that takes it down to floor-shaking frequencies, and numerous other features that people either want or expect from a modern instrument. Even if you think minimum wage is ten times too much to pay to watch me having fun doing a thousand hours of unforgiving maths, this is a bargain.

    Second, we have Chris’s OSCar #1 so, when we decide to declare it ready, we’ll do so with authority and evidence. Frankly, what matters to me? Not being the person who dares to presume without merit on Chris Huggett’s legacy, and mucks this up.

    Third, brand launches have gone a lot worse.

    There’s a danger that design work slows down because I waste too much time enjoying my own prototype. Not yet, though: my excuse this week will be that I’ll need to go and think about something else for a while until my eyes uncross again. Perhaps I’ll disassemble the arpeggiator.

  • Unmessing the filters

    It looks like ADC is about to get around to releasing my talk from last year. That talk video is an hour-long digest of the most interesting parts of this story, about five months behind where I am now.

    Yesterday, I handed over a prototype to send to Superbooth. The firmware is crap at the moment, but I’ve got a week to improve it. I ended up installing this monstrosity:

    This is exactly the scale of bodge that I’d usually advise against: a two-hour mission of surgery that is barely worth doing over scrapping the board.

    There is a miracle to this that I still cannot take for granted. I spent hours in the late 90s labouring over Veroboard prototypes, debugging track cuts and misplaced wire runs and solder shorts. As recently as 2010, a 2-layer plated-through PCB like this would have taken a minimum of three weeks to manufacture and cost about £400, and I’d have had to pay. These PCBs arrived from JLCPCB in Hong Kong five days after I placed the order, and cost me about £25 including shipping. The low cost and short turnaround of custom PCBs has completely changed our profession.

    (All that said, I’m experimenting with the head tracker at the moment. Being a flex-rigid board makes these a special order even in Asia. It was a throwback to the Old Ways: ten bare PCBs did indeed take more than a month to arrive and cost over £500.)

    Back to our story. A few postings ago, I remarked that I missed out some level-shifting circuitry to give the control voltages their proper range. Flippantly, I said:

    Just don’t ask me to wire one into a rev. 1 prototype, unless you’re sponsoring me for charity.

    — me, Little Green Wires

    My attitude towards tempting fate is to do it as often and as brazenly as possible, to the extent that people begin to edge away. Wherever manufacturing is concerned, one should tease all possible misfortune out of the gods at the earliest opportunity, as it only gets more expensive later on. I really ought to know better because, of course, it turned out to be a lot worse than I’d thought. OSCar doesn’t produce a 0–5V range of control voltage, but about −3.5–+3.5V. I overlooked this for a few reasons, but two are most important.

    First, I lent out my half-speed OSCar clone, which meant I didn’t have a reference circuit to hand. The clone stopped working properly at some point during ADC, and I couldn’t be bothered to fix it. The DAC still outputs control voltages on schedule, but something weird goes on when I try to play a note, like it’s resetting. Nobody alive is better positioned to debug it than me, but frankly I didn’t have a good enough reason to get it going again and I’m spread thinly enough.

    Second, the DAC0808, that heroic high-speed 8-bit mono DAC that OSCar uses for everything, has a data sheet that is particularly short on description. It has none of the courtesies that manufacturers provide today: no reference design with commentary; no graphs of it in use; no ready-baked formulae to relate output to input. One must analyse the equivalent circuit or, more likely, wire-wrap one into a prototype. One would then, as we used to say, ‘adjust-on-design’ around it until it served its purpose, give tolerances a cursory thought, and bake whatever arbitrary values worked into the production schematic. Long story short: its output range is bipolar but you’d easily miss it, and the 80s were a different age.

    Actually, the DAC works upside-down: it sinks more current from a reference as the number you feed it increases. This current is then converted into a voltage by a separate LF351 op amp that is essentially the output stage of the DAC and inverts the signal. Such things are easy to overlook in these days of large-scale integration. It’s been more than thirty years since you would see a new DAC without the output op-amp forming an inseparable part of the same chip. (That said, the DAC0808 is still in production, complete with entirely different pinouts for the surface-mount and through-hole chip versions: something else I’ve never seen on a production chip, and a landmine that I did side-step.)

    I’m not using DAC0808 in the new design. Apart from the fact it needs a parallel input — a waste of 8 general-purpose pins these days — OSCar’s ‘it’s all one DAC’ trick is not one I’ll be repeating. As I covered in my previous post, it’s ingenious, but the exquisite timing and hackery required to dispatch all the voltages to their proper amplifiers is the principal reason for OSCar’s notoriously poor reliability. If we’re being fair, the final result is also a bit ‘steppy’: the filter and separation knobs feel very granular. The separation control is actually masked in OSCar’s maths so that only the five upper bits do anything, giving it a range of 0–31. One of my rules, succinctly put, is that workarounds with crap side-effects get fixed, and this is in that category.

    The new OSCar instead gets a dual 8-bit DAC, one channel for each oscillator, which sweeps much of the old glue logic away. The control voltages, meanwhile, come out of 8 channels of 11-bit pulse-width modulation, which the microcontroller gives us for free.

    (Why 11 bits? Many reasons. The original OTA chip which forms the voltage-controlled filters and amplifiers, the LM13600, is no longer in production. The LM13700, which is, is similar enough given our constraints that we can use it instead. Indeed, if you’ve got sharp eyes, you’ll see that Dave Spiers’s OSCar uses one as a replacement for one of his LM13600 chips, shown briefly in this video. Its internal circuitry, though, is slightly different, such that I anticipate needing to curve the control voltage to make it sound the same. The fact that those extra three bits might reduce the granularity of the controls is a bonus. 11 bits also gets us a nice carrier frequency: 72MHz/2^11 = 35kHz. Out-of-band for one, so you won’t ever hear it, but it’s also easy to design a control-rate filter that removes it well enough that we won’t hear modulation artifacts either.)

    The PWM outputs are expanded to the correct range (on my second attempt) and smoothed down to the control rate so there’s effectively no ripple at audio frequency. Hence all the hand-wiring: every control voltage needs its own PWM-to-voltage converter. That is four bipolar signals for the VCF/VCA circuits (needing two op-amps). Four monopolar signals (needing only one op-amp) are abused as volume controls. Although, as we’ve covered before, only 7 of these control voltages really get used.

    It doesn’t matter at all about the oscillator signals having the wrong voltage range, as there’s an AC capacitor between the audio output and the filter input on OSCar. As long as it wiggles at the right amplitude, which it does (with care), its absolute voltage is of no concern.

    I’d give you a sound demo, and I’ve been promising these for weeks, but I’m miles away from my audio interface and you’ll get one soon enough.

    The 0–3.3V restriction in the prototype control voltages prevented the filters from working in their most interesting range: the high-Q and the low-frequency regimes. The side-by-side comparison made this glaringly obvious. The OSCar whistles, growls, and makes Speak & Spell noises on demand and mine, er, didn’t. Filters being the most important part of OSCar, that obviously needed fixing for a trade show.

    Nineteen pieces of hand-wiring later, and a lot of glue (as it’s destined for international travel) and we have our bodge. As this was a borderline decision, I chose not to remake the whole board for a couple of reasons: most importantly, I’d have to re-equip for production and that means trusting that every component I need will be in stock, and that neither I nor the stockists will make a mistake. Second, the fear in the back of my mind was that I’d bugger it up somehow and have nothing to show.

    Hand-wiring, then, away from the comfortable, well-equipped lab at home (as I’m dog-sitting), is what I ended up doing.

    Fortunately the planning paid off, because the bodge worked first time. There’ll be tweaks to the range for production, as there will be for every part of this synth, and I must very soon go and make the same mess of my own R&D prototype, but this will do for Superbooth. The real test will be whether it works the second time, when me and my soldering iron are replaced by journalists and their video cameras.