http://github.com/nf/ardcode
Ardbug is a poor man's Wogglebug. D0 and D1 send random gates, whose maximum length is guided by A0 and A1. The DAC output sends a random voltage on each CLK in, its range is guided by A2 and A3.
If you try it out, please let me know if you have any suggestions that might make it more useful to you.
Cheers!
My first Ardcore patch: Ardbug (random gates and CVs)
- AsceticUnderground
- Common Wiggler
- Posts: 133
- Joined: Sun Nov 25, 2012 9:22 pm
- Location: London
- Contact:
i think your dac output might be faster if you use the routine from the 20 sketches stuff by Darwin Grosse: (check out the template sketch in 20 objects for some notes on this)
void dacOutput(byte v)
{
PORTB = (PORTB & B11100000) | (v >> 3);
PORTD = (PORTD & B00011111) | ((v & B00000111) << 5);
}
also the analog pins tend to have a bit of fluctuation on their readings, so its a good idea to dejitter them when you read them, that way its easier to dial in an 'accurate' min and max value. Again this function is in the template sketch, its obviously not totally necessary as patches work fine without it, it can just be useful to stop small fluctuations creeping in to your values so i tend to feel that its good practice to include it.
Other than that you can get a marginal increase in speed if you dont declare variables in functions so instead of declaring 'lo' and 'hi' in your outputRandomCV function you should declare them globally and then just alter their values in the function.
Nice sketch though man
good to see more people making ardcore stuff
void dacOutput(byte v)
{
PORTB = (PORTB & B11100000) | (v >> 3);
PORTD = (PORTD & B00011111) | ((v & B00000111) << 5);
}
also the analog pins tend to have a bit of fluctuation on their readings, so its a good idea to dejitter them when you read them, that way its easier to dial in an 'accurate' min and max value. Again this function is in the template sketch, its obviously not totally necessary as patches work fine without it, it can just be useful to stop small fluctuations creeping in to your values so i tend to feel that its good practice to include it.
Other than that you can get a marginal increase in speed if you dont declare variables in functions so instead of declaring 'lo' and 'hi' in your outputRandomCV function you should declare them globally and then just alter their values in the function.
Nice sketch though man



- darwingrosse
- Wiggling with Experience
- Posts: 409
- Joined: Tue Apr 06, 2010 9:38 am
- Location: Northfield, MN
You guys are awesome!
[ddg]
Art+Music+Technology podcast:
http://artmusictech.libsyn.com/
Modular Synth Mastery books:
http://20objects.com
Art+Music+Technology podcast:
http://artmusictech.libsyn.com/
Modular Synth Mastery books:
http://20objects.com
Thanks for the feedback everyone! I forgot I had posted this, and just returned now. Glad to know some found it useful! :-)
Hopefully I can release some more sketches soon, too.
Thanks AU! Much appreciated. I will be sure to put some of your suggestions into practice as soon as I can.AsceticUnderground wrote:lots of good advice
Hopefully I can release some more sketches soon, too.

- silversurfer
- Common Wiggler
- Posts: 195
- Joined: Mon Nov 21, 2011 8:21 am
- hangovercat
- domestic party animal
- Posts: 173
- Joined: Mon Apr 09, 2012 5:37 pm
- Location: Toronto, Canada
I had to revive an old thread to say thanks for this sketch – it definitely spends more time in my Ardcore than any other. Here's the latest patch, which I'm having a lot of fun with:
[soundcloud url="https://api.soundcloud.com/tracks/176237421" params="auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" width="100%" height="450" iframe="true" /]
[soundcloud url="https://api.soundcloud.com/tracks/176237421" params="auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" width="100%" height="450" iframe="true" /]
"An idea isn't responsible for the people who believe in it." – Don Marquis
ModularGrid
BandCamp
SoundCloud
ModularGrid
BandCamp
SoundCloud