3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Analog Sound Synthesis on Your Computer

Step 8Exponential Ramp

Exponential Ramp
Update 7/10- scroll to bottom

Here's a circuit that generates an exponential ramp applied to a pair of noise sources. V1 and V2 generate linear ramps that start at 0 and rise to X volts (left channel) and Y volts (right channel) in periods prd_l and prd_r. B1 and B3 use a formula to convert the linear ramps to exponential ramps with maximum amplitudes of 1V. B2 and B4 generate random noise that is amplitude modulated by the exponential ramps and by parameters amp_l and amp_r (simple level controls).

I have attached an mp3 file generated by this circuit so you can hear what it sounds like. You'll probably have to rename the file to get it to play.

X and Y set the voltage limits of the linear ramps. Eventually both channel's ramps get scaled to 1V, but by setting X and Y you can control the steepness of the exponential ramp. A small number like 1 gives a nearly linear ramp, and a large number like 10 gives a very steep exponential ramp.

The ramp periods are set using parameters prd_l and prd_r. The linear ramp rise time is set to the prd_l or prd_r value minus 5 ms, and the fall time is set to 5 ms. The longish fall-time prevents clicking at the end of each ramp as the amplitude drops back to zero.

out_l and out_r are the products of the time-based random noise voltages, the exponential ramp voltages, and the parameters amp_l and amp_r. Note the right channel random noise value uses a different "seed" than the left channel. That keeps the noise in each channel random and different from the opposite channel. If you use the same seed, at the same time value you'll get the same random value and the sound will end up in the center instead of being perceived as two different sources, one in each channel. This could be an interesting effect to play with...

Update: notice that the waveform goes from 0V to some positive value. It is better for the voltage to swing between equal positive and negative values. I reworked the schematic to do just that but it increased the complexity of the equation that defines the waveform a little. Download the exponential_ramp_noise.asc (remember that the Instructables server will change the name and extension when you save it).







« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
17
Followers
6
Author:Mark Rehorst(Mark Rehorst's Projects Page)
I was electrical engineer for 22+ years, then went back to school and became a dentist.