|Will not be used by monsters.
In addition to random generation, tool shops will often have tin whistles.
Watchmen have a 2⁄3 chance of being generated with a tin whistle. Vault guards will always generate with cursed tin whistles, providing a source for the shrill whistling sound a player will hear while escaping them (see the section on messages below).
Applying a tin whistle of any beatitude can wake nearby monsters from sleep, and if your pet is close enough to hear the noise, then for the next five turns it will try to approach you more closely.  Additionally, using a cursed tin whistle in a vault will immediately summon a guard.
The range of a tin whistle is sqrt(xlvl*20), which in practice is half the range of a leather drum. This results in a radius of about 4 squares at XL 1, 16 squares at XL 14, and a maximum of 24 squares at XL 30.
The tin whistle is incredibly easy to identify: In addition to the above means of generation, you can apply any unidentified whistle - if you produce a strange or humming noise, then you have a magic whistle, and your pet appearing next to you will auto-identify that whistle. See the messages below for further reference.
The best use of tin whistles is for attracting pets by applying one repeatedly until they come to you; this can sometimes help you take pets through stairs or out of shops. Once you find a magic whistle, you can safely stash the tin whistle elsewhere. Knights can also apply tin whistles to wake sleeping monsters before attacking them in order to avoid scaring them and violating their code of conduct - for most other situations where you wish to wake monsters, instruments such as bugles are superior choices.
The tin whistle first appears in Hack 1.0, where it is simply known as a whistle.
A tin whistle, or penny whistle, is a simple six-holed woodwind instrument. It is a type of fipple flute, named for the duct that directs air across an opening toward a sharp edge when blown into; the flute plays notes in a single key with a range of two octaves. Most 'tin' whistles are usually made of nickel-plated brass, and can even be made from wood or plastic. The tin whistle is closely associated with Irish traditional music and Celtic music.
The "tin whistle" of NetHack is more of a 'pea' whistle, as indicated by its tile and characteristics: this is a very small type of whistle containing a pea (or similar object) to make its sound discordant. Pea whistles produce a single sound and are generally used to gain people's attention; they are commonly associated with sports referees and British policemen.
- You produce a high whistling sound.
- You applied a non-cursed or blessed tin whistle.
- You produce a shrill whistling sound.
- You applied a cursed tin whistle.
- You feel rushing air tickle your nose.
- You applied a tin whistle while deaf.
- You hear the shrill sound of a guard's whistle.
- You fled from a guard without dropping your carried gold, and they blew the whistle in their inventory.
In variants using an object materials system, the tin whistle can be made of varying materials, and the base item is referred to as a pea whistle.
In UnNetHack, both types of whistle are easier to differentiate, as each will auto-identify upon applying one.
In Hack'EM, applying a pea whistle will auto-identify it, as in UnNetHack.