A longer pipe works on the same principle as a horn- it takes more volume of air (or gasses) to make it louder- bottom line, a longer pipe is quieter.
Here's one on e-bay
motorized gas engine bike extension muffler chrome new - eBay (item 260606266915 end time Jun-18-10 16:58:36 PDT)
I have one, I had to cut to fit, and extended with can alluminum- it's been improved since this picture, with two hose clamps on each end of aluminum extension (24 ounce cans are really long!) and wrapped with chrome tape to seal the seam- it really works pretty good- much quieter now.