| View previous topic :: View next topic |
| Author |
Arduino-based Octature / VC polyphasic LFO. |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Sat Apr 14, 2012 3:09 pm Post subject: Arduino-based Octature / VC polyphasic LFO. |
 |
|
|
Hey wiggle-pals! Two parter here:
1. Anyone wanna help with this project?
2. Assuming it gets put together correctly, any interest in boards?
So I'm working on this Arduino-based Polyphonic ADSR, but I got sidetracked with a slightly easier project -- an Octature LFO. That is to say, eight outputs 45 degrees out of phase. Alternatively, you can flip a switch and enter "polyphasic mode." In this mode, instead of each output being 45 degrees out of phase the amount of phase shift is controlled with a pot or with a voltage source of your choosing.
For example, the 180-degree shifted output is 0 degrees out of phase at knob position 0, 180 degrees out of phase at 12 o'clock, and 360 degrees out of phase at position 10. All the other outputs would be similarly shifted... at position 0 the 45 degree output would be in phase, and at position 10 it'd be like 90 degrees out of phase. Hook that sucker up to a wogglebug and neat stuff happens.
Since the frequency control is just an ADC in, that's also voltage controllable.
The project is in "functional pre-beta" now. If you have an Arduino and a Maxim 528/529 DAC on hand you'd be able to build a working module (since those outputs are buffered). There's a few things I'd like to address:
1. I'd like to move to a 10 bit dac (LTC1660) and a 10 bit sine sample. This will push the overall speed of the oscillator down and decrease aliasing. I stepped up to a 32 bit phase accumulator already. Kinda silly at this point with a 32 bit accumulator and an 8 bit sine table, but that's the rationale.
2. I get aliasing on the outs now with fast frequency changes. This could probably be solved with simple RC filters on the outputs; the outputs will all need to get buffers and their levels fixed anyway. So broadly speaking, "the analog section needs to be designed."
3. I'm obviously not a programmer, so... anything anyone sees that should be done better. Please lemme know. Or better still, I'll get you write access to the repo.
Anyway, if you're interested please take a look at the code:
https://github.com/rmosquito/PolyLmFaO
Parts involved if this went into board / kit land would all be through-hole & DIP packages. One AVR ($2), a crystal, one octal DAC ($5), a couple quad op amps and some passive components.
Interest? Suggestions? Thanks! _________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
raisinbag Super Deluxe Wiggler
Joined: 18 Aug 2011 Last Visit: 21 May 2013
 Posts: 1154
|
Posted: Sat Apr 14, 2012 3:45 pm Post subject: |
 |
|
|
| I'm a bit useless when it comes to developing, as Im out much More basic stuff and more of a builder, but I would love to built one of these. It sounds like a really cool build. |
|
| Back to top |
|
 |
Monobass thonk.co.uk
Joined: 29 May 2009 Last Visit: 21 May 2013
   Posts: 6517 Location: Brighton, UK
|
Posted: Sat Apr 14, 2012 3:55 pm Post subject: |
 |
|
|
| definitely interested, but don't think I have any skills to put on the table! |
|
| Back to top |
|
 |
frequencycentral Kicking the shit out of your speakers
Joined: 31 Dec 2009 Last Visit: 21 May 2013
   Posts: 771 Location: Rick, FC>UK
| |
| Back to top |
|
 |
stahlblau Learning to Wiggle
Joined: 24 Mar 2012 Last Visit: 13 May 2013
 Posts: 3
|
Posted: Sun Apr 15, 2012 9:27 am Post subject: |
 |
|
|
| sounds cool |
|
| Back to top |
|
 |
nathanxl Pickup Truck Full of Forty Minutes
Joined: 22 Jun 2011 Last Visit: 21 May 2013
 Posts: 220
|
Posted: Sun Apr 15, 2012 9:54 am Post subject: |
 |
|
|
| Showing interest in this as it looks cool. I wish I was able to code Arduino. |
|
| Back to top |
|
 |
bonusplays Wiggling with Experience
Joined: 20 May 2009 Last Visit: 21 May 2013
    Posts: 270 Location: PDX, OR, USA
|
Posted: Sun Apr 15, 2012 1:03 pm Post subject: |
 |
|
|
Definite interest! _________________ impeccable surface |
|
| Back to top |
|
 |
