Circuitbenders Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: AVR-based hybrid synth  (Read 13073 times)

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
AVR-based hybrid synth
« on: October 23, 2010, 03:27:28 PM »

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.
« Last Edit: October 23, 2010, 03:29:27 PM by Gordonjcp »
Logged
If at first you don't succeed, stick it through a fuzzbox.

Circuitbenders

  • crustypaul
  • Admin
  • This person is dangerously insane.
  • *****
  • Karma: 1102
  • Offline Offline
  • Posts: 2451
    • Circuitbenders.co.uk
Re: AVR-based hybrid synth
« Reply #1 on: October 23, 2010, 05:47:36 PM »

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?
Logged
i am not paid to listen to this drivel, you are a terminal fool

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
Re: AVR-based hybrid synth
« Reply #2 on: October 23, 2010, 06:56:45 PM »

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.
Logged
If at first you don't succeed, stick it through a fuzzbox.

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
Re: AVR-based hybrid synth
« Reply #3 on: October 25, 2010, 01:30:57 PM »

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

electoyd

  • Kicks like the DADDY!
  • ****
  • Karma: 26
  • Offline Offline
  • Posts: 227
Re: AVR-based hybrid synth
« Reply #4 on: October 25, 2010, 08:18:25 PM »

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.
Logged

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
Re: AVR-based hybrid synth
« Reply #5 on: October 28, 2010, 11:03:46 PM »

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.
Logged
If at first you don't succeed, stick it through a fuzzbox.

electoyd

  • Kicks like the DADDY!
  • ****
  • Karma: 26
  • Offline Offline
  • Posts: 227
Re: AVR-based hybrid synth
« Reply #6 on: November 02, 2010, 07:02:22 PM »

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

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
Re: AVR-based hybrid synth
« Reply #7 on: November 02, 2010, 08:44:17 PM »

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

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
Re: AVR-based hybrid synth
« Reply #8 on: December 07, 2010, 01:23:55 AM »

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.
Logged
If at first you don't succeed, stick it through a fuzzbox.

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
Re: AVR-based hybrid synth
« Reply #9 on: December 07, 2010, 10:38:52 PM »

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.
Logged
If at first you don't succeed, stick it through a fuzzbox.

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
Volunteers needed!
« Reply #10 on: December 09, 2010, 12:19:51 AM »

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.
Logged
If at first you don't succeed, stick it through a fuzzbox.

Circuitbenders

  • crustypaul
  • Admin
  • This person is dangerously insane.
  • *****
  • Karma: 1102
  • Offline Offline
  • Posts: 2451
    • Circuitbenders.co.uk
Re: AVR-based hybrid synth
« Reply #11 on: December 09, 2010, 12:27:43 AM »

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

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

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
Re: AVR-based hybrid synth
« Reply #12 on: December 09, 2010, 07:33:39 AM »

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.
Logged
If at first you don't succeed, stick it through a fuzzbox.

Gordonjcp

  • This person is dangerously insane.
  • *******
  • Karma: 78
  • Offline Offline
  • Posts: 1005
    • http://www.nekosynth.co.uk
Re: AVR-based hybrid synth
« Reply #13 on: December 10, 2010, 01:21:34 PM »

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.
Logged
If at first you don't succeed, stick it through a fuzzbox.

Circuitbenders

  • crustypaul
  • Admin
  • This person is dangerously insane.
  • *****
  • Karma: 1102
  • Offline Offline
  • Posts: 2451
    • Circuitbenders.co.uk
Re: AVR-based hybrid synth
« Reply #14 on: January 11, 2011, 09:25:02 PM »

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  ;)

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