Gagaku in Medieval Japanese Religion

: Contrary to the widespread assumption in the study of Japanese religions that Kagura is historically the main genre of performing arts at Shint¯o festivals, something dating back to the beginning of Japanese history, in this article I focus instead on Gagaku (and its Bugaku dance repertory) as a central component of rituals, ceremonies, and festivals not only at the imperial court but also and especially at many temples and shrines across the country. While Gagaku and Bugaku were deeply rooted in the Kansai area, with guilds of hereditary professional musicians afﬁliated with, respectively, the imperial court in Kyoto, Kasuga-K¯ofukuji in Nara, and Shitenn¯oji in Osaka, and with the most lavish performances being held at temples and shrines in the region, those art forms had already spread to the provinces by the end of the Heian period. This article investigates some of the connections between religious ideas, rituals, and musical performances in relation to Kuroda Toshio’s concept of the exo-esoteric system ( kenmitsu taisei ) and the creative use of Buddhist canonical sources that such connections originated.


Introduction
One of the basic assumptions in the study of Japanese religions is that Kagura 神 楽 is the main genre of performing arts at Shintō festivals, something deeply related to the ethos of Japanese culture; another assumption is that Kagura is an ancient art dating back to the beginning of Japanese history and is rooted in the ancient myth of Amaterasu and the heavenly cave. However, contrary to these widespread ideas, this understanding is essentially a modern construct, which brought together a variety of different forms of performing arts under the category of Kagura. In premodern times, and especially in the middle ages-the time-frame of this article-the term kagura normally referred to either special performances at court and some Shintō shrines, known as Mikagura 御神楽, or to the divine origin of performing arts in general. Other types of popular performances included Sangaku 参楽, Sarugaku 猿楽, Dengaku 田楽, and a number of dances (mai 舞), many of which had strong regional aspects. At the same time, Gagaku 雅楽, and especially its Bugaku 舞楽 dance repertory-because of their history, metaphysics, cultural prestige, and ceremonial outlook-were central components of rituals, ceremonies, and festivals not only at the imperial court (as per the standard understanding) but also at many temples and shrines across the realm, an aspect that is often neglected in scholarship on medieval Japanese religion. While Gagaku and Bugaku were deeply rooted in the Kansai area, with guilds of hereditary professional musicians affiliated with, respectively, the imperial court in Kyoto, Kasuga-Kōfukuji 春日・興福寺 in Nara, and Shitennōji 四天王寺 in Osaka, and with the most lavish performances being held at temples and shrines in the region, those art forms had already spread to the provinces by the end of the Heian period. It is also interesting to note that the largest ceremonies and festivals at temples involved not only Gagaku instrumental music and dances but also various genres of performing arts.
Gagaku originates in the Tang court's ceremonial music for imperial rituals; it was transmitted to Japan between the seventh and the ninth centuries. In China there was a Typically, Kagura can also be divided into two general types: a ritual involving communication with the gods, and a performance related to some myth or legend about the gods. A third factor, which sometimes blurs those two categories, is that Kagura performances were created, modified, and circulated by yamabushi from around the sixteenth century and more widely during the Edo period. Yamabushi gave religious meaning to what may have been just performances or added a performing aspect to matters related to local gods. Additionally, Suzuki Masataka 鈴木正崇 (Suzuki 2001, p. 4 and passim) and other scholars have emphasized the role of Kagura as performances related to the pacification of the dead and dangerous spirits.
The term kagura as the name of a genre performed at court is first mentioned in 885; this is normally understood as a reference to what came to be known as Mikagura. The first performance of Mikagura at the Naishidokoro 内侍所 hall of the imperial palace is reported in 1005 on behalf of the precious mirror, one of the three imperial regalia that had been damaged repeatedly; scholars see this Mikagura as a ritual for the pacification and strengthening of the spirit of the emperor (chinkonsai or tama-shizume ritual 鎮魂祭). This Mikagura seems to have been related to earlier ritual performances at the Kamo rinjisai 加 茂臨時祭 ceremony in 889 and the Iwashimizu rinjisai 岩清水臨時祭 in 942 (Inoue 2016, esp. pp. 15-18;Matsumae 1974).
On the other hand, on the folk side, Suzuki Masataka ( Suzuki 2018) argues that presentday Kagura originated in the Kumano area as a transformation of the Shugendō ritual known as yudate no shinji 湯立神事 (lit. "divine ritual of hot water"), which later became yudate kagura. Yamabushi also spread legends about Kumano and its gods to various regions of Japan; these legends became sources and prototypes for other local Kagura performances. In Kumano, rituals involving hot water were also related to fire rituals; in both cases, rituals were accompanied by dances such as the Yamato mai 大和舞, dengaku mai 田楽舞, and taue mai 田植舞 (Suzuki 2018, p. 21). Ritual control over fire (and hot water) was associated with supernatural powers attributed to mountain ascetics, known as hijiri (this word, normally written 聖, can be traced back to a term meaning "masters of fire" or hijiri 火治り) (Suzuki 2018, p. 25). It is not clear when yudate rituals began; Suzuki mentions an iron caldron used to boil water that was donated to the Kumano Hongū 熊野本宮 shrine by Minamoto no Yoritomo 源頼朝 in 1198 as the oldest extant of such objects (Suzuki 2018, p. 17). It is possible that if Yoritomo decided to donate such an object to Kumano, the ritual was already in existence and also quite important. Based on the Kumano mōde nikki 熊野詣日記 by the Shōgoin 聖護院 ascetic Jitsui 実意 (1386-1459), Suzuki has shown that some form of Kagura (called, confusingly, mikagura) was performed at Kumano in 1427 (Suzuki 2018, pp. 26-27). From the fact that it was performed by a hayashi 囃子 ensemble (flute and percussion instruments), this was not the Mikagura held at court and at a few important shrines (which involved flutes, hichiriki 篳篥, wagon 和琴 zither, and included singing as one of its main elements). Furthermore, Suzuki, following Yamamoto Hiroko 山本ひろ子, also finds the origin of daikagura 大神楽 (also 太神楽, 代神楽) from the Oku-Mikawa region (present-day Aichi prefecture) in Kumano cults involved in rebirth into Amida's Pure Land (Yamamoto 1993, pp. 95-224). The oldest record of a daikagura dates from 1581 (Suzuki 2018, pp. 29-30). In the Edo period, daikagura was performed as a ritual for community revival following famines, natural disasters, and pestilence (Suzuki 2018, p. 28). In any case, these types of Kagura seem to be relatively late creations in the medieval period, and as they were directly associated with Kumano, its cults, and its groups of yamabushi, they were not typical or traditional performing arts dating to antiquity. 1 A further indication of the limited diffusion of Kagura until the Edo period can be found in lists of professional and artists' guilds from the Kamakura period on, in which Kagura performers are typically not mentioned: for instance, Shin sarugakuki 新猿楽記 (mideleventh century), by Fujiwara no Akihira 藤原明衡 (989?-1066), and Futsū shōdōshū 普通 唱導集, compiled in 1297 by an anonymous author, list a number of performers and genres, but kagura professionals are not mentioned. In the Shin sarugakuki, artists include both Gagaku musicians and performers of Dengaku,Sangaku,and Sarugaku (Shin sarugakuki,pp. 134,151); in the Futsū shōdōshū, we find tsuzumi-uchi 鼓打, Dengaku, and Sarugaku (quoted in Murayama 1976, pp. 196, 211). An exception is Kojidan 古事談, a collection of stories and historical anecdotes dating to the early thirteenth century, which mentions Kagura among the arts of the aristocrats (teitaku shodō 亭宅諸道, pp. 542-45), but in that context, the term clearly refers to court Mikagura. Much later, the mid-Edo period Jinrin kinmō zui 人倫訓蒙図彙 lists several kinds of performers; among them, based on what we would consider today as part of Kagura as a broad genre, we only find daikagura, shishi mai, Ebisu mai, and Sumiyoshi odori. 2 It is not clear why certain forms of popular performances came to be called Kagura, a term that as we have seen normally referred to either Mikagura at court or to mythological accounts of the origin of performing arts in general. A possible clue might be found in the etymology of sarugaku as derived from kagura, as proposed by Zeami Motokiyo 世阿弥元 清 (1363-1443). Zeami, a talented performer of Sarugaku and composer of Noh 能 dramas, wanted to ennoble his art form by establishing connections with the mythology of the gods. He did that by manipulating the Chinese characters of sarugaku, his family art. He begins by changing the standard 猿楽 to the quasi-synonym 申楽, in which the first character 猿 is replaced by 申, also read saru and meaning "monkey" but normally employed to refer to the zodiac sign and not the actual animal; from there, Zeami adds the radical 示 to it to obtain 神楽 (kagura); he attributes this transformation to Shōtoku Taishi (Fūshi kaden 風 姿花伝, pp. 14, 38-40; also quoted in Hayashiya (1950), p. 361). However, since Zeami's contemporary sources seldom (if ever) mention Kagura as a popular form of performing art, we can assume that he was referring to the mythological discourse about performing arts in general (and especially his own) as originating in the age of the gods as told in the ancient myths.

