a→ab

computation, game design, and experimentation


front page | about | archives | code dump | c.s. for mere mortals | tags | rss feed

LaunchPad-based Glitchamin, Take 2

September 24, 2010
tags: code-dump

Hello all.

So, I made a major mistake in the code for my last post. It turns out that ignoring warnings about integers being truncated due to conversions is a bad idea. Basically, my code was reading the sensor pin correctly (INCH_0 = 0), but the CUTTER and CYCLE potentiometer pins (INCH_1 and INCH_2) were outside the range of a signed integer, and therefore the ADC was returning garbage data for those two pins. I swear, sometimes it's the smallest stuff that gets you.

Aside from fixing that major problem, I also sped up the sampling process a tad by telling the ADC to use MCLK, and by only holding for 4 cycles.

These fixes brought the LP-glitchamin right up to par with it's Arduino cousin.

Updated code available:

click here.

Photos available:

1: The full setup, a bit messy.1

2: Closeup on the breadboard side.2

3: The CdS cell voltage divider in all its glory. :P I love CdS cells, they're awesome.3

Soundclip available:

(de)Modulator2 - .mp3, 3:03, a bit painful but it gives you an idea of the range of sounds the instrument is capable of making.

That's about it! Thanks for reading.

Keep tweaking~

EDIT: Featured on 43oh!, again! Check it out here.

blog comments powered by Disqus