Tuesday, August 12, 2014

New synth hacking project: Faster CPU & firmware mod for the Oberheim Matrix 1000

(I already began posting about it in this gearslutz thread, this will only be a recap)

The Oberheim Matrix 1000, while being a proper 6 voices DCO analog synthesizer rack, has a pretty bad MIDI implementation (50Hz update rate, editing some parameters lock up the synth for seconds, some don't even work,...).
Considering MIDI is the only way patches can be edited, this makes it a serious drawback!

Recently, Nordcore, a guy from a german forum started disassembling the firmware ROM and publishing a few patches to make the MIDI better (see this gearslutz post).
My goal was to go further and replace the CPU by a faster and compatible one, so that it leaves room for speed improvements.
  1. Hardware

  2. So, I desoldered the old 6809, soldered a 40pin socket in its place, I also added a socket for the 8Mhz crystal.
    The CPU I now use is a HD63C09P, it is compatible with the 6809, but can run at higher clock speed.
    I clocked it with a 16Mhz crystal, so twice the original speed.
    I had to add a CD4040 on top of the CPU and solder a few wires to divide that clock by 2 for the peripherals (MIDI UART, DCO Timers).

    I also made myself a sort of devkit by replacing the firmware ROM by a RAM chip and a microcontroller to update it, the wiring is really ugly but it works fine so far.

  3. Software

  4. The whole synth engine is updated in an interrupt that is clocked by one of the external 8254  which is running at 50Hz stock.
    My first mod was to make it 4 times faster, process incoming MIDI all those 4 times but update the synth only once in the same period. That way the sound engine still runs the same (envelopes, LFOs, ... stay at stock speed) but MIDI is processed much faster!

    This allowed for much smoother MIDI, yet some parameters like VCA level or VCF envelope amount were still hogging the synth.
    It turns out each time a MIDI message is received, the synth is directly updated, and for some parameters it can take a few hundred milliseconds, so if the MIDI message queue has many pending messages, the wait can rapidly become seconds!
    Nordcore had the following idea: don't update the synth for each MIDI message, but instead raise a flag, and do the update only once per interrupt.
    I implemented it and it works quite fine, editing those parameters isn't perfectly smooth, but one can say it is realtime editing, at last :)

    Last but not least, 50Hz updates means the fastest envelope time is 20 milliseconds, which is quite bad. The CPU being at least twice faster, getting this to 10ms this was perfectly doable.
    I chose to implement it as a turbo mode (enabled by pressing '+' while powering the synth) that doubles the speed of everything (Envelopes, LFOs, ...).
    At first I wanted to have turbo mode always-on while maintaining patch compatibility, but it's not really doable, as there would always be some minor differences in sound due to the odd way the Matrix 1000 handles time based parameters.

Picture of the mod: http://sfx.gligli.free.fr/zik/m1k/m1k_new_cpu.jpg
Quick demo of realtime editing over an arp: http://sfx.gligli.free.fr/zik/m1k/m1k_midi_tweak_demo.mp3
Wiring diagram: http://sfx.gligli.free.fr/zik/m1k/m1k-wiring.pdf
My modified firmware so far: http://sfx.gligli.free.fr/zik/m1k/MATRIX_123_R2.BIN (this is a modified stock firmware, if Oberheim or anyone has a problem with it, I can publish a patch instead)

PS: The firmware was only tested on my own Matrix 1000 so it is alpha quality for now!

21 comments:

  1. Fantastic work, simply amazing! I have to make this mod. Did you use a hardware knobby controller or edited over midi? I have both M1000 and Matrix 6R will this work on the 6R as well?
    Continue the good work, thank you

    ReplyDelete
    Replies
    1. Thanks! I used a Kiwitechnics patch editor to make the demo. For now the mod is only for the Matrix 1000, it could be adpated for the M6/M6R too I think but I don't have those.

      Delete
    2. Dear GliGli,

      I'd be interested to see it running in an M6R

      Delete
  2. Great project, been waiting for this for years! :)

    ReplyDelete
  3. Just wondering how a filter sweep sounds now? It is smooth? :)

    ReplyDelete
    Replies
    1. Yes, pretty smooth, just listen to the demo!

      Delete
    2. Wow. It really does give it new life :)
      So, just to confirm, if I substitute the CPU and the Xtal, add the 4040 and burn the new EPROM, that's all I need to do?
      PS. if you want any help alpha/beta testing, just let me know...

      Delete
  4. I just ordered my HD63C09P cpu, and can't wait to do this mod. I was looking for a wishlist but could not find one. Would interfacing a 2x16 or 2x20 LCD HD44780 (or other) to display the patch names instead of numbers be difficult to do?
    Thanks again and have a great day!

    ReplyDelete
  5. Would it help if someone sent you the rom dump from the 6/6r?

    ReplyDelete
  6. cool!
    Would love it for the 6R as well :)

    ReplyDelete
  7. Wow, just got my Matrix 6R (minty)
    and jeepers-creepers this synth is worthy!
    I really like the filters, oscillators and I started thinking about the envelopes (the sluggish triggering)
    The Matrix 6/R has the option to split the 6 voices onto 6 different MIDI channels, maybe it'll handle notes/messages easier that way (instead of one MIDI channel) -my friend mentioned that MIDI is serial so maybe it won't make a difference, who knows.
    Also another thing I'm gonna try out is the Pedal 2 input which can also act as a trigger input.
    Maybe that's a faster way to trigger the envelopes?

    Another idea is the way the envelopes are, they seem to have sort of a delay built-in.
    Maybe they're thought more of an invert-type-envelope, one that would come after, say the Ramp (which would be the Attack portion).
    Maybe there is a work-around the sloppy timing (I personally don't care about the sloppy timing) with some mixing of the envelopes, gate and ramps/LFOs?
    What is the fastest control-element in the Matrix regarding triggering?

    Anyways,
    I'm using a software editor, works fine but sometimes it's a bit much for the poor CPU so the M6R hangs on the stream of information (sometimes freezes, sometimes takes a long-ass time to update the patch) -especially when you move a software-editor slider too fast.

    Amazing synth, conceived by one of the greatest synth designers in the world. Fashionable-80s-knobless-front-panel-diving/editing + sloppy CPU/MIDI handling (fine for patches that are ready for sequencing) HUGE sound (handles low-end with a lot of headroom to my surprise),
    linking two of these together would be amazing…

    I'm really looking forward to this project development, 'cause the Matrix family is pretty darn neat!

    Over & out for now

    -Geir Helgi

    ReplyDelete
  8. Does this MOD work for the Matrix 6R?

    ReplyDelete
  9. Fantastic stuff, can't wait to try this out. Respect!!! :-)

    ReplyDelete
  10. Ah, just read the Gearslutz thread, will try out the ROM only upgrade instead....

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. I'mm put up my Matrix6 for mod purposes.

    j

    0=0

    ReplyDelete
  13. Amazing work. I have a question. I have an Oberheim Matrix 1000, and I use it with a breath controller/EWI wind instrument. I know how to program it have a nice patch going for it now. However, I also like to use a software MIDI Harmonizer program with it so I can generate 4-note chords triggered by single notes on my EWI. It works flawlessly on my Prophet 08, but on the Matrix 1000 many times the wrong notes are recognized and it plays the wrong chords too. Is this because the MIDI computer is so slow in the Matrix 1000? Will this mod fix that issue? How can I contact you?

    ReplyDelete
  14. Very nice, Stereoping is planning a LARGE CONTROLLER hardware interface

    ReplyDelete
  15. i want to see if this will work with matrix 6R as well.

    ReplyDelete
  16. Can I hope that it work on Matrix6?

    ReplyDelete