We've had a couple of threads on the subject. I like pictures, so, there you go: a thousand words in each one!
The first idea: to use a trumpet. You can model the piston and the moving mass of air as a spring-mass system.
Helmholtz resonator: yeah, that's a piston!
The frequency "

" for a trumpet length "L" and a speed sound of "a" is:
I've used it (rather naively, I imagine) for a couple of bike tunings. Notice that the frequency

you have to use is the one of the piston, same goes for the volume V and the area A.
That's as simple as you can start: saw the damn exhaust to the lenght given by the equation.
Now, if you want to build a better chamber, take a look at this three pictures that show what happens when air goes through the exhaust:
You need a program (there are several available) for the design of an expansion chamber. The one I've used (for bikes) is no longer on line. In a few minutes (lunch time!) I'll post a picture of how it works.