Performing Arts and the Exo-Esoteric System (kenmitsu taisei)
If Kagura did not exist for most of the medieval period, what were the most common forms of performing arts? Kuroda Toshio 黒田俊雄 (1926-1991, in a little-known text he wrote toward the end of his life (Kuroda 1990), highlighted both the variety of performing arts that developed from the mid-Heian until the Nanbokuchō period (tenth to fourteenth centuries) and their diffusion among broad sectors of society, from the court aristocracy to regional centers in the provinces. Crucially, Kuroda explains the diversification and diffusion of art forms involving musical expressions as being based on the same social processes that resulted in the formation of what he called the exo-esoteric regime (kenmitsu taisei 顕密体制) to refer to the distinctive system of religion, knowledge, and political organization that played a hegemonic role throughout medieval Japan.
Kuroda traces the transformation of Gagaku at the imperial court from official ceremonial music controlled by a governmental unit (the Gagakuryō or Utamai no tsukasa 雅楽寮, lit. "Bureau of music and dance") celebrating state power, to an organization of professional guilds of hereditary musicians and the gradual emptying of government offices' prerogatives. This shift began from around the mid-tenth century with the decline of the Ritsuryō 律令 regime. Musicians ranged from high-rank aristocratic amateurs (also including emperors), known as tenshō 殿上 (or tōshō 堂上) gakunin 楽人 (lit. "musicians [who can] ascend to the Palace") to lower-rank aristocratic professionals without direct access to the imperial palace (jige gakunin 地下楽人, lit. "musicians [who play] on the ground below [the Palace]"). They continued to perform at official state ceremonies, but also, and increasingly, for private events, often for entertainment purposes; 3 especially important were the "august performing divertissements" (gyoyū 御遊), in which emperors and elite aristocrats played, sometimes together with professional, low-ranking musicians, in semi-public events at court. 4 Additionally, Gagaku was performed at important court ceremonies, such as the misaie 御斎会 and daijōe 大嘗会 (now called Daijōsai 大嘗祭), and for entertainment purposes, such as in the occasion of sumō 相撲, archery, and horse tournaments (Kamisangō 1970, pp. 232-34). The same music culture of the imperial court also spread to the large temple-shrines complexes, which were becoming hubs of professional guilds of various arts and crafts; at many temples, the Buddhist chants (shōmyō 声明) were becoming increasingly complex and differentiated. Kuroda claims that musical developments after the twelfth century were not simply due to the decline in interest for cultural forms from the Asian mainland as a consequence of the dissolution of the Ritsuryō regime, but were also a result of growth and innovations that took place in medieval Japan.
According to Kuroda, these developments were triggered by the growing importance of regional elites, itself a consequence of the restructuring of the manorial (shōen 庄園) system that followed the demise of the Ritsuryō institutional organization. The local gentry was increasingly in contact with the capital and the court, and several professional figures (including performers and musicians) benefitted from this circulation, which in turn resulted in the creation and diffusion of new art forms. A genre called imayō 今様 (songs accompanied by Gagaku instruments) is well known; it emerged around the same time in which kōshiki 講式 (lit. "lecture ceremonies") were created at Buddhist temples (some of which were also performed with the accompaniment of Gagaku instruments). Residents of Kyoto (aristocrats and commoners alike) and of other large urban centers also enjoyed Furyū, Dengaku, Sangaku, Sarugaku, and other performing arts. Performers addressing broadly religious themes (diviners, spell chanters, sutra reciters, etc.) also proliferated. Importantly, Kuroda notes that from around the early thirteenth century, literary texts focusing on famous performers (meishu 名手) also developed. In this context, one should also add that, not mentioned by Kuroda, notable musical instruments were also celebrated and became the protagonists of stories dedicated to them. Kuroda sees in these texts a growing interest at court for music-not only Gagaku and other traditional forms associated with the aristocracy, but also new genres played by commoners. Kuroda also suggests that this new importance of music was probably a compensation for the decline of the thirty-one-syllable poem (waka 和歌) artistry that happened around the time (Kuroda 1990, pp. 270-72).
All this was accompanied by the emergence of a new discourse on artistic appreciation, which focused not only on waka and the literary classics, but also on performing arts in general and Gagaku music in particular. Kuroda mentions sources such as the already mentioned Shin sarugakuki and Kojidan; works by Miyoshi no Tameyasu 三善為康 (1049-1139), which were later combined in the Nichūreki 二中歴 (thirteenth century); and, further, Jikkinshō 十訓抄, Kokon chomonjū 古今著聞集, and especially the Ryōjin hishō 梁塵秘抄 and its appendix, the "Kudenshū" 口伝集, edited by the retired emperor Go-Shirakawa 後白 河院 (1127-1192) and members of his artistic entourage (Kuroda 1990, pp. 270-72). In the realm of kenmitsu religious institutions, this new interest for music appreciation resulted in the development of Buddhist ceremonies with Bugaku (bugaku hōyō 舞楽法要) and of kōshiki with Gagaku instrumental accompaniment (kangen kōshiki 管絃講式), but also on harsh critiques against newly emerging religious practices involving musical expression. As is well known, continuous nenbutsu chanting (senju nenbutsu 専修念仏) and danced nenbutsu (odori nenbutsu 踊り念仏) by Ippen 一遍 (1234-1289) and his followers were called "depressing sound" (aion 哀音) and the "sound of a failed state" or "sound that brings the country to catastrophe" (bōkokuon 亡国音) (Kuroda 1990, p. 273).
The time in which music performances of various kinds increased and aesthetic interest in them developed was also when, at the imperial court, Gagaku became virtually independent of the Gagakuryō (Bureau of music and dance), the official agency dedicated to music performances at court under the provisions of the Ritsuryō code, and musicians affiliated with it created family-based hereditary guilds transmitting the art of the respective instruments and dances. In a parallel move, aristocrat amateurs and professional musicians began to perform together in both official ("public") and private events at court.
In terms of intellectual history, the increased importance of Gagaku as a constellation of genres and performances also resulted in philosophical discussions about the role of music in Buddhism, and especially its role in soteriology. Japanese intellectuals were aware that the Buddhist precepts do not encourage music and dance performances and allow them only as fundraising events for lay donors and as intangible offerings at Buddhist ceremonies. At the same time, references to some kind of celestial music permeate canonical representations of the heavenly realms and the Pure Lands. Furthermore, a long and venerable tradition of East Asian statecraft based on Confucian ideals sees music as the foundation of the system of rites, and thus of social and cosmic harmony. Within this context, Japanese intellectuals and musicians began to transpose established ideas about the potential salvific role of literature-what is known as discussions on "foolish words and ornate phrases" (kyōgen kigo 狂言奇語)-to music, and to Gagaku in particular. As a result, writings about "instrumental music as an activity leading to rebirth in a Pure Land" (kangen moōjō no waza to nareri 管絃も往生の業となれり) and Gagaku as a Buddhist ritual activity began to proliferate. 5

Gagaku and Buddhism
In premodern Japan, and especially in the medieval period (twelfth to sixteenth centuries), Gagaku was a full-fledged component of the correlative episteme of Esoteric Buddhism, within which it largely operated. In fact, Gagaku transposed that episteme in musical terms. Just to make a few examples, the instruments are classified according to an ancient Chinese list of natural materials (hachiin 八音, respectively, metal, stone, earth, wood, silk, bamboo, gourd, and leather-not all of which were used in Japan), and many of them bear connections with supernatural animals of the Chinese and Buddhist mythologies (such as the dragon for the ryūteki 龍笛 flute, the phoenix for the shō 笙 mouth organ, the kalavin . ka bird for the hichiriki 篳篥 oboe, and the turtle for the koto 琴 zither); and the repertory is divided according to principles related to the Yin-Yang cosmology.
Pretty much like the entire cultural system of premodern Japan, both the music theory and the repertory of Gagaku were also a combination of Chinese, Korean, Indian, and Japanese elements. Specifically, Gagaku was based on ancient Confucian theories of a correct, righteous, and noble kind of music that laid at the basis of the system of rites and contributed to securing order in the various registers of the universe (individual, social, cosmic). On this background, the Japanese developed a Buddhist metaphysics of music based on disparate elements: a particular scripture, the Sutra of the Questions of Druma, King of the Kim . nara; scriptural representations of music in the Pure Lands and the abodes of the Indian divinities; and Esoteric Buddhist speculations on the cosmic sound underpinning the pansemiotic sermons of the cosmic Buddha (hosshin seppō 法身説法). 6 Japanese autochthonous elements can be identified in parts of the repertory (Mikagura in particular, but also azuma asobi 東遊 and other "regional" dances, and rōei 朗詠 and saibara 催馬楽 songs), in the selection of the instruments (the Japanese were never really fond of the multiple metal gongs and bells loved by the Chinese), and the composition of the repertory. The fact that the same standard repertory was used at sacred ceremonies and festive celebrations at the imperial court and at Buddhist rituals at temples was also a Japanese innovation. 7 However, it is in the theory of the musical modes that the Esoteric correlative episteme operated at full gear. From the late Heian period onward, all compositions of the Gagaku and Bugaku repertory derived from Tang China (which also included pieces originally from India, central Asia, and southeast Asia), known as Tōgaku 唐楽 (for kangen or purely instrumental pieces) and as sahō bugaku 左方舞楽 (or sa no mai 左舞, for Bugaku dance pieces), were based on six modes (chōshi 調子), namely, ichikotsuchō 壱越調 (equivalent to D mixolydian in Western music theory), sōjō 双調 (equivalent to G mixolydian) and taishikichō 太食調 (equivalent to E mixolydian) on the one hand, and hyōjō 平調 (equivalent to E dorian),ōshikichō 黄鐘調 (equivalent to A dorian), and banshikichō 盤鐘調 (equivalent to B dorian) on the other. The first group (based on a major scale in the Western system) is called ryo 呂 and is considered yin 陰; the second group (based on a minor scale in the Western system), called ritsu 律, is considered yang 陽. Among these six modes, five were directly mentioned in correlative tables which connected multiple series of five elements. 8 Full-fledged correlative systems became prevalent in Esoteric Buddhist discourse since at least the time of the Shingon reformer Kakuban 覚鑁 (a.k.a. Kōgyō Daishi 興 教大師, 1095-1143) and his main work, Gorin kujimyō himitsushaku 五輪九字明秘密釈. However, the fundamental scaffolding of the system was already well known in court culture since around the tenth century, as it constituted the background of medicine (as found in Ishinpō 醫心方 compiled by Tanba Yasuyori 丹波康頼 in 894) and, particularly relevant for our purposes here, of music. For instance, an introductory text on court artistic accomplishments entitled Kuchizusami 口遊 (written in 970 by Minamoto no Tamenori 源為 憲), includes the following list of correlations between musical modes and other aspects of reality (Kuchizusami,p. 79b The same correlations involving the cosmology of music are firmly established a couple of centuries later in the music treatise Kangen ongi 管絃音義 (ca. 1185) by Ryōgon 涼 金 (dates unknown), possibly a monk from Shitennōji. 10 Sōjō-east-spring-wood-liver-eye-kaku notē Oshikichō-south-summer-fire-heart-tongue-chi note Hyōjō-west-autumn-metal-lungs-nose-shō note Banshikichō-north-winter-water-kidneys-ear-u note Ichikotsuchō-center-earth-the four seasons-spleen-body-kyū note-the ruler Kangen ongi includes more medical and Onmyōdō 陰陽道 elements, and adds the five Confucian relations, the five Confucian virtues, and further on, Buddhist elements such as the realms of transmigration, the five cosmic elements, the five aggregates (Skt. skandha), the four noble truths, and the sounds of Sanskrit letters. Notably absent, though, are aspects specifically from Esoteric Buddhism. The latter will become prominent by the time in which the Shingon correlative text entitled Gozō mandara waeshaku 五臓曼荼羅和 会釈 was composed (thirteenth century). In it, music was just one aspect among dozens of series of elements. In particular, the five modes and the five primary notes of the scale are correlated with the five buddhas, the five mantra-kings (myōō 明王), the five Chinese cosmic elements, different sets of five Sanskrit syllables, the five primary shapes, the five primary colors, the five seasons, the five planets, the five Indian cosmic elements, the five grains, the five fingers of a hand, the five stages of salvation, the four main Esoteric rituals, the five-component stupa (gorintō 五輪塔), the five organs of the body, the five senses, the five aspects of the mind, and so forth. 11 Similar lists can be found in many other texts, including specialized Gagaku encyclopedias such as Kyōkunshō (p. 150) and Taigenshō (vol. 1,. Some trends in both Chinese and Indian thought saw music as the foundation of reality. Music was the underlying component of Confucian rites, the semiotic system that would ensure the efficacy of the rites in their role of harmonizing the macrocosm (the universe), microcosm (the individual), and mesocosm (society); this sanctioned the place of Gagaku at imperial rituals throughout East Asia. Sound was also envisioned by some Indian traditions dating back to the Veda as the ultimate substance of the cosmos, out of which everything else derived. The latter idea reverberates in Japanese Esoteric Buddhism, especially in Kūkai's idea that "the five great elements have vibrations"-vibrations which then become sounds, languages, and any other element of reality (Shōji jissōgi 声字実相義, T, 77, 2429: 402b). Texts written by medieval musicians emphasized the divine role and fundamental nature of Gagaku as the celestial sound of Buddhist paradise. Monastic works tended instead to relativize music as one of the many correlative series without any specific primacy. In any case, it is clear that music was one, if not the main, of the many alloforms (alternative and correlated substances) which constituted the supreme reality according to the correlative episteme of medieval Japan. 12 As such, music (through its notes, its modes, and its instruments) reverberated in all other orders of reality, from the human body to society and the stars, and was endowed with the power to bring harmony in the cosmos, peace in the realm, and health to humans. 13 It is worth noting that the sixth standard mode, taishikichō, was not included in this correlative system, but was instead a sort of free-floating mode that could be played on any occasion; in fact, many compositions in taishikichō are celebratory and auspicious pieces, and one in particular, Chōgeishi 長慶子, is often used at the end of a Bugaku performance.
This correlative system of musical modes, because of its polysemy and multisensorial nature, was remarkably flexible. Compositions were not necessarily performed only in the seasons of the respective modes, but also based on other considerations. For example, pieces in sōjō could be played at the beginning of a performance program (in this case, spring was understood metaphorically as the beginning of a cycle). Some pieces in banshikichō (such as Senshūraku 千秋楽 and Etenraku 越天楽) were, and still are, used in funeral ceremonies; in this case, the correlations with winter (the end of life of plants in a year) and emptiness are operative. However, other pieces in banshikichō were also performed for their beauty and elegance (such as Seigaiha 青海波) or because of their healing power and mythological background (such as Sokō 蘇合香). Additionally, pieces were transposed in different modes so that they could be played at different occasions and with different sonic effects.

Gagaku and Bugaku at Religious Ceremonies
Temple-shrine complexes have traditionally been hubs of performing arts of all kinds. Today, Buddhist temples are normally associated with shōmyō chanting, and Shintō shrines with Gagaku or, more commonly, with Kagura. In the middle ages, the situation of the performing arts for religious purposes was much richer and more diverse. Temples and shrines also hosted regular performances of music and dance for ritual and entertainment purposes. The most representative among those were Dengaku, Ennnen no mai, and Sarugaku. Dengaku seems to have originated in ancient songs and dances for the agricultural rituals accompanying the transplant of rice saplings (taue 田植え), but by the end of the eleventh century, it was performed in Kyoto as a protective technique to ward off evil spirits (goryō 御霊); between the end of the Heian and the Muromachi periods, various types of Dengaku were performed at the Wakamiya Onmatsuri 若宮御祭 at the Kasuga shrine 春日大社 in Nara. Next, Ennen no mai was performed at important events that took place at temples: after the most important religious ceremonies (hōe 法会), on the occasion of visits by shoguns or imperial envoys, and at the temples' general assemblies (sengi 僉議). These large events often involved Bugaku dances as a more formal art; Ennen no mai was explicitly envisioned as light entertainment; and the role of chigo 児 (monastic acolytes who were often the object of sexual desire among senior monks) in these dances is well known. Finally, Sarugaku emerged around the mid-Kamakura period as a performing art involving drama, and by the Muromachi period (by then, usually called Noh), it had supplanted Dengaku as the leading performing art for entertainment at temples. 14 However, the most important and prestigious form of religious performing art (involving both instrumental music and dance) was Gagaku. This art form arrived in Japan from the Asian mainland around the late sixth and early seventh centuries, and was from the beginning housed at leading Buddhist temples such as Shitennōji 四天王寺, Daianji 大安寺, Yakushiji 薬師寺, Tōshōdaiji 唐招提寺, and Tōdaiji 東大寺. Those temples had dedicated orchestral ensembles (called gakko 楽戸, lit. "musicians' households") until the ninth century (see Ono 2013, pp. 4, 6-9, 45-46). From the late Heian period on, permanent Gagaku and Bugaku ensembles were based at Kōfukuji-Kasuga in Nara and at Shitennōji in Osaka, in addition to another ensemble at the imperial court in Kyoto, all staffed by hereditary guilds of musicians and dancers. Iwashimizu Hachimangū (-ji), while not having a permanent ensemble, often hosted rituals involving music and dance by performers from the court musicians and Kōfukuji-Kasuga.
Those temples-shrines that did not have a permanent ensemble invited musicians from the established ensembles and the imperial court on a regular basis throughout the year. For example, Gagaku pieces, either instrumental music (kangen 管絃) or Bugaku dances, were performed at important ceremonies at temples and shrines, such as Iwashimizu Hachimangū in March, Kamo shrine in November, and further at Kasuga,Ōharano, Hirano, Itsukushima, Sumiyoshi, and other major religious centers related to the imperial court; and at all major temples in the Kinai region (Kōfukuji, Tōdaiji, Tōshōdaiji, Shitennōji) and beyond.
An indication of the prestige and preeminence of Gagaku/Bugaku can be found in various versions of the Hachiman scrolls. In the famous scene in which Empress Jingū summons various gods to request their help to conquer Korea, the gods tell her that she should invite Azumi no Isora 阿曇磯良 to be the helmsman of their fleet. In order to do so, the gods, led by Sumiyoshi, gather by the seaside and begin to perform a dance. Enthralled by the music, Isora finally emerges from the bottom of the sea and joins the dance.
This might well be a variation on the myth of Amaterasu in the Heavenly Cave, transposed on a maritime landscape and involving a sea god. As is well known, in the former, the sun goddess Amaterasu, upset by her younger brother Susanoo's transgressions, secludes herself in the Heavenly Cave (Ama no iwato 天の岩戸), and the divine world plunges into darkness. The gods call a meeting and decide the best course of action; they decide to perform music and dances led by Ame no Uzume 天鈿女命; curious, Amaterasu opens the entrance to her retreat and the gods pull her out of the cave, thus restoring order and light (see Breen and Teeuwen 2010, pp. 129-67). In Isora's legend, Empress Jingū 神 功皇后, aiming to conquer the Korean peninsula, summons the gods and holds a strategy council. The gods suggest summoning Azumi no Isora to pilot the ships for the invasion. Isora lies at the bottom of the sea, with his face covered with abalone and oyster shells. The god Sumiyoshi, in order to lure Isora to the surface, begins to dance. 15 This is the origin story of the Seinoo dance (Seinoo no mai 細男舞), a rare and elusive dance which dates back to at least the eleventh century, and is still performed today at the Kasuga Grand Shrine in Nara. 16 What is significant for us here is that the authors of various Hachiman scrolls over the centuries across Japan had no doubts that such a lofty and important performance involving the gods and a ruling empress was a Bugaku dance with Gagaku instrumental accompaniment. Indeed, in medieval scrolls (and in some scrolls from the Edo period), the god Sumiyoshi is normally described as dancing a Bugaku piece (at times called Senoo no mai); it is only in the Hakozaki Hachimangū engi of 1672 (see below) that he is depicted with the Seinoo accoutrements as we still know them today (especially, the veil in front of his face). Let us now take a closer look at the Bugaku scene from some representative scrolls describing the origin story of the god bodhisattva Hachiman, composed between the late thirteenth and the late seventeenth centuries. Here, we find a Gagaku musical ensemble composed of a hichiriki 篳篥 (double reed wind instrument), a ryūteki 龍笛 (flute), a shō 笙 (mouth organ), a gakusō 楽箏 (or sō no koto 箏の琴, a sort of horizontan zither), a gaku-biwa 楽琵琶 (a kind of lute), and a taiko 太鼓 (large drum). The god Sumiyoshi wears a costume similar to the one normally used for the Bugaku piece Seigaiha 青海波 (a composition associated with the sea).
Next, in Hachimangū tsūengi 八幡宮通縁起 (Complete story of Hachiman and his shrine), dated 1431 and 1444, preserved at the Yura Minato Hachiman Shrine, Yura Sumoto City, Hyōgo prefecture (Figure 2), there is no koto, and the god's costume is again similar to the one for Seigaiha. Here, we find a Gagaku musical ensemble composed of a hichiriki 篳篥 (double reed wind instrument), a ryūteki 龍笛 (flute), a shō 笙 (mouth organ), a gakusō 楽箏 (or sō no koto 箏 の琴, a sort of horizontan zither), a gaku-biwa 楽琵琶 (a kind of lute), and a taiko 太鼓 (large drum). The god Sumiyoshi wears a costume similar to the one normally used for the Bugaku piece Seigaiha 青海波 (a composition associated with the sea).
Next, in Hachimangū tsūengi 八幡宮通縁起 (Complete story of Hachiman and his shrine), dated 1431 and 1444, preserved at the Yura Minato Hachiman Shrine, Yura Sumoto City, Hyōgo prefecture (Figure 2), there is no koto, and the god's costume is again similar to the one for Seigaiha.       (Figure 4), has the same instrumental ensemble as in the previous images. Sumiyoshi's costume, however, looks different, and while it is not clear what it represents, it does resemble those used in military dances such as Taiheiraku 太平楽 or Batō 抜頭 or even Ranryōō 蘭陵王, another military dance that is often associated with the dragon king or ryūō 龍王 but without the masks that characterize the last two pieces. Batō 抜頭 or even Ranryōō 蘭陵王, another military dance that is often associated with the dragon king or ryūō 龍王 but without the masks that characterize the last two pieces.  However, the Konda [also, Honda] Hachiman engi 誉田八幡縁起 (The story of Konda Hachiman), from the second half of the Edo period (mid-eighteenth to early nineteenth centuries), now at the Staatsbibliothek zu Berlin (Berlin State Library, Berlin), is quite different from the previous images ( Figure 6). Here, the god Sumiyoshi wears a mask and a non-descript costume, resembling (but not quite matching) those used in either Engiraku 延喜楽 or Seigaiha. The instrumental ensemble is partly covered, but we can see the three wind instruments, a taiko and a dadaiko 大太鼓 (a giant drum used in outdoor performances). Batō 抜頭 or even Ranryōō 蘭陵王, another military dance that is often associated with the dragon king or ryūō 龍王 but without the masks that characterize the last two pieces.  However, the Konda [also, Honda] Hachiman engi 誉田八幡縁起 (The story of Konda Hachiman), from the second half of the Edo period (mid-eighteenth to early nineteenth centuries), now at the Staatsbibliothek zu Berlin (Berlin State Library, Berlin), is quite different from the previous images ( Figure 6). Here, the god Sumiyoshi wears a mask and a non-descript costume, resembling (but not quite matching) those used in either Engiraku 延喜楽 or Seigaiha. The instrumental ensemble is partly covered, but we can see the three wind instruments, a taiko and a dadaiko 大太鼓 (a giant drum used in outdoor performances). However, the Konda [also, Honda] Hachiman engi 誉田八幡縁起 (The story of Konda Hachiman), from the second half of the Edo period (mid-eighteenth to early nineteenth centuries), now at the Staatsbibliothek zu Berlin (Berlin State Library, Berlin), is quite different from the previous images ( Figure 6). Here, the god Sumiyoshi wears a mask and a non-descript costume, resembling (but not quite matching) those used in either Engiraku 延 喜楽 or Seigaiha. The instrumental ensemble is partly covered, but we can see the three wind instruments, a taiko and a dadaiko 大太鼓 (a giant drum used in outdoor performances).  (Figure 7). In this image, the dancer performs the Seinoo dance with its characteristic costume and face veil. The musicians are partly represented from the back so not all instruments are visible, but we can see two hichiriki, two ryūteki, a koto, and a man holding the shaku 笏 wooden sticks, which are normally used to mark the rhythm of song pieces. No other percussion instrument is present. Finally, the Hachiman Handscrolls (mid-seventeenth century) from the Smith College Museum of Art (Figure 8) presents yet another version. Here the instruments are partly covered, but we can detect a hichiriki, a ryūteki, and a taiko. The god Sumiyoshi's dance costume is nondescript (it vaguely resembles Nasori 納曽利), and we see a veiled Isora coming toward the stage riding a sea turtle.  (Figure 7). In this image, the dancer performs the Seinoo dance with its characteristic costume and face veil. The musicians are partly represented from the back so not all instruments are visible, but we can see two hichiriki, two ryūteki, a koto, and a man holding the shaku 笏 wooden sticks, which are normally used to mark the rhythm of song pieces. No other percussion instrument is present.  (Figure 7). In this image, the dancer performs the Seinoo dance with its characteristic costume and face veil. The musicians are partly represented from the back so not all instruments are visible, but we can see two hichiriki, two ryūteki, a koto, and a man holding the shaku 笏 wooden sticks, which are normally used to mark the rhythm of song pieces. No other percussion instrument is present. Finally, the Hachiman Handscrolls (mid-seventeenth century) from the Smith College Museum of Art (Figure 8) presents yet another version. Here the instruments are partly covered, but we can detect a hichiriki, a ryūteki, and a taiko. The god Sumiyoshi's dance costume is nondescript (it vaguely resembles Nasori 納曽利), and we see a veiled Isora coming toward the stage riding a sea turtle. Finally, the Hachiman Handscrolls (mid-seventeenth century) from the Smith College Museum of Art (Figure 8) presents yet another version. Here the instruments are partly covered, but we can detect a hichiriki, a ryūteki, and a taiko. The god Sumiyoshi's dance costume is nondescript (it vaguely resembles Nasori 納曽利), and we see a veiled Isora coming toward the stage riding a sea turtle. To summarize, this brief selection of representative images from medieval and early Edo period Hachiman scrolls from various locations in western Japan clearly shows that the authors were aware of Gagaku instruments and, to a certain extent, of Bugaku dances. Since the original legend did not specify which particular dance the god Sumiyoshi performed, the authors of the scrolls tried to suggest some possibilities, such as military dances or sea-related dances. However, these painters were not Gagaku experts: the dance costumes are approximate at best, and the musical ensemble is not the standard one. 17 Even in images where the taiko is present, the two other standard percussion instruments (the shōko 鐘鼓 suspended gong and the kakko 鞨鼓 double drum) are missing; the shō is not always visible (and perhaps, not even present); and biwa and koto, often found in these images, were typically not used in Bugaku performances; they were likely included because these two instruments were normally used by aristocrats, and thus they may be considered appropriate for a musical performance by deities. Now, the fact that authors in various parts of Japan were familiar with Gagaku and Bugaku is not surprising. As previously mentioned, from the late Heian period on, Gagaku and Bugaku also came to be performed at regional temples. Visiting or exiled aristocrats brought Gagaku along with them; temples invited professional musicians from the capital region, who taught some local residents; later on, members of secondary branches of musician families established themselves in provinces and exercised their activities there. To complicate the situation further, in many locales, Gagaku and Bugaku gradually changed over the centuries: the more exotic instruments such as hichiriki and shō were abandoned, the music and dance repertories were simplified, and those performances overall came to resemble what later came to be called Kagura.
It appears that important provincial temples and shrines, with connections with large temples in the Kinai region, began to invite musicians from the Gagaku ensembles in Nara and Osaka, who instructed local musicians in the repertory (some of them may have taken residence there). Many forms of religious performances at temples and shrines in various parts of Japan exist that are directly derived from Bugaku used in Buddhist ceremonies in Kinai. The Wakasa area north of Kyoto preserves a Hotokemai 仏舞, which may contain elements of the long-lost dance Bosatsu 菩薩 (a piece now existing only in instrumental form), and a Ō no mai 王の舞, which may be a remnant of ancient forms of Gigaku 伎楽. An impressive Bugaku repertory (14 pieces) is recorded in premodern sources from the province of Oki in the Sea of Japan; as a land of exile for emperors and aristocrats, it may have hosted a Gagaku tradition; records in fact report influences from Tennōji (Mizuhara 1970, p. 290). Henjōji in Wakayama performs a Hotoke no mai once every sixty years, which To summarize, this brief selection of representative images from medieval and early Edo period Hachiman scrolls from various locations in western Japan clearly shows that the authors were aware of Gagaku instruments and, to a certain extent, of Bugaku dances. Since the original legend did not specify which particular dance the god Sumiyoshi performed, the authors of the scrolls tried to suggest some possibilities, such as military dances or sea-related dances. However, these painters were not Gagaku experts: the dance costumes are approximate at best, and the musical ensemble is not the standard one. 17 Even in images where the taiko is present, the two other standard percussion instruments (the shōko 鐘 鼓 suspended gong and the kakko 鞨鼓 double drum) are missing; the shō is not always visible (and perhaps, not even present); and biwa and koto, often found in these images, were typically not used in Bugaku performances; they were likely included because these two instruments were normally used by aristocrats, and thus they may be considered appropriate for a musical performance by deities. Now, the fact that authors in various parts of Japan were familiar with Gagaku and Bugaku is not surprising. As previously mentioned, from the late Heian period on, Gagaku and Bugaku also came to be performed at regional temples. Visiting or exiled aristocrats brought Gagaku along with them; temples invited professional musicians from the capital region, who taught some local residents; later on, members of secondary branches of musician families established themselves in provinces and exercised their activities there. To complicate the situation further, in many locales, Gagaku and Bugaku gradually changed over the centuries: the more exotic instruments such as hichiriki and shō were abandoned, the music and dance repertories were simplified, and those performances overall came to resemble what later came to be called Kagura.
It appears that important provincial temples and shrines, with connections with large temples in the Kinai region, began to invite musicians from the Gagaku ensembles in Nara and Osaka, who instructed local musicians in the repertory (some of them may have taken residence there). Many forms of religious performances at temples and shrines in various parts of Japan exist that are directly derived from Bugaku used in Buddhist ceremonies in Kinai. The Wakasa area north of Kyoto preserves a Hotokemai 仏舞, which may contain elements of the long-lost dance Bosatsu 菩薩 (a piece now existing only in instrumental form), and aŌ no mai 王の舞, which may be a remnant of ancient forms of Gigaku 伎楽. An impressive Bugaku repertory (14 pieces) is recorded in premodern sources from the province of Oki in the Sea of Japan; as a land of exile for emperors and aristocrats, it may have hosted a Gagaku tradition; records in fact report influences from Tennōji (Mizuhara 1970, p. 290). Henjōji in Wakayama performs a Hotoke no mai once every sixty years, which also seems to include elements from Bosatsu. 18 On Mt. Kōya, Amano-sha 天野社 holds a rare performance of a mandala offering ritual involving Bugaku dedicated to Niu 丹生, the protector deity of the sacred mountain (see Endō 2011). In Shizuoka prefecture, the Amamiya Shrine 天宮神社 and the Oguni Shrine 小国神社 both continue a tradition of what formerly (before the forced separation of temples and shrines in the early Meiji period) was a Bugaku hōyō; records suggest that this tradition was imported from the Kōfukuji-Kasuga in Nara in the late sixteenth century; musicians (reijin 伶人) were shrine-monks (shasō 社僧) from the temples related to what is now the Oguni Shrine. Those temples were connected with the Shōren'in monzeki 青蓮院門跡 (imperial abbacy) in Kyoto. In the same area, the Yamana Shrine 山名神社 preserves a type of Bugaku transmitted from Tennōji in 1496 and then again in 1606 Misumi 1970, pp. 304-5). In the Itoigawa area of Niigata prefecture, a couple of shrines preserve a variant version of Bugaku, possibly related to Shitennōji in Osaka. The Risshakuji 立石寺 in Yamagata prefecture also preserves a type of Bugaku, derived from Shitennōji, which was established in the area at least since the late Heian period; legend has it that members from the Hayashi family 林家, reijin of Shitennōji, moved to the area following the Tendai patriarch Ennin 円仁 in 860 (Ōuchi 2021b). In Akita prefecture, Kinpu Jinja 金峰神社 also performs Bugaku, apparently through the influence of yamabushi 山伏 from Kumano 熊野 (Misumi 1970, p. 304). Unfortunately, this rich aspect of local religion is little known; until now, it has been studied mostly by folklorists, with the result that it has not been placed in the larger context of cultural and religious transformations that affected medieval and early-modern Japan.

A Typical Bugaku hōyō: Shōryō-e at Shitennōji (Osaka)
The general model for Bugaku hōyō is derived from the lavish ceremony held in 1083 for the consecration of the pagoda at Hosshōji 法勝寺, the magnificent temple built by Retired Emperor Shirakawa 白河院. Bugaku was incorporated into the ceremony in two different ways, namely as an integral component of the Buddhist ritual in the first part of the ceremony and as gratification for the audience (the so-called "pleasure of the Dharma," hōraku 法楽) in the second part. This is also the basic structure of the Shōryōe (Assembly for the Sacred Spirit of the Sage, full title Shōryōe bugaku daihōyō 精霊会舞楽大法要), held annually at Shitennōji in Osaka on the occasion of the day of Shōtoku Taishi 聖徳太子's death (meinichi 命日). Traditionally, it was held on the twenty-second day of the second month in the old calendar, but in modern times, it was moved to April 22. This ceremony praises Shōtoku Taishi's virtues and prays for the pacification of his spirit .
Little is known about its origins because of the loss of old records due to the numerous fires that destroyed the temples. The Shōryōe became important from the late Heian period and especially during the Kamakura period, thanks to the diffusion of a new cult to Shōtoku Taishi, which was at the basis of the revival and new prosperity for Shitennōji (and also Hōryūji 法隆寺), with pilgrims of all social classes visiting the temple to attend the ceremonies. At Shitennōji in particular, there were the three great ceremonies commanded by the emperor (sandai chokue 三大勅会): Shōryōe, Nehan'e 涅槃会, and Nenbutsu'e 念仏会; in addition, Shari'e 舎利会 and Kyō kuyōe 経供養会 also involved Bugaku. After a long time of abandonment, there is a tendency today toward reviving these ancient ceremonies at Shitennōji and other temples, thanks to the role of the Gagaku-Bugaku ensembles associated with Shitennōji, especially the Garyōkai 雅亮会.
The musicians (reijin) of the Shitennōji orchestra (gakuso 楽所) are part of a long tradition that claims Hata no Kawakatsu 秦河勝 (sixth century) as their ancestor. A music guild (gakko 楽戸) existed here from the Nara period, and Shitennōji musicians are mentioned in several sources from the Heian period on.
Shōryōe, as it is performed today, follows quite closely the original model dating back to the Heian period. In addition, the repertory of music and dances includes pieces dating back to that time. Moreover, since Gagaku and Bugaku have been continuously performed, most of the time by musicians from the same hereditary families affiliated with Shitennōji since at least the Heian period (if not earlier), who play instruments that have not changed significantly over the centuries, it is therefore possible to use today's Shōryōe as a way to get a sense of medieval Bugaku performances at Buddhist temples and Shintō shrines. 19 What follows is a description of contemporary Shōryōe based on descriptions by Ono Kōryū  and Ono Shinryū , the past and current directors of Tennōji gakuso Garyōkai 天王寺楽所雅亮会 Gagaku academy at Shitennōji.
Shōryōe includes a procession (michiyuki 道行) of relics of both the Buddha (busshari 仏舎利) and Shōtoku Taishi (ikotsu 遺骨), which are circulated around the temple neighborhood and then brought inside the temple hall. During the procession, the relics are accompanied by the temple abbots (isshari and nishari 二舎利), musicians and dancers, main patrons (chōja 長者), and parishioners (called, interestingly, hachibushū 八部衆). 20 This ritual seems to be based on Indian and Chinese precedents, where the processions were accompanied by various performances. The main icon of the ceremony is a portrait of Shōtoku Taishi known as Yōji no miei 楊枝御影; the spirit of the Prince is believed to abide in it. The entire ceremony is in fact centered on the spirit abiding in the portrait; the idea is that Gagaku music will wake up the spirit, for whom the ceremony will be celebrated and to whom various offerings, including food and Bugaku dances, will be given. At the end of the procession, the performers split into two groups and gather to the left and to the right of the main stage, respectively (depending of the kind of dance and music they are to perform); the relics and the portrait are given offerings in a ritual called dengu 伝供 (lit. "passing along the offerings"), in which dancers, representing various categories of beings populating the Buddhist universe, such as bodhisattvas, hachibushū 八部衆, and animals (the kalavin . ka bird and butterflies), pass on the offerings to the monks in the hall where the main icon of the ceremony is located. The offering ritual is followed by a dance offering, in which four Bugaku dances (kuyōmai 供養舞) are performed. Next, the main Buddhist liturgy (shika hōyō 四箇法要) begins in four parts, with bai 唄, sange 散華, bonbai 梵唄 and shakujō 錫杖, and with an additional Bugaku dance between sange and bonbai. 21 At the end, there is the second part of the ceremony, called nyūjō bugaku 入調舞楽 (lit. "entrance preludes Bugaku"), performed for the gratification of the audience, which will be thus exposed to the "pleasure of the Dharma" (hōraku).
While the structure of the ceremony is fixed, the dance program might change slightly from year to year; several pieces are always performed, others can change. Here, I will describe the most recent public performance of 2020 (in 2021, the ceremony took place in an abridged form without an in-person audience and was broadcast live on YouTube). 22 Once the performers are in place by the stage, the opening dance Enbu 振鉾 of the ceremony purifies the stage of negative spirits. It is followed by the Bugaku Soriko 曽莉 子, which serves to wake up the spirit of Shōtoku Taishi abiding in the Yōji no miei 楊枝 御影 portrait. A second dance, Katen 賀殿, is meant as a first offering to the now awake Prince. Next, the monks enter the ritual space and the actual ceremony begins. First, there is the sōrai 惣礼 (obeisance) and the presentation of the offerings (dengu 伝供, also called kengu 献供), during which the dancers of Bosatsu, Karyōbin 迦陵頻 and Kochō 胡蝶 carry the offerings on stage and give them to the monks in front of the hall and leave the stage. This segment is followed by four dances as offerings (kuyōmai 供養舞): Bosatsu (for which the choreography was lost in the middle ages and the dancers simply walk on stage); Shishi 獅子, the prototype of the Japanese lion dance, with roots in the Gigaku performances of the Asuka period (seventh century); Karyōbin, inspired to the kalavin . ka bird of the Buddhist paradise; and Kochō. The last two pieces are performed by boys of elementary school age (in the past, the dancers were chigo, young acolytes at Buddhist temples). After the offertory dances, the Buddhist ceremony proper begins. It is a full-fledged ritual in four parts (shika hōyō). First, the main cantor monk (baishi 唄師) rises from his seat, intones the bai 唄 (also bainoku 唄匿), and begins the flower scattering procession (sange daigyōdō 散華大道行). As the intermission, the Bugaku Totenraku 登天楽 is performed. Finally, the monks intone the bonnon 梵音 and the shakujō, which concludes the ritual.
At this point, the Bugaku set (nyūjō) begins. In the past this set included many different pieces lasting several hours; today, four pieces are typically performed from a varying repertory. In 2020, Tennōji gakuso Garyōkai performed the full composition of Taiheiraku 太平楽 in three parts: Michiyuki 道行 or Chōgeishi 朝小子, the Ha 破 section, also called Jōshōraku 城昌楽, and the Kyū 急 finale known as Gakkaen 合歓塩. The fourth piece that year was Somakusha 蘇幕者, based on a legend from Shōtoku Taishi's cycle, according to which one day when the Prince was riding his horse in Kawachi province while playing the flute, a monkey-like mountain deity was so enthralled by the beautiful sound that it began to dance along with the music. At the end of this dance, which concludes the entire Shōryōe, the two palanquins carrying the relics are removed from the ceremonial place and returned to the temple hall.
Other pieces that have been performed in the past as Nyūjō Bugaku include Batō 抜頭 and Bairo 陪臚, two of the eight pieces brought to Japan by the monk Buttetsu 仏哲 in the mid-eighth century from the country of Rin'yū 林邑 (present-day central Vietnam). 23 The entire performance includes purification, representations of Buddhist Pure Lands, military celebrations, and commemorations of Shōtoku Taishi's supernatural power (see Appendix). This program is the result of a complex process of historical stratification and transformation: ancient Gigaku 伎楽 performances from India and China, music and dances from India, Vietnam, and China; new pieces composed in Japan (Bosatsu 菩薩 and Kochō 胡蝶), in a close interconnection between court repertory and Buddhist ceremonies; some pieces were preserved and rearranged, others were lost. 24 It is clear that the Shōryōe is also a complex ceremony in which music and dance do not have a mere aesthetic function, but are essential components of the ritual program and its signification. The kuyōmai in particular reinforce, explain, and amplify the Buddhist liturgy; they were envisioned as offerings to the buddhas and the gods, but the ritual procedures go well beyond that, as they also determine the direct involvement of the musicians and dancers in the Buddhist ceremony, especially in the part known as dengu ("passing on the offerings"). As a whole, the bugaku hōyō represents the image of Shōtoku Taishi as a Buddhist ruler-as both a conqueror (as indicated by the military pieces) and a renouncer (from the Buddhist repertory); and the entire setting reconstructs a scene in which bodhisattvas (the monks), lay patrons (the chōja), and all kinds of beings (tenryū hachibushū) pay obeisance to the closely related pair Buddha/Shōtoku Taishi (as both savior and ideal ruler, they are indeed each other's double) (See Carr 2012). Such a scene is most vividly described in the already mentioned Buddhist scripture, the Sutra of the Questions by Druma, King of the Kim . nara. At Shitennōji, the hōyō is performed not inside the temple but on the stage, which is then, literally, the dōjō 道場 of the ceremony. The stage itself thus plays a central role: not simply as the place where performances take place, but as a liminal zone between the profane and the sacred, this world and the invisible world of the Buddha and Shōtoku Taishi. Furthermore, it is normally accepted that the second part of the program, the nyūjō bugaku, is performed for the entertainment of the audience. However, since it also includes elements such as propitiation and protection, one could argue that the "pleasure of Dharma" (hōraku) is only one of its functions. On a deeper level, those dances serve to create a sense that the audience is in fact in a sacred space, a sort of Pure Land, ruled over by Shōtoku Taishi as an avatar of Kannon 観音. When considered as a whole, a bugaku hōyō describes a world in which musicians and dancers directly participate in the creation and maintenance of a sacred space for the buddhas on the one hand, and in displaying worldly benefits for the people on the other hand. These two aspects are closely related to widespread Buddhist ideals about the perfect ruler or cakravartin (Jp. tenpōrin'ō 転法輪王) (Tambiah 1976). In this case, Shitennōji is rendered as a Pure Land on earth, and Shōtoku Taishi displays his twofold nature as a bodhisattva and a perfect ruler.

Canon, Ritual, and Musical Performance
The close association between Gagaku and Buddhism resulted not only in the integration of Bugaku dance within Buddhist rituals (Bugaku hōyō), but also in the creation of new liturgies involving Gagaku instrumental music (kangen).
One such new liturgy created in medieval Japan concerned the transmission of music education, in which the achievement of proficiency came to be sanctioned by rituals modeled after Esoteric Buddhist consecrations (kanjō 灌頂). This trend began in the early thirteenth century with the transmission of the art of the biwa 琵琶 in the form of biwa kanjō (see Inose 2018Inose , 2022; by the second half of the fourteenth century, a special consecration for the transmission of the art of the shō 笙 (shō kanjō) also developed, which was performed in the Muromachi period for the transmission of secret pieces (hikyoku 秘曲) to the emperors . In both these rituals, a master preceptor transmitted secret compositions for the instruments to the disciple in a specially prepared hall at the presence of an image of Myōonten 妙音天 (aka Benzaiten 弁財天, Skt. Sarasvatī, the Buddhist goddess of music). Later on, in the fifteenth century, kanjō consecrations for the sō no koto also appear in sources, but by then, the Buddhist liturgical aspect had been drastically reduced (Inose 2022).
Among the new medieval liturgies involving Gagaku instrumental accompaniment, the most commonly performed ones were the kangen kōshiki. In them, the liturgy, centered on the text of a kōshiki, included a varying number of pieces from the standard Gagaku repertory. I have not been able to find indications that new pieces were ever composed in these occasions, but this may be due to lack of sustained study of medieval scores. However, we do know of at least one piece that was newly composed in the shōmyō style with a Gagaku instrumental accompaniment: the Song of Raitawara by the bodhisattva Memyō (Aśvaghos . a). As references to this song, often including the lyrics, can be found in a wide range of medieval sources, this particular composition deserves our special attention as an example of the role of Gagaku in medieval Japanese religion.
The importance of Gagaku in medieval Japanese Buddhism encouraged authors to find references in the Buddhist scriptures that justified the salvific role of music. Predictably, there are not many, but a few crucial episodes were singled out and cited, in various permutations, in a wide range of sources: court diaries, historical records, musicians' encyclopedias, collections of narratives, and so forth. The story of Druma, king of the Kim . nara, and his musicianship on the kin (koto) leading him to Buddhahood, is well known (see . Earlier stories tell of a Gandharva kin player, Pañcasikha (Jp. Hanshayoku 般遮翼), praised by the Buddha for the virtue of his music . Another sutra tells of the Buddha who changed his shape into that of a Gandharva musician to take on the challenge by Gandharva king Zen'ai 善愛 on who between them is the most virtuoso player of the kin. At the sublime sound of the Buddha-Gandharva, Zen'ai became a disciple of the Buddha and attained arhathood (Zhuanji bai yuan jing 撰集百縁 経, translated by Zhiqian 支謙,T,4,. However, another story was perhaps even more widespread-the story of Aśvaghos . a's Song of Ratnapāla (Jp. Raitawara gi 頼 吒 Here is a summary. 25 One day, Aśvaghos . a visited the city of Pātalipūtra to preach. Wishing to convert its inhabitants, he wrote a song with musical accompaniment entitled Song of Ratnapāla and asked local musicians to perform it. Apparently, the song was too difficult for them to play, so Aśvaghos . a donned the white robe of a musician and joined the ensemble. By playing the drum and the gong he stabilized the tempo and brought all instruments together. The resulting music was pure and elegant, plaintive but beautiful, with a slow and relaxed melody. When they heard this song, five hundred princes in the city attained enlightenment, became renunciants, and began practicing Buddhism. The king of Pātalipūtra, worried that if more people listened to this song, they would leave their professions and abandon the city, thus imperiling his rule, prohibited any further performance of it. The text also provides the lyrics of this song, versions of which appear in many premodern Japanese sources: Worldly phenomena are like ghosts, like provisional appearances. They tie us to the prison of the three conditioned realms and in none of them can one find pleasure.
A king's status is elevated and his power boundless, but regardless they are impermanent and no one can hold on to them for long.
Like clouds in the sky, which disperse and disappear in a moment, our existence is empty like a banana tree; it is evil and frightening and we should not get too comfortable with it. Who would ever find pleasure in a box full of poisonous snakes? This is why the buddhas reprove our existence. This is why they teach widely the principles of emptiness and selflessness. (Fu fazang yinyuan chuan, T, 50, 2058: 315a-315b) Aśvaghos . a, traditionally considered one of the founders of the Yogācāra school, is considered to be one of the greatest poets and orators in ancient India; his life of the Buddha (Buddhacarita, Jp. Busshogyōsan 仏所行讃) is particularly well known and is translated in several modern languages. Because of his background, it is not particularly surprising to find this reference to his poetic and musical talent in one of his bibliographies; later texts in the East Asian Buddhist canon also refer to this episode (see Nakayasu 2021, pp. 239-41). Now, Raitawara as a personal name appears in the Laizhaheluo jing 頼吒和羅経 (Jp. Raitawara kyō), translated by Zhiqian 支謙 (196-255), but its content is unrelated to the episode involving Aśvaghos . a. The term Raitawara itself seems to be a transliteration of the Pāli Rattapāla (Skt. Ratnapāla), but again, that seems to be unrelated to the content of the song in question.
In Japan, references to the Song of Raitawara appear in many premodern sources. 26 It would appear that medieval and early modern authors were trying to make the best use of the few positive references to musical activity included in the Buddhist canon, especially this one, and referred to the Song of Raitawara often and in different contexts.
It is also very interesting to note that a shōmyō notation (hakase 博士) for the lyrics of this song, copied by the monk Kenna 劒阿 (1261-1338) from Shōmyōji 名寺 is preserved at Kanazawa Bunko in Yokohama (Nakayasu 2021, pp. 243-45), which suggests that someone in the Kamakura period tried to "reconstruct" (or, rather, re-imagine) this song. Furthermore, the shōmyō-style lyrics were sung with the accompaniment of the Gagaku piece Ringa 林歌 (the Tōgaku-style instrumental version). 27 In any case, this is another example of the creative effort at the expansion of the Gagaku repertory as part of Buddhist liturgies that took place in the medieval period.

Conclusions
This paper is an attempt at reconstructing the religious soundscape of medieval Japan. Many of the most popular genres of the time (Sangaku, Dengaku, Sarugaku) are now lost, either extinct or incorporated and transformed in subsequent performing arts. 28 However, the sound of medieval Gagaku can still be retrieved with a certain degree of accuracy and fidelity. Many of the pieces that we find mentioned in medieval documents are still performed today with the same instruments and following the same (or very similar) notation scores, and according to musical performance traditions that have been handed down uninterruptedly by the same families of musicians. Some pieces, and several dance choreographies, have been lost, and the pieces still performed today may have gone through slight changes in their melodies and embellishments; the tempos may also be slower today. Still, Gagaku offers a unique perspective on the musical activities taking place at temples and shrines in many parts of Japan.
Documents also describe a variety of rituals and liturgies involving Gagaku musical instruments and, sometimes, Bugaku dances. Most of these rituals are lost today, even though there are some attempts at bringing them back, as in the growing number of Buddhist rituals with Gagaku accompaniment that take place in Japan today-not only at temples but also at theaters. It is obvious that Gagaku played a central role in medieval Japanese religion as a Buddhist performing art-master musicians such as Koma no Chikazane and Toyohara Muneaki clearly saw it that way.
In this article we have noticed a certain degree of intersection between canonical texts, rituals, and performances: bugaku hōyō, kangen kōshiki, and the Song of Raitawara were all rituals involving various kinds of performances, and they ultimately found justifications in canonical texts such as the Sutra of King Druma or the Pure Land scriptures. Accounts of these intersections can also be found in a wide range of sources, which further spread the awareness of Gagaku's relations to Buddhism among a larger segment of the medieval Japanese populace. It will certainly be worthwhile to explore these intersections more, which lasted until the Meiji-period persecutions against Buddhism.
The preceding discussion also points to an obvious blind spot in the current field of Japanese religious studies, namely the fact that it tends to ignore music (See, however, Fritsch 1996;Ōuchi 2016. When music is mentioned, it is always in passing, and it mostly refers to vocal music (especially shōmyō 声明 chanting and kōshiki recitations) or to the accompaniment of Kagura dances; the descriptions of rituals (which, as we have seen, often included Gagaku musical accompaniment and Bugaku dance performances) are invariably silent. This of course is very far from the reality on the ground.
The silencing of music from the history of Japanese religions may have a number of possible reasons, including (i) the modern idea that elaborate and complex ceremonies were manifestations of "inauthentic" religiosity, and were therefore not worth discussing; (ii) the lack of disciplinary communication in modern academia between musicology and religious history (and literary studies); (iii) the remoteness of Gagaku and Bugaku from the ordinary experience of most people, including scholars; (iv) a series of modern reconceptualizations of Gagaku, first as an "imperial" tradition (which resulted in occluding its non-imperial, and broadly religious, aspects), then its re-appropriation by Shintō shrines (as Shintō ceremonial music), and more recently, its reconfiguration as an "art form" (music to be listened to at a theater or in digital formats).
In any case, new territories for inquiry are wide open before us: music and the sacred (especially, the musical dimension of ceremonies and various elaborations on the metaphysics of music), the agency of musicians in the construction and continuation of Buddhist forms of music, music and materiality (the imaginaire associated with musical instrument, the role of music notations, the range of objects connected with musical performances), and more broadly, the place of the sensorium in the study of medieval Japanese religions. For a study of the religious dimensions of Kagura, see also (Suzuki 2001, pp. 1-195 For a discussion on the increase in private ceremonies at court, with a special emphasis on religious rituals, see (Hayami 1975). 4 On this aspect of court activities, see (Abe 2011). 5 For a discussion of this subject, see . 6 For the Sutra of the Questions by Druma, King of the Kim . nara (Skt. Druma-kinnara-rāja-paripr . cchā-sūtra), see (Dashu jinnaluo wang suowen jing (Jp. Daiju kinnara-ō shomon-gyō) 大樹緊那羅王所問経, T, 625, 15, translated by Kumārajīva (344-413) in the early fifth century. For a full translation into English, based on the Tibetan version (which closely follows the Chinese version), see Dharmachakra Translation Committee (2020). For a discussion of this scripture, see ). An earlier translation by Lokaks . ema (second century) also exists, entitled Fo shuo Dun zhenduoluo suowen rulai sanmei jing (Jp. Bussetsu Don shindara shomon nyorai sanmai kyō) 仏説伅真陀羅所問如来三昧経 (Meditation sutra on the questions to the Tathāgata by the Kim . nara Druma), T, 624, 15, which makes this one of the very early Buddhist scriptures translated into Chinese, and also one of the earliest remaining Mahayana scriptures.

7
In China, Korea, and Vietnam, there was a clear distinction in the kinds of music performed, respectively, at Confucian ceremonies, at court banquets, and temple music. In Japan, the original repertory of Gagaku seems to have been a mix of banquet music at the Tang court and pre-Tang music probably performed at Buddhist temples in China and perhaps elsewhere in the Asian mainland. 8 On the musical theory of Gagaku, see (Endō 2013, esp. pp. 134-63;Garfias 1975). 9 The sound sōjō (equivalent to a Western G) is in fact not the third but the fourth degree in the scale that begins with the sound ichikotsuchō (equivalent to D). 10 The authorship of this text is contested. For an overview of available evidence and related problems, see (Tashiro 2012, pp. 263-66).

11
For a selection of important texts about the medieval Japanese correlative system, see (Abe 2017); for a discussion of its epistemic tenets, see . 12 For an account of the medieval correlative episteme, see (Rambelli 2013, esp. pp. 53-59; alloforms are discussed on pp. 54-56). 13 For a description of the curative powers of a specific Gagaku piece, Sokō 蘇合香, see .

17
In this context, one should note that until the Meiji period, when the composition of the ensemble was standardized in the form still used today, it was quite common to have Gagaku and Bugaku performances accompanied by various combinations of instruments. In this sense, it is possible that the Hachiman scrolls represent performance scenes that were close to contemporaneous practice. 18