surgesg Wiggling with Experience
Joined: 30 Aug 2010 Last Visit: 16 May 2013
  Posts: 292
|
Posted: Sun Apr 15, 2012 1:28 pm Post subject: Re: Arduino-based Octature / VC polyphasic LFO. |
 |
|
|
| reve wrote: |
2. I get aliasing on the outs now with fast frequency changes. This could probably be solved with simple RC filters on the outputs; the outputs will all need to get buffers and their levels fixed anyway. So broadly speaking, "the analog section needs to be designed."
|
Depending on what you mean by "aliasing", you're not going to be able to remove its effects with external filtering. Either a higher SR or lower range of output frequencies. But it depends on what you mean by "fast frequency changes"... _________________ pucktronix shop ::
gregsurges.com ::
new pay-what-you-wish release - 'feld' ::
bitbucket code repository :: twitter |
|
| Back to top |
|
 |
lazerkind Common Wiggler
Joined: 03 May 2010 Last Visit: 21 May 2013
   Posts: 223 Location: mostly Sweden
|
Posted: Sun Apr 15, 2012 2:00 pm Post subject: |
 |
|
|
Nice code, I've seen much worse from people who get paid for being programmers
As greg says, more bits will not decrease your aliasing, you just get finer steps in your output wave. Some steppyness should be possible to remove with a simple lowpass filter though.
I suspect you get som stepping from the slow analog read so try to speed that up by adjusting the prescaler.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208715493/11
(I usually get strange readings below 16)
And the standard digital read/writes are not very fast either so either use port manipulation or some ready made functions.http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1267553811/a ll
Good luck |
|
| Back to top |
|
 |
surgesg Wiggling with Experience
Joined: 30 Aug 2010 Last Visit: 16 May 2013
  Posts: 292
| |
| Back to top |
|
 |
zomgw00t Hey there, babe.
Joined: 27 Sep 2010 Last Visit: 31 Mar 2013
  Posts: 278 Location: Richmond, VA
| |
| Back to top |
|
 |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Sun Apr 15, 2012 11:46 pm Post subject: |
 |
|
|
Here's a couple videos that better illustrate the concept.
First some oscilloscope action. These are outputs 1 (0 degrees) and 8 (315 degrees). As we go vc phase you'll see output 8 go from 0 degrees out of phase to 630 degrees out of phase. In this video you also see the jagged "aliasing" I'm talking about at the end as I crank the phase knob fast. That may go away with adequate filtering, though.
Second, we have the module controlling LEDs with a little narration. Seeing it beats me trying to type it. You don't see the full effect because we're going from 0-5v to light up LEDs instead of -5 to 5v, but you should get the idea.
_________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
lazerkind Common Wiggler
Joined: 03 May 2010 Last Visit: 21 May 2013
   Posts: 223 Location: mostly Sweden
|
Posted: Mon Apr 16, 2012 4:04 am Post subject: |
 |
|
|
Those jaggies on the second sine wave are not from Aliasing.
it looks like it is due to the wrong values for the sine wave are looked up.
I'd suspect a bad wrap around on the phase counters.
(I did something similar on my Arduino osc, but on purpose, it sounds cool ) |
|
| Back to top |
|
 |
JJ Veteran Wiggler
Joined: 08 May 2010 Last Visit: 21 May 2013
   Posts: 610 Location: Turku, Finland, EU
|
Posted: Mon Apr 16, 2012 5:28 am Post subject: |
 |
|
|
Interesting project!! Very cool!
Hmm.. Not to derail the talk, this project should of course focus on the main phase-offsetted octature theme... but maybe different modes could be added (within arduino limits)? I mean eight tempo synced LFOs doing quarternotes, dotted eights etc wouldn't be a bad additional mode, plus whatever we can come up with..
I'm not much of an Arduino programmer myself, even if I have managed to make an functional Auduino with some modifications to the code, but I'm sure that if we all work on this one together, magic happens! _________________ Konekonekone |
|
| Back to top |
|
 |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Fri Apr 20, 2012 1:50 am Post subject: |
 |
