The beveled “lips” you cut into the squashed end of the straw act as a reed for your instrument.
When you blow into the reed and get it vibrating, you send pulses of compressed air down the straw, causing the air in the tube to start vibrating, too. Affected by the length of the tube, this vibrating air in turn affects the reed’s vibrations. When the reed vibrates at just the right frequency, the air in the straw vibrates powerfully, and you hear a loud, buzzing note, sort of like an oboe.
When you blow through the straw, there is a high pressure in your mouth. As air rushes through the straw, the pressure in the straw drops. The high pressure outside the straw pushes the sides of the reed inward, closing off the flow. The pressure then builds inside the straw and pops the reed open again.
The sound from your straw oboe is an example of a phenomenon called resonance. Every object has a natural frequency, a tendency to vibrate at a particular rate. When you vibrate something at its natural frequency, it resonates, meaning that the vibrations build and grow more and more extreme. Other examples of resonance include a car that shudders at certain speeds, a child swinging higher and higher on a swing, and a glass shattered by the high notes of a soprano.
The straw oboe resonates when the sound waves bouncing back and forth inside make a special pattern called a standing wave. Standing waves occur when waves going one way overlap with waves going the opposite way, creating a set of peaks and valleys that seem to stand still. You can’t see the standing waves in your straw, but you can hear them.
The exact note that you hear when you blow your straw oboe depends on the length of the straw. In a shorter straw, the standing wave inside the straw will be shorter, too, causing the pitch to be higher. In a longer straw, the standing wave will be longer, and the note you hear will be lower.