synthbuilding

Just another WordPress.com site

DACs and Arduinos – The TLV5620

leave a comment »

The Arduino has some “analog” lines on it, but these have two disqualifying features for decent synth VCO/VCF control: first, they’re PWM, and second, they’re PWM at a really low carrier frequency (500 Hz or so).  Why is this bad?  Because you need to integrate the PWM signal by low-pass filtering the heck out of it.  The noise on those lines would be ridiculous, and the remaining bandwidth would likely not be enough for envelope or filter control.  It’s possible that I’m wrong on this, but I’m not going take that chance.  (Actually, maybe I’ll fiddle with this… it would be a lot cheaper than buying DACs)

Instead, there’s the handy TLV5620 DAC… 8-bit resolution (meh… could be more), 48kHz sample rate (more than plenty for control), 4 DACs on a chip (nice!), and… ta-da… SPI control!  So you need just one TX line out of the Arduino, a handful of GPIOs as chip-selects and a mux chip if you’re worried about running out of GPIOs, and you can hook up a pile of these to your Arduino.

Here’s the product info and datasheet:

http://focus.ti.com/docs/prod/folders/print/tlv5620.html

And here’s some info on using it with the Arduino, including handy DAC and SPI libraries:

http://wiblocks.luciani.org/src/lib/DAC/classDAC__TLV5620.html

http://wiblocks.luciani.org/docs/app-notes/nb1a-dac.html

Written by Tom

January 3, 2011 at 6:49 am

Posted in Uncategorized

I got a Wavestation! Yay!

leave a comment »

I just purchased a Korg Wavestation EX… actually, it looks like it was an original Wavestation that was upgraded to an EX (the sticker is in the wrong place and is partly peeled off).  But it works fine, which is the important part.  So I’ve added some links related to the WS to my blogroll.

Part of the motivation to get this beast was to have a decent pad machine for some recording projects I’m working on… and part of it was that an Ensoniq Mirage and CZ-1000 are not ideal MIDI controllers.  The WS has velocity sensing AND aftertouch, for starters, as well as an X-Y joystick, along with pitch bend and mod wheels.  Juicy.

Written by Tom

January 3, 2011 at 4:54 am

Posted in Uncategorized

MIDI is up! Well, slightly up.

leave a comment »

With a pretty ugly-looking wiring job, the Arduino is now receiving and interpreting MIDI note on and note off messages.  A bit of background: MIDI NOTE ON and NOTE OFF messages are composed of 3 bytes: the command (NOTE ON or OFF), the note (0 through 127), and the key press or release velocity.  The commands (not just these ones, but all MIDI commands) have the highest bit set, and the parameter bytes all have the highest bit cleared.  This makes it easy to tell whether a byte coming in is a command or a parameter: just look at the MSB.

The first fun part came in realizing that my controller (Casio CZ-1000) sends NOTE ON messages with a velocity of 0, instead of proper NOTE-OFF messages (though apparently many synths do this).  Surprise #2: Instead of sending a full NOTE ON on key release, the CZ-1000 even removes the NOTE ON command, and just sends the note and velocity ( = 0) parameters!  This saves communication time (which is a bit significant at 31kbps) but is stupid for one big reason: it’s very hard for the receiver to tell if a byte got dropped or not.  In practice, this isn’t such a huge deal, because MIDI is quite reliable.  But still, now I either need to implement some kludgy timing mechanism, or just assume that all bits are sent and received correctly.  Bleh.

But… this all means that I can now get on to the business of doing something with those NOTE ON messages.  Exciting!

Written by Tom

December 21, 2010 at 1:32 am

Posted in Uncategorized

Welcome!

leave a comment »

Hi folks!  I’m designing and building a vintage analogue synthesizer module.  It’s polyphonic and MIDI-controlled, and inspired by synths like the Yamaha CS-80, Korg PolySix, Moog Minimoog, Oberheim Multi-Voice System, and the Roland Juno 60.  It’s not intended to duplicate the sounds of any of these, but features design ideas from all of them (as well as others)… inspiration rather than duplication.

A primary goal is that this synth needs to be usable in my home studio.  That means full storage/recall; I don’t want to have to touch anything other than the power switch if I want to duplicate a track.  At the same time, I don’t want to be editing from my computer; there needs to be a human-usable control interface that involves actual knobs and switches, not just a scroll wheel and yes/no keys.

The hardware is mostly analogue.  The signal path is entirely analogue, and I haven’t decided yet whether to make the control path entirely analogue, or to use microprocessor-generated, DAC-outputted signals for control.

Speaking of the microprocessor… I am using an Arduino Mega2560 board as the main controller for MIDI I/O, voice assignment and parameter storage/recall.  I will start with using the Arduino for digital control signals (eg VCO pitch) and then, once things are working, add analogue pitch control.  It’s cumbersome, and I’m not convinced it’ll work, but we’ll see.

More details to come… first step is getting MIDI into the Arduino!

Written by Tom

December 17, 2010 at 7:57 pm

Posted in Uncategorized