COMMENTS: The reaction that causes the whistling effect is the layer-to-layer oscillating burn of the firmly compressed composition with the containment tube acting much like a resonator. 

BE CAREFUL: This is a high energy mixture that can explode with friction/impact. 
PREPARATION (parts by weight):

Potassium perchlorate0.700
Potassium benzoate OR sodium benzoate0.300

Grind the potassium perchlorate ALONE in a mortar & pestle until it is a very fine powder (unless it's that way already). Do the same to the sodium benzoate unless it is already as fine as Talcum powder. Note that the sodium benzoate must be VERY fine, and mixed VERY well with the potassium perchlorate for this mixture to work properly. Pass the mixture through a screen several times to mix the two together. It is important that this formula be mixed very well and be in a fine powered state. Pour the mixture into a Zip-loc plastic baggie, seal it, and shake it back and forth, just to make sure the composition is well mixed. 

Don't ever grind the two ingredients together as the mixture may explode. Never grind, pound, or subject this mixture to friction as it may explode.

Seal off one end of a heavy-walled cardboard tube with Plaster of Paris, hot glue, or some rocket nozzle mix. The tube  length should be 3 times the inside diameter. If the tube is too long, results will be poor. The larger the diameter of the tube, the louder and lower the pitch of the whistle. Experimenting with different tube diameters and lengths will reveal a variety of pitches and tones. Tubes with a 3/8” to 5/8” inside diameter work well. 
Using a wooden dowel the same diameter as the inside of the tube, press small increments of whistle mix into the tube. Press hard to pack it in, but DO NOT bang on the dowel. Fill the tube only 1/2 full (whistles need a lot of empty space in the tube). Stick in a length of Visco Safety Fuse and make sure it touches the powder inside. Push the tube into the ground so it stays put, light the fuse, and get back!