Tuesday, December 21, 2010

OT: New music website thingie..

I've finished a new website for my various musical projects (not really DIY-related). So now instead of pointing people to a myspace, I can just send them to this:

www.dronecloud.org

Sunday, December 12, 2010

Crushed Glass granular sampler/looper/glitcher



This is something I've been working on (on-and-off) since january or febuary of '10. For DIYers, looping is usually restricted to ISD sound recorder chips. They are neat but don't offer a whole lot of flexibility. I wanted totally random access to individual samples for some pseudo-granular drones so I saw what I could do with microcontrollers. Initially I had started learning dsPICs, but later put it aside and went with what I knew, the 8bit AVR.

I'm using SPI RAM which isn't the fastest solution but I just wanted to see if my ideas could be done. Fidelity was secondary. I went with the ATMEGA328 which is the chip with the most amount of internal RAM in DIP format. I didn't want to use the larger 40-pin DIPs.

I wanted to be able to ping-pong the "playback head" in as little time as a 1ms sample window, define start and end loop points, among other things. That meant quite a bit more code that simple record and playback. Keeping it tight, I still manage up to 12KHz sampling on the 8-bit uC. Considering there's a lot of SPI communication with both RAM chips and the DAC, I don't think that's too bad. Stuff like LED updates and potentiometer sampling only happen around 20 times a second. I use an additional uC (atmega88) on a daughter board for the 16 LEDs. It serves as a 4-to-16 decoder.






On the less technical side, sound-wise it is pretty lofi. It doesn't handle complex recordings well. Stuff like full chords, mixed-down songs, things with a lot of harmonic detail and smooth volume dynamics. Some complex things work, most don't. What it does handle well is individual monophonic instruments (or picking single strings on a guitar), some vocals, cicuit bend noises, and it handles electronic beats really well!

The controls are really counter-intuitive, and for this reason I won't be building these for anybody just yet. There are some bugs and limitations that I have not been able to fix in the weeks and months of work. The problem is that I designed this back-to-front which is a really bad way of doing things. I started building a looper then later tacked on features. It's all duck-taped and bandaided together with tricks and hacks in the code. What I should of done is figure out my features first, then design around that. Because I did the reverse, fixing the bugs and limitations have been so difficult that I'll have to start over if I intend to sell these. Personally I can live with these quirks, but I can't help but think others would be confused.

The next one will be much better!




A list of features/controls, some more technical information and a video below.

- Input gain (with red clipping LED)
- Independent Dry and Wet knobs
- Record / Playback toggle switch (with purple rec LED)
- Hard bypass toggle switch (with orange LED)
- Low pass filter
- 16 LED "head" position
- Speed, sets the samplerate
- Start and End realtime sample trimming
- Trim drift/gradual offset
- Confusion knob which does ping pong stuff to the "head"
- Direction knob sets forward or reverse, or glitchy in-between madness!

Main CPU: ATMEGA328 (overclocked to 12mhz at 3.3v)
Secondary CPU: ATMEGA88 (for 16 LEDs only)
ADC: internal 8bit
DAC: external 12bit MCP4921
RAM: two 23k256 ICs
LPF: MAX7403
Programmed in BASCOM




Thanks for reading/watching!