Research & Learning
Other Class pages
Sound Synthesis On Chips
Sound Synthesis on chips
Feb. 8, 2004
Excerpts from a discussion on the phys comp list about sound synthesis:
Mike Sharon and co. made a very basic synth on a PIC 18F452 in the Fall '03 semester. Here are Mike's notes:
"Last semester for our Lipsynth project in the Advanced Technology class (site coming soon) Daniel Hirschmann, Taku Lippit and I used a PIC18F452 to generate sine waves and crudely play back samples. We decided to go this route precisely because of the problems with sourcing sound chips that Phil described.
"All our code was written in CCS C. We used the PIC18F452 because it had a whopping 32k of RAM.
"Generating waves: We created wave tables containing all the points in our wave and then stepped through the wavetable at a specific frequency depending on the frequency of the wave we wanted to generate.
"Sampling: The hardest part was encoding the sample at the correct bitrate and then converting that into arrays of unsigned integers for use in the C program. Shawn Van Every pointed me in the direction of XD which takes binary data and dumps it into a suitable format. After that, the process was fairly similar to that described above for generating waves.
"It was a serious amount of effort for a relatively simple thing and the code is still fairly crude, but if you feel like diving into experimenting with it, feel free to check out our production blog here."
Jamie Allen chimed in with a few comments:
Jamie also added this "strange link, but the circuit looks like it'd work"
Jame also had some words on sine wave synthesis:
"what's REALLY COOL with digital sine wave synthesis is that the memory requirements can be completely sidestepped using various algorithms, if you're not afraid of the math (and no one should be - it's not that bad). here's a really simple version of what i mean, to give you an idea.
"there's always a trade off between computational efficiency (how fast the algorithm goes, how fast you can spit out samples, how fast you can input
the sound control parameters) and memory requirements (how much of the chip's memory you need to tie up, read through). but a PIC with a program like the above running on it could probably be a pretty sweet little standalone audio generator, without the need for a wave table, and with better control resolution. then you could make a thousand of them and synthesize a bell?!!
"oh and - ANALOG oscillators?!?!! i've been thinking for a while of putting in an order to PAIA for a 9720k Dual VCO
Electronics Kit. it's everything you could want in a moog-style oscillator, it's studio quality (Soma EMS in Chicago is has some of their stuff) and you can mod it once you get it running. 90 bucks, though."
Taku Lippit added a caution on analog synthesis: "analog synth circuitry is a demon. i wouldn't recommend it in the short and intense semester at ITP. Though they do sound great, an plenty of DIY resources on the web if you want to pursue it on a longer term project. (or if you are a freak like Jamie)."
Picking up on Taku's last note, I'd add that it is a lot of work to make your own analog synth, and unless the making of the synth iteself is your goal, you might consider making a controller that produces MIDI, use a MIDI sound module (ITP has several), and using a long MIDI cable to connect them. Unless you are planning to build power supply and audio amplification into your project, you won't be totally standalone, so adding a synth module offers a lot of sound for very little work.
Thanks to Mike Sharon, Jamie Allen, and Taku Lippitt for the notes.