Gagaku (雅楽, literally "elegant music") is a type of Japanese classical music that has been performed at the Imperial court for several centuries. It consists of three primary bodies: native Shintoist religious music and folk songs, saibara, as well as a Korean form (more accurately songs of Korean and Manchurian origin) , komagaku, and a Chinese form (specifically Tang Dynasty), togaku. By the 7th century, the gakuso (a zither) and the gakubiwa (a short-necked lute) had been introduced in Japan from China. Various instruments including these three were the earliest used to play gagaku.
Komagaku and togaku arrived in Japan during the Nara period (710-794), and settled into the basic modern divisions during the Heian period (794-1185). Gagaku performances were played by musicians who belonged to hereditary guilds. During the Kamakura period (1185-1333), military rule was imposed and gagaku was performed in the homes of the aristocracy, but rarely at court. At this time, there were three guilds based in Osaka, Nara and Kyoto.
Because of the Onin War which was a civil war from 1467 to 1477 during the Muromachi period, gagaku in ensemble had been stopped playing in Kyoto for about 100 years. In the Edo era, Tokugawa government re-organized the court style ensemble which is the direct roots of the present one.
After the Meiji Restoration of 1868, musicians from all three guilds came to Tokyo and their descendants make up most of the current Imperial Palace Music Department. By this time, the present ensemble style which consists of three wind instruments i.e. hichiriki, ryuteki, and shō (bamboo mouth organ used to provide harmony) and three percussion instruments: kakko (small drum), shoko (metal percussion), and taiko (drum) or dadaiko (huge drum), supplemented by gakubiwa, gakuso had been established.
Classical dance (called bugaku) also often accompanies gagaku performances. The Tenrikyo religion uses gagaku music as part of its ceremonies.
Contemporary gagaku ensembles, such as Reigakusha, perform contemporary compositions for gagaku instruments. Twentieth century composers such as Tōru Takemitsu have composed works for gagaku ensemble, as well as individual gagaku instruments.
Related to gagaku is theater, which developed in parallel. Noh was developed in the 14th century.
Gagaku, like shomyo, employs the Yo scale, a pentatonic scale with ascending intervals of two, three, two, and two semitones between the five scale tones.Japanese Music, Cross-Cultural Communication: World Music, University of Wisconsin - Green Bay
One of the most important gagaku musicians of the 20th century, Masataro Togi (who served for many years as chief court musician), instructed American composers such as Alan Hovhaness and Richard Teitelbaum in the playing of gagaku instruments.