• Welcome to Circuitbenders Forum.

AVR-based hybrid synth

Started by Gordonjcp, October 23, 2010, 03:27:28 PM

Previous topic - Next topic

Gordonjcp

I thought I'd take a moment from enjoying the late October sunshine to post some pictures of a thing I'm working on:

http://www.gjcp.net/media/avrsynth.jpg
http://www.gjcp.net/media/filter.jpg

and some audio, featuring a well-known bubbly synth riff:
http://www.gjcp.net/media/filtertest.ogg

Levels are a bit odd and there's a lot of background noise because I'm using a crappy soundcard.  Reverb is from an Alesis Nanoverb, on the second half of the recording.

It's a simple hybrid synth with an AVR microcontroller providing the envelopes and oscillators, and a Steiner Synthacon-style voltage-controlled filter.  In the pictures above the AVR is on an Arduino board (although I'm not using the bloody awful Arduino IDE) and the filter section is built "dead bug Manhattan-style" on a bit of unetched PCB material.  I haven't constructed the output VCA yet, either - not totally sure it needs one, although the filter in its current configuration can be driven into self-oscillation as you'll hear from the audio clip.

Circuit diagram will be available just as soon as I can be bothered to draw it, code will be available just as soon as I can be bothered putting it on github.
If at first you don't succeed, stick it through a fuzzbox.

Circuitbenders

jayzus, the resonance on that filter is a bit on the brutal side!

Looks promising though. What kind of controls are you planning for the AVR side, if any?
i am not paid to listen to this drivel, you are a terminal fool

Gordonjcp

I should really be using a 22k pot instead of a 100k pot for the resonance.  I'm not sure how I'm going to implement the UI.  The plan is to have the resonance and cutoff manual controls replaced with digital controls so I can save and restore patches entirely on the AVR.  This also raises the possibility of stacking boards for polyphony.
If at first you don't succeed, stick it through a fuzzbox.

Gordonjcp

Annoyingly the serial port interrupt causes a noticable glitch in the audio.  Bugger.  Maybe I need a faster AVR...
If at first you don't succeed, stick it through a fuzzbox.

electoyd

good to see someone using some hybrid, and the dead bug style circuit.  think this has good potential though i would like to hear some crunchier noises, and the rez is pretty fierce, though i'm sure the smaller pot will add better contol.   I'm presuming that is what you were building in the photo of your work.

Gordonjcp

I had a fiddle about with the filter alone based on some things in an article I read about the synth design

http://www.gjcp.net/media/hilow.ogg

This is my Juno feeding into the highpass input and my Xiosynth feeding into the lowpass input.  As I rotate the cutoff it kind of half mixes half filters between them, giving a very cool and unusual effect.
If at first you don't succeed, stick it through a fuzzbox.

electoyd

nice, sounding good! u got any other plans for it?

Gordonjcp

Still working on the software, trying to make it not glitch when it receives serial data.
If at first you don't succeed, stick it through a fuzzbox.

Gordonjcp

Those of you with an Arduino and a PC running Linux might like to play with:

http://www.gjcp.net/blog/2010/dec/06/simple-arduino-based-synth/

The only real reason for the PC running Linux is that the converter software that passes MIDI out the serial port to the Arduino is written for Linux.  If you adapt the Arduino code to run at 31250 baud and hook an optocoupler to it so you can use a "proper" MIDI input it should work just fine.

Follow the instructions in the linked article about DDS sine generation to see how to hook up the PWM output.
If at first you don't succeed, stick it through a fuzzbox.

Gordonjcp

Turns out, it's just about fast enough to do 4-op FM synthesis.  Not *quite* enough using the Arduino libs to get 6-op out of it.
If at first you don't succeed, stick it through a fuzzbox.

Gordonjcp

I need people to test the (early, prototype, *buggy*) voice generation code.  You'll need an Arduino with an Atmega 168 or better, a PC running Linux (for the interface software) and some electronics ability - well, about as much as you need to use an Arduino effectively.

A bit later on you'll need to be able to build a fairly complex filter circuit on Veroboard, if you want to add the proper analogue filter.
If at first you don't succeed, stick it through a fuzzbox.

Circuitbenders

Linux might be the issue there, though can't it be run from a usb stick? What would you recommend linux wise?

i am not paid to listen to this drivel, you are a terminal fool

Gordonjcp

Well, you can run Ubuntu from a live CD although I don't know how that will be for compiling the interface proggy, or running the Arduino IDE.  The alternative would be to test it with the MIDI interface running at 31250 baud and fitting an opto-isolator so it can accept MIDI directly, which is part of the plan but something I wanted to try later rather than sooner ;-)  The other tricky bit is that the voice editing software is unlikely to work in Windows...

To get the speed up enough I've had to ditch a lot of Arduino baggage so the "full spec" version of the software needs to be built outside the Arduino IDE.  I've got a working prototype that *does* work in the IDE.
If at first you don't succeed, stick it through a fuzzbox.

Gordonjcp

Can somebody try this software out?

http://www.spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html

Alternatively, I think MIDI-OX does MIDI-to-Serial conversion on Windows.
If at first you don't succeed, stick it through a fuzzbox.

Circuitbenders

Ok, well i have an arduino duemilanove board but i have to admit that i have no idea what i'm doing with it at the moment. I got it to build a bitcrusher project i found on the net and never got around to it.

You'd probably be better finding someone who knows how this is meant to work, but i'm willing to give anything a go if you let me know what i should be doing  ;)

i am not paid to listen to this drivel, you are a terminal fool