|
|
| lazerkind wrote: |
I suspect you get som stepping from the slow analog read so try to speed that up by adjusting the prescaler.
|
Wow, giant thanks to both you and Greg -- it looks like that was the problem. I adjusted the prescaler as per your suggestion (folded in the digitalWriteFast lib at the same time) and the jaggies went away completely when doing the VC phase shift.
It's funny, I kept looking for where the phase accumulator could be glitching and then I was like... oh wait. If the phase was just updating laggardly, what would it look like? Um... this.
Changed the prescaler and all was well.  _________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
skipperdean (~);}
Joined: 05 Nov 2011 Last Visit: 21 May 2013
 Posts: 573 Location: atlanta
|
Posted: Fri Apr 20, 2012 2:11 am Post subject: |
 |
|
|
i really should keep up with the diy thread more. good stuff!!! |
|
| Back to top |
|
 |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Fri Apr 20, 2012 2:16 am Post subject: |
 |
|
|
| JJ wrote: | but maybe different modes could be added (within arduino limits)? I mean eight tempo synced LFOs doing quarternotes, dotted eights etc wouldn't be a bad additional mode, plus whatever we can come up with..
|
Yeah, part of my original design goal was to implement a tempo sync... but I'm thinking that's going to have to wait 'til later. When you say tempo sync'd LFOs, were you thinking LFOs running at different frequencies? The same code base might be useful, as in the DDS schema frequency and phase are sorta two sides of the same coin. I'm thinking it'd require additional multiplication operations, to calculate the tuning words, though.... _________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
bonusplays Wiggling with Experience
Joined: 20 May 2009 Last Visit: 21 May 2013
    Posts: 270 Location: PDX, OR, USA
|
Posted: Fri Apr 20, 2012 2:19 am Post subject: |
 |
|
|
So rad!
Seems like it would be pretty easy to breadboard provided I could get an AVR inclined friend to help. I'd be happy to wait for the PCB though, if that's where you're headed. Want to support this project any way I can.
Might be really cool to have bi-color LEDs on a module to indicate polarity if possible. _________________ impeccable surface |
|
| Back to top |
|
 |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Fri Apr 20, 2012 2:42 am Post subject: |
 |
|
|
| bonusplays wrote: | | Seems like it would be pretty easy to breadboard provided I could get an AVR inclined friend to help. |
Funny -- as you were typing this, I was making a picture in fritzing (see attached).
Note that I'm using a max529 powered off the arduino here, so my waves swing 0-5v. A max528 could be set up to swing +5 to -5 from a modular power supply without external buffers (and without code changes) -- but you'd need a couple voltage regulators.
With a max528 setup, I'm thinking bi-colored LEDs could be added with just a couple current limiting resistors or something.  _________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
raisinbag Super Deluxe Wiggler
Joined: 18 Aug 2011 Last Visit: 21 May 2013
 Posts: 1154
|
Posted: Fri Apr 20, 2012 6:22 am Post subject: |
 |
|
|
| so could the 528 give you possibility of 0-5v and -5v to +5v ???? Would be sweet to flip and switch and have both options. |
|
| Back to top |
|
 |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Mon Apr 23, 2012 12:20 am Post subject: |
 |
|
|
| raisinbag wrote: | | so could the 528 give you possibility of 0-5v and -5v to +5v ???? Would be sweet to flip and switch and have both options. |
Sure. Actually, by switching the DAC's reference voltages you could get it to swing 0-10 just as easily. Is that more useful than 0-5? I've got enough attenuverters and stuff kickin' around that something other than -5 to 5 never even occurred to me, but I think it would literally just entail adding a DPDT switch. _________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
akrylik Veteran Wiggler
Joined: 18 Feb 2012 Last Visit: 21 May 2013
 Posts: 611 Location: Hong Kong and Tokyo
|
Posted: Mon Apr 23, 2012 1:00 am Post subject: |
 |
|
|
| reve wrote: | | raisinbag wrote: | | so could the 528 give you possibility of 0-5v and -5v to +5v ???? Would be sweet to flip and switch and have both options. |
Sure. Actually, by switching the DAC's reference voltages you could get it to swing 0-10 just as easily. Is that more useful than 0-5? I've got enough attenuverters and stuff kickin' around that something other than -5 to 5 never even occurred to me, but I think it would literally just entail adding a DPDT switch. |
I wish all modulator's had this switch, so definitely yes! Sounds like a great project btw. _________________ Disclaimer: If it seems like I know what I am talking about its because I got lucky. I'm a noob in this electronics DIY stuff but I'm working hard to fix that.  |
|
| Back to top |
|
 |
