Technical Projects

Here are any of my programming or circuit projects that I think are interesting.

Digitizing the Weeping Demon Wah Pedal


Official Weeping Demon Digitization Homepage
I reverse engineered Ibanez's Weeping Demon wah pedals and made a digital model. The details are discussed in the presentation PDF below. It's a really cool circuit. Rather than using a potentiometer to control the pedal angle, there is a clever optical sensor that won't get dirty and noisy over time. In the digitization, the filter stage, which consists of several op-amps in feedback with each other (a state variable filter) is reduced to a block of multiply/add blocks and a state dependent transfer function is obtained via Mason's gain law. A freqency warped bilinear transform is used to digitize the model. Click the link below for schematics and stuff.

CollideFx - A Ballistic Effects Generator

Official CollideFx Homepage

CollideFx is a real-time audio effects processor that integrates the physics of real objects into the parameter space of the signal chain. Much like in a traditional signal chain, a user can choose a series of effects and offer realtime control to their various parameters. In this work, we introduce a means of creating tree-like signal graphs that dynamically change their routing in response to position changes of the unit generators. The unit generators are easily controllable using the click and drag interface and respond using familiar physics, including conservation of linear and angular momentum and friction. With little difficulty, users can design interesting effects, or alternatively, can fling a unit generator into a cluster of several others to obtain more surprising results, letting the physics engine do the decision making.

Analog Tremolo Unit for the Electric Guitar

This is an analog tremolo unit that I designed. The input signal is modulated with a triangle wave that can be continuously deformed into a rounded square wave. An operational transconductance amplifier is used for the voltage controlled gain stage. I decided to put it inside of a rubber duck, which is way funnier than a little metal box.

Commodore 64 Synthesizer

The Commodore 64's sound chip, the SID 6581, is prized for it's classic 8-bit sound. I am working with Anders ├śland to build a synthesizer using this chip. Unlike Anders, I'm not an expert yet on writing music with it, but I've got the chip all set up and ready to go. I have interfaced it with a Raspberry Pi using 74LS245 logic level shifters. The code has a bunch of functions built in for note bending, vibrato, chord cycling, and there is a basic timing library included, too. It's a work in progress. Before trying to tackle the task of writing music my own music with the chip, I wanted to try something a bit more familiar. I have the first few bars to Passion Pit's Little Secrets attached. You can download the code below. It's not thoroughly tested, but it works. Please report any mistakes to me. I am not responsible for anything that may go wrong when using the code. However, assuming your hardware is hooked up right, the code won't destroy your chip (it only controls logic signals). See the datasheet and the install notes. See the datasheet below for a working schematic.
Software Notes:
  • You must install the wiringPi library on your RPi in order for this to work.
  • The current version is set up to compile outside of an RPi. In order to make this work on your RPi, replace the contents of wiringRPi.h with this statement: #include < wiringPi.h >
  • You can set the pins used in the file raspberryPi.h
  • You should use a level shifter to interface the chip with the RPi. Note that 5V logic could destroy your RPi's GPIO pins and 3.3V logic may not exceed the high threshold on the SID chip.
  • The SID's read capability is not used in my code, because there isn't much that the SID's read functions do that I can't do in the software. For that reason, I left the POTX and POTY pins unconnected.

Source Code (5/30/13) 16kB
SID 6581 Datasheet 2.2MB
Chord Cycling demo 575kB
Little Secrets test 2.6MB

The Agourdian

Seven jack-o-lanterns are equipped with infrared proximity sensors and synchronized flameless candles. In response to a human player moving their hands in an almost percussive manner, the jack-o-lanterns light up and produce tones. The system uses 555 timers as tone generators that are then processed and filtered using analog circuitry. An Arduino microprocessor is used to control lighting and volume envelopes and to receive the signals from the IR sensors.

Spatial and Temporal Analysis of Visualization of Disease Outbreak

This simulator was a winning entry to the University of Pittsburgh's 2012 Undergraduate Data Research Palooza. Using the datasets provided by the Vaccine Modeling Initiative, the simulation shows an image of the United States that progresses through time. Each fatality from a particular disease spawns a particle moving in brownian motion in a location corresponding to the location of the fatality. The year is divided into two parts, summer and winter and the particles are colored with warm and cool colors, respectively. A tally of deaths per year is kept and a graph is created as the simulation runs.

Photo Collage Generator


I was kind of annoyed that all of these websites wanted me to pay for something that should only take a good coder a couple of hours, so I decided to make my own python script for making photo collages. It's super easy to use and it's completely free. Here's an example of what it can do with a bunch of random backgrounds and a picture of a bear.

python collage.py -i <inputfile> -d <directory> -o <outputfile> -t <tilesize> -n <numtiles> -b <blend_amt>

Ex*: python collage.py -i bear.jpg -o ~/Where/The/Little/Pictures/Are

All other options are optional. Tilesize is the number of pixels per tile, numtiles is the number of tiles in the minimum dimension of the image, and blend_amt is the amount of color correction to use (0-1). Enjoy!

collage.py

The Ants!

Since about spring of 2009, I have been crazy about ants. Why not? Ants are absolutely cool. My ant colony simulation was designed in C++ using the SDL graphics library. Two colonies of ants coexist and interact in an environment featuring regularly spawning food and unnavigable obstacles. The ants exhibit brownian motion unless they are reacting to some an external or internal stimuli. These stimuli include the detection of a pheromone trail, the presence of a food supply, or a significant decrease in its own stamina. Upon discovering a food source, an ant will pick up the food and return to the anthill leaving a pheromone trails on this return trip, the strength of which degrades over time. Foraging ants follows trails until the food is reached. After noticing that the food source has been depleted, foraging ants return to the hole destroying pheromone trails along the way. The reproduction rate of the colony is a function of the queen's health, which directly correlates to the colony's surplus of food. The two colonies are in competition for resources and will fight over food or steal from the opposite colonies food surplus. The ants' motion and behavior is based almost entirely on probability. The simulation provides a basic model for swarm intelligence and demonstrates properties of real populations including cyclical population dynamics and carrying capacity.
Computer ants weren't good enough. I got my first ant farm and ordered the ants in the mail. They were western harvester ants. This was a huge disappointment because they barely survived for two days. I fed them a little piece of strawberry and a couple drops of water and they died. I was devastated. The next ant farm was one of those bizarre space ant colonies filled with green gel. They are essentially digging in their own food. I bought western harvesters again. This time they lived for a couple months and they did some serious digging. There are pictures of the ants in the gallery above. I didn't take any after the tunnels were dug, unfortunately. I hope to make an ant farm in the future out of a fish tank and fill it with more space gel. Ants deserve to have that third dimension to dig around in. The other option is to make get two huge pieces of plexiglass and make one the size of a wall. That would be really great, too.