This program is a little interactive demo of 3 "audio experiments" I came up with. (An example of its sounds). My goal here was to create interesting sounds, experiment with FFTs, and test my digital audio code - but more on that later.
First, there is the "Vibrato Lab". A quick overview: Wav files store a sound as a long list of numbers, representing air pressure vs. time. If the computer plays through this list of samples at a faster rate, we hear a higher pitch. For example, playing every other sample results in something sounding an octave higher and twice as fast. If the samples are played back at a varying rate, the pitch of the output varies, making a comical wavy sound. This is how I wrote a vibrato effect.
When testing the vibrato effect, I found that it could sound interesting if the vibrato effect were applied twice - something like vibrato(vibrato(sound)). So, this is what the vibrato lab does. Use the sliders to change the width (how widely the pitch varies) and the frequency of oscillation. Use the checkboxes to enable another vibrato effect. Play with it!
Next, the "CrFeedback". Have you ever played with video feedback, where when you tilt the camera the picture spirals and twists? When experimenting with audio code, I invented an effect that I like to think of this as the audio analog of those spirals. In this case, the song spirals out of control and degenerates into interesting noise. What you hear is like the sum of the song and many slower versions of itself. Play with the parameters - the "right" settings seem to be dependent on the clip you choose.
Finally, "Frequency Sketch". Last semester I took a course in Signals and Systems. Fourier transforms and the like are very cool, and the math was interesting. Most of the course dealt with signals in the context of voltage and current, but I wanted to apply what I had learned to audio. I wrote fourier transform code, and played around with discrete fourier transforms of audio significantly. As the name implies, the FFT is a faster algorithm for this, and so I replaced my fourier code with some FFT code by Don Cross, originally in C. Anyways, in this experiment, you can draw in the frequency domain, and hear the result! I've wanted something like this for a while, and there is still much left to study.
Microsoft Paint is the user interface for Frequency Sketch :). If you draw red pixels or lines on "input.png", you can hear the results. For example, drawing one red dot creates one sine wave, and so you will hear one pitch. The axes in blue show Hz. Note that the highest red pixel is chosen for a given frequency if there are more than one red pixels in a column. So far I've created ambient, flute-like, and eerie siren effects, but this is just the beginning.
All of this was accomplished in a few days - using a library of digital audio code I've been working on for the past few weeks. I created a project in C# called CsWaveAudio; features include saving and opening wave files, synthesizing sounds, FFT, and certain effects. One interesting part of the library is that it stores samples as doubles, between -1.0 and 1.0. This makes it much easier to do calculations - and when writing effects you don't need to consider whether you are in 8-bit or 16-bit. The library also includes code for some "instruments" made from adding sine waves.
Examples of sounds
CsWaveAudio, a C# digital audio library, GPL
And, get all of the code:
Downpoured at Github
More notes: in the vibrato lab, the "tremolo" option creates oscillation in amplitude, not in pitch. Also, try clicking numbers to see what happens. The code for the CrFeedback effect is in the readme file - check out the svn source to modify it. There is a "randomize phases" checkbox in frequency sketch and I'm still not sure why this makes such a difference. Beat frequencies can be created because of the spacing between pixels in the input image. Maybe I should look into interpolation.