raisinbag Super Deluxe Wiggler
Joined: 18 Aug 2011 Last Visit: 21 May 2013
 Posts: 1154
|
Posted: Mon Apr 23, 2012 6:29 am Post subject: |
 |
|
|
| Ya for sure. Maybe even a second switch to take signal before or after a voltage divider so you could switch between 0-5 and 0-10. Have you cake and eat it too!!!! |
|
| Back to top |
|
 |
samuraipizzacat29 adadadadadadadsr
Joined: 27 Jun 2011 Last Visit: 20 May 2013
 Posts: 836 Location: Allentown, PA, USA
| |
| Back to top |
|
 |
cleaninglady Veteran Wiggler
Joined: 24 Aug 2009 Last Visit: 21 May 2013
   Posts: 687 Location: creeping up behind you
| |
| Back to top |
|
 |
limpmeat Veteran Wiggler
Joined: 08 Feb 2011 Last Visit: 21 May 2013
  Posts: 602 Location: Melbourne
|
Posted: Tue Apr 24, 2012 1:24 am Post subject: |
 |
|
|
| mega interest. |
|
| Back to top |
|
 |
raisinbag Super Deluxe Wiggler
Joined: 18 Aug 2011 Last Visit: 21 May 2013
 Posts: 1154
|
Posted: Thu Apr 26, 2012 5:33 pm Post subject: |
 |
|
|
| So when pcb is ready will it need an actual arduino as part of each module? OR one arduino to program a chip for each module? |
|
| Back to top |
|
 |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Fri Apr 27, 2012 2:38 am Post subject: |
 |
