Shakuhachi (尺八) is a Japanese flute which is end-blown and held vertically like a recorder instead of being held transversely like the familiar Western transverse flute. A recorder player blows into a duct, also called "fipple," and thus has little or no control over the tuned pitch. The shakuhachi player blows as one would blow across the top of an empty bottle, but the opposite edge of the shakuhachi has a sharp edge, allowing the player substantial pitch control. The five finger holes are tuned to a pentatonic scale with no half-tones, but the player can bend each pitch as much as a whole tone or more. It was used by Zen Buddhist Monks in the practice of Suizen (blowing meditation). It is usually made from the root end of a bamboo shoot and is an extremely versatile instrument. Holes can be covered partially (1/3 covered, 1/2, 2/3, etc.) and pitch varied subtly or substantially by changing the blowing angle. Professional players can produce virtually any note they wish from the instrument, and play a wide repertoire of original Zen music, ensemble music with koto and samisen, folk music, jazz, modern music.
The name shakuhachi is derived from "shaku", which is an archaic measure of length roughly equal to 30 centimeters, and "hachi", which means "eight" (tenths of a "shaku"). Thus the standard shakuhachi is 1.8 shaku in length, or 54 centimeters. Other shakuhachi vary in length from about 1.3 shaku up to 3.3 shaku. (The longer the shakuhachi, the lower its tuning.) Although the lengths differ, they are all still referred to generically as "shakuhachi".
The bamboo flute first came to Japan from China via Korea. The shakuhachi proper, however, is quite distinct from its continental ancestors, the result of centuries of isolated evolution in Japan.
During the medieval period, shakuhachi were most notable for their role in the Fuke sect of Zen Buddhist monks, known as komuso, who used the shakuhachi as a spiritual tool. Their songs (called "honkyoku") were paced according to the players' breathing and were considered meditation as much as music.
Travel around Japan was restricted by the shogunate at this time, but the Fuke sect managed to wrangle an exemption from the Shogun, since their spiritual practice required them to move from place to place playing the shakuhachi and begging for alms. They persuaded the Shogun to give them "exclusive rights" to play the instrument! In return, some were required to spy for the shogunate, and the Shogun sent several of his own spies out in the guise of Fuke monks as well. (This was made easier by the baskets that the Fuke wore over their heads, a symbol of their detachment from the world.)
In response to these developments, several particularly difficult honkyoku pieces became well-known as "tests": if you could play them, you were a real Fuke. If you couldn't, you were probably a spy and might very well be killed if you were in unfriendly territory. This no doubt helped drive the Fuke sect to the technical excellence they were renowned for.
In any case, when the Meiji Restoration occurred in 1868, the shogunate was abolished and so was the Fuke sect, in order to help identify and eliminate the shogun's holdouts. The very playing of the shakuhachi was officially forbidden for a few years. Non-Fuke folk traditions did not suffer greatly from this, since the tunes could be played just as easily on another pentatonic instrument. However, the honkyoku repertoire was known exclusively to the Fuke sect and transmitted by repetition and practice, and much of it was lost, along with many important documents.
When the Meiji government did permit the playing of shakuhachi again, it was only as an accompanying instrument to the koto, shamisen, etc. It was not until later that honkyoku were allowed to be played publicly again as solo pieces.