|
|
| raisinbag wrote: | | So when pcb is ready will it need an actual arduino as part of each module? OR one arduino to program a chip for each module? |
Oh heavens no my friend. I am the epitome of cheap-ass DIYer. You'd just need a programmed ATMega, which I figured I'd offer optionally with the board. Or you could use an Arduino with a socket to program your own chip if you wanna save a couple quarters.
It may also make sense to bundle the DAC since those don't seem to be easy to buy in single units from the usual suspects? You tell me, eh?
I have zero idea what the board cost would be at this point, but I suspect this project would be on the cheap side of things. Again, we're pretty much talking about the AVR chip, the DAC, a crystal, a couple resistor networks, a couple caps.. maybe a couple more resistors and that's about it.
I'm having some issues with the buffering. If it simply doesn't work the way I thought it'd work. If so, I may need some opamps, which would increase the complexity of the build, but not so much the cost.
(BTW I got TOTALLY sidetracked these last weeks creating a digital (audio) oscillator module using a synthesis method that (AFAIK!) has yet to be implemented in the modular world... certainly not in any 1V/Oct trackable way. Total tease, I know. Waiting for some parts and then I'll post a video and some sound clips. It should be truly brutal.) _________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Fri Apr 27, 2012 2:57 am Post subject: |
 |
|
|
Actually, let me follow that up with another question since this is really the only thing left:
What's a useful time range for you guys? Right now it ranges from about ten seconds to 2hz. I could probably add a switch to allow 2-20hz as well? Or 2-60hz? I wouldn't use it but maybe you might.  _________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
lazerkind Common Wiggler
Joined: 03 May 2010 Last Visit: 21 May 2013
   Posts: 223 Location: mostly Sweden
|
Posted: Fri Apr 27, 2012 4:20 am Post subject: |
 |
|
|
Nice progress reve,
What are the buffer issues you mentioned? |
|
| Back to top |
|
 |
mono-poly Le Cheff
Joined: 21 Nov 2008 Last Visit: 17 May 2013
    Posts: 5330 Location: Rotterdam, Netherlands
|
Posted: Fri Apr 27, 2012 4:29 am Post subject: |
 |
|
|
Interesting! _________________ WTB Buchla 100 modules
i don't need the gear, the gear needs me
http://www.mono-poly.nl |
|
| Back to top |
|
 |
raisinbag Super Deluxe Wiggler
Joined: 18 Aug 2011 Last Visit: 21 May 2013
 Posts: 1154
|
Posted: Fri Apr 27, 2012 7:36 am Post subject: |
 |
|
|
Cheap ass sounds good! Did that come out right?
Well that sounds great, if you were to supply funky hard to find parts that sounds good. I may try to make the chip myself and get an arduino, I would like to learn how to do that, I have avoided it so far.
As for time scale, I say the more options the better. Are you saying a ten second period for 1 full wave? That is so cool. It would
Be great to have option of a ten second all the way to slight fm capability. Am I asking for too much?
Your digital thing sound interesting! |
|
| Back to top |
|
 |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Mon Apr 30, 2012 1:54 am Post subject: |
 |
|
|
| raisinbag wrote: | | As for time scale, I say the more options the better. Are you saying a ten second period for 1 full wave? |
Yeah.... but now we're talking longer. Like you said, options.
Anyway, after actually playing with it in a musical setting I think I'm locked on scale:
Slower goes from ~ 0.008 hz (i.e. like two minutes) to ~2 hz.
Faster goes from ~2 hz to ~60hz -- taking you up into FMs-ville.
I should note that on that super slow setting, you can pretty clearly hear the stepping when used with a VCO. But it's really only noticeable if you're sweeping over more than three octaves or so, only in the higher octave registers, and really only at the ends of the sine wave.
At this point I plan to add a triangle toggle as well.
Lzerkind: The buffer issues are... solved. As it turns out, my putting in a comment that says "set all outputs to fully buffered" does not mean that the hex code that follows makes it so.
The one thing I have to do yet is actually test my (spice verified) input mixer & protection circuitry. A little out of the norm to me since it has to accept +/-5v and 10v signals but only swing from 0-5v with 2.5v being a virtual ground... _________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
rowman birds are dinosaurs
Joined: 18 Jan 2012 Last Visit: 18 May 2013
 Posts: 569 Location: Melbourne
|
Posted: Sat Jun 16, 2012 12:36 am Post subject: |
 |
|
|
| Hey how is this going? |
|
| Back to top |
|
 |
HueMonContact VoltageCtrlR
Joined: 13 Aug 2010 Last Visit: 21 May 2013
  Posts: 1587 Location: Los Angeles / Arizona
| |
| Back to top |
|
 |
raisinbag Super Deluxe Wiggler
Joined: 18 Aug 2011 Last Visit: 21 May 2013
 Posts: 1154
|
Posted: Sat Jun 16, 2012 11:28 am Post subject: |
 |
|
|
Ya I have been silently obsessing about it as well. But happy it hasn't been released yet as I have blowen the budget on so many other cool builds and want to build like a hundred of these.
One question, what is the main ic? Is it a atmega328? |
|
| Back to top |
|
 |
reve Common Wiggler
Joined: 04 Feb 2011 Last Visit: 16 Aug 2012
  Posts: 69 Location: San Diego
|
Posted: Mon Jun 18, 2012 7:19 am Post subject: |
 |
|
|
Guys, I'm sorry. I totally got sidetracked by my oscillator project. You know how it is. The stuff that actually generates neat noises sucks you in... and the utility modules suffer silently neglected at the back of the workbench.
(BTW, the oscillator is at http://www.muffwiggler.com/forum/viewtopic.php?t=61852 if I can distract you with that as well...)
I need to redraw & verify the schematics, layout the boards and do prototypes. Unless someone else wants to layout the PCBs? I'm kind of blundering around in the dark here so if someone who has a bit more experience in such matters would be willing to lend a hand, that'd be super-cool.
| Quote: | | One question, what is the main ic? Is it a atmega328? |
Yeppers! _________________ -- reve mosquito
SDIY Synthpop: http://photovoltaik.bandcamp.com |
|
| Back to top |
|
 |
lazerkind Common Wiggler
Joined: 03 May 2010 Last Visit: 21 May 2013
   Posts: 223 Location: mostly Sweden
|
Posted: Mon Jun 18, 2012 10:17 am Post subject: |
 |
|
|
My opinion is that you learn a lot when blundering around in the dark,
There is some learning curve for doing your own PCB's but after that it just gets easier. at least that is my experience so far with my PCB's.
I'd recommend that you download the free eagle version and get started with that, and if/when you hit a snag, just ask and I'm sure there are lot's of people here who can answer and give hints. |
|
| Back to top |
|
 |
fletch Common Wiggler
Joined: 05 Jul 2011 Last Visit: 21 May 2013
 Posts: 109 Location: Winnipeg, MB
| |
| Back to top |
|
 |
|