This past November, I logged into Facebook and noticed a post at the top of my timeline. It was about a project called “Choral meets Machine Learning,” put together by six 18-year-old gymnasium (German high school) students who were members of the Regensburg Domspatzen (Regensburg Cathedral Choir, literally: Regensburg Cathedral Sparrows), the oldest and one of the most renowned youth choirs in the world. For the project, the students had successfully developed an AI system capable of generating Gregorian chants by training it on approximately 9,000 chants.
As I belong to a choir that sings Gregorian chants for Mass and other liturgical services at St. Gregory House, Institute for Religious Music in Tokyo, I was super curious to learn more about the project, so I contacted the Regensburger Domspatzen.
The students who developed the AI have been members of the choir since they were 10 years old (5th grade) and have grown up immersed in various forms of sacred Christian music, including Gregorian chants. Although Gregorian chants have a long history and a ton of cultural heritage, these days they’re something really only deeply known by a limited number of specialists. Because of movies, many people will know something is a Gregorian chant if they hear one, but few will know the specifics like which one it is or how it differs from another.
I asked the students how they got into this and Andreas Haberl, the student responsible for developing the code, told me that the project began with the question of how machine learning methods can contribute to preserving the tradition of Gregorian chants, “not as a substitute for human practice, but as a complementary tool.”
Andreas told me that teaching a computer to produce an original Gregorian chant is a real challenge. Gregorian chants originated before the 9th century CE and are regarded as particularly difficult to model using machine learning because they feature free-flowing melodies and modal structures. Excessive pattern learning can result in music that is overly similar to existing music. The fact that Gregorian chants are not simply music but are also (maybe primarily) an act of prayer, also contributes to the difficulty.
So how did they do it? They first prepared a dataset of about 150 chants, later expanding it to over 9,000 melodies from GregoBase, an academic and copyright-free database of medieval notation. Based on this dataset, they generated tokens that represent musical phrases and trained their AI using a Long Short-Term Memory (LSTM) model. The AI’s goal was to predict sequences in groups of forty tokens and generate new monophonic melodies. Certain parameters could be controlled, such as the degree of melismatics (how many notes are used to embellish a single syllable) and the degree of creativity. The latter was accomplished by incorporating a bigram rule into the algorithm. Bigrams are characteristic sequences of two consecutive notes that reflect typical melodic progressions in a chant. The frequency with which particular bigrams are employed can be used to describe the degree of conventionality or creativity in a melody.
By adjusting how strongly the AI takes these bigram patterns into account when composing melodies, the user can control the level of creativity. This constitutes the most technically sophisticated post-processing rule. They also implemented musical rules, such as forcing the final note to be the same as the opening note and ensuring that a final cadence is added to each chant. This final cadence guides the melody toward the final note (finalis) in order to create a sense of harmonic closure (for example, in a Dorian chant, the sequence f–e–d). To achieve this, suitable endings were extracted from the training data.
In a post-processing step, they applied criteria (music-theoretical and modal) to ensure that the resulting melodies adhered to the rules of Gregorian chants. The AI system they developed can generate chants based on GABC, a kind of programming language for Gregorian notation. Texts and neumes are entered as plain text and then converted by special software into classical square notation (An aside: neumes are a kind of musical notation found above medieval text to help the chanter remember the grouping of pitches for each syllable, rather than exact notes).
The students received the Audience Award at the Bundeswettbewerb KI (German Federal Artificial Intelligence Competition) in November 2025. They performed one of their newly AI-generated hymns entitled “Loquentes vobis,” (Latin for ‘Speaking to you”) to which they added biblical text from Ephesians 5:19 (this New Testament verse encourages people to communicate and worship through music, specifically by “speaking to one another with psalms, hymns, and spiritual songs, singing and making music in your hearts.”) The music was chanted in Regensburg Cathedral and received extremely positive feedback from renowned experts including from the Vatican, such as Father Prof. Dr. Robert Mehlhart OP (Director of the Pontifical Institute of Sacred Music).
Andreas Haberl told me about the next steps for the project:
We are currently summarizing the project in a scientific paper. At the same time, we plan to enter the project into “Jugend forscht” (Youth Research), a Germany-wide competition for young researchers. We are also applying to participate in the Ars Electronica Festival in Linz (Austria) this September. From a scientific perspective, our next goal, after completing the competitions, is to release a publicly accessible interface for generating Gregorian chants. In addition, we want to compare the performance of our current LSTM model with other AI architectures, such as transformers.
Although casual use of AI by the public has become almost commonplace over the last couple years, researchers continue to make advances in AI design. It really impressed me that a group of high school students were able to accomplish what they did. At RIKEN, we have a whole center devoted to AI research (RIKEN Center for Advanced Intelligence Project), and it even has a Music Information Intelligence Team. It seemed obvious to ask them what they thought of the project. Postdoctoral researcher Shintaro Seki was kind enough to give me a few comments.
“I felt that the overall design of the project was extremely well thought out, and that it was a project made possible precisely because it represents a collaboration between a historically established choir and computer science. By entrusting the interpretation of the score and the production of sound to a choir, who are deeply versed in church music, and limiting the role of the computer to a mechanism for obtaining musically coherent scores, the project adopts a clear division of labor.”
“This not only defines in a compact way the problems that should be addressed by computation, but also succeeds in preemptively avoiding potential criticism or controversy that might arise when approaching religious topics through the use of computers, by preserving the act of choral singing—an activity that can itself be considered religious—within the process.”
Now, let’s listen to it!
About the Regensburger Domspatzen. In 975 CE, Bishop Wolfgang founded his own cathedral school, which, in addition to general education, placed particular emphasis on musical training. This marked the birth of the Regensburger Domspatzen. With their 1050-year tradition, they are probably one of the oldest boys’ choirs in the world. Even back then, the students were responsible for liturgical singing in the bishop’s church. To this day, they are the cathedral choir of Regensburg Cathedral. They can be heard in St. Peter’s on Holy days, Sundays, and public holidays during the school year.
As I belong to a choir that sings Gregorian chants for Mass and other liturgical services at St. Gregory House, Institute for Religious Music in Tokyo, I was super curious to learn more about the project, so I contacted the Regensburger Domspatzen.
The students who developed the AI have been members of the choir since they were 10 years old (5th grade) and have grown up immersed in various forms of sacred Christian music, including Gregorian chants. Although Gregorian chants have a long history and a ton of cultural heritage, these days they’re something really only deeply known by a limited number of specialists. Because of movies, many people will know something is a Gregorian chant if they hear one, but few will know the specifics like which one it is or how it differs from another.
I asked the students how they got into this and Andreas Haberl, the student responsible for developing the code, told me that the project began with the question of how machine learning methods can contribute to preserving the tradition of Gregorian chants, “not as a substitute for human practice, but as a complementary tool.”
Andreas told me that teaching a computer to produce an original Gregorian chant is a real challenge. Gregorian chants originated before the 9th century CE and are regarded as particularly difficult to model using machine learning because they feature free-flowing melodies and modal structures. Excessive pattern learning can result in music that is overly similar to existing music. The fact that Gregorian chants are not simply music but are also (maybe primarily) an act of prayer, also contributes to the difficulty.
So how did they do it? They first prepared a dataset of about 150 chants, later expanding it to over 9,000 melodies from GregoBase, an academic and copyright-free database of medieval notation. Based on this dataset, they generated tokens that represent musical phrases and trained their AI using a Long Short-Term Memory (LSTM) model. The AI’s goal was to predict sequences in groups of forty tokens and generate new monophonic melodies. Certain parameters could be controlled, such as the degree of melismatics (how many notes are used to embellish a single syllable) and the degree of creativity. The latter was accomplished by incorporating a bigram rule into the algorithm. Bigrams are characteristic sequences of two consecutive notes that reflect typical melodic progressions in a chant. The frequency with which particular bigrams are employed can be used to describe the degree of conventionality or creativity in a melody.
By adjusting how strongly the AI takes these bigram patterns into account when composing melodies, the user can control the level of creativity. This constitutes the most technically sophisticated post-processing rule. They also implemented musical rules, such as forcing the final note to be the same as the opening note and ensuring that a final cadence is added to each chant. This final cadence guides the melody toward the final note (finalis) in order to create a sense of harmonic closure (for example, in a Dorian chant, the sequence f–e–d). To achieve this, suitable endings were extracted from the training data.
In a post-processing step, they applied criteria (music-theoretical and modal) to ensure that the resulting melodies adhered to the rules of Gregorian chants. The AI system they developed can generate chants based on GABC, a kind of programming language for Gregorian notation. Texts and neumes are entered as plain text and then converted by special software into classical square notation (An aside: neumes are a kind of musical notation found above medieval text to help the chanter remember the grouping of pitches for each syllable, rather than exact notes).
The students received the Audience Award at the Bundeswettbewerb KI (German Federal Artificial Intelligence Competition) in November 2025. They performed one of their newly AI-generated hymns entitled “Loquentes vobis,” (Latin for ‘Speaking to you”) to which they added biblical text from Ephesians 5:19 (this New Testament verse encourages people to communicate and worship through music, specifically by “speaking to one another with psalms, hymns, and spiritual songs, singing and making music in your hearts.”) The music was chanted in Regensburg Cathedral and received extremely positive feedback from renowned experts including from the Vatican, such as Father Prof. Dr. Robert Mehlhart OP (Director of the Pontifical Institute of Sacred Music).
Andreas Haberl told me about the next steps for the project:
We are currently summarizing the project in a scientific paper. At the same time, we plan to enter the project into “Jugend forscht” (Youth Research), a Germany-wide competition for young researchers. We are also applying to participate in the Ars Electronica Festival in Linz (Austria) this September. From a scientific perspective, our next goal, after completing the competitions, is to release a publicly accessible interface for generating Gregorian chants. In addition, we want to compare the performance of our current LSTM model with other AI architectures, such as transformers.
Although casual use of AI by the public has become almost commonplace over the last couple years, researchers continue to make advances in AI design. It really impressed me that a group of high school students were able to accomplish what they did. At RIKEN, we have a whole center devoted to AI research (RIKEN Center for Advanced Intelligence Project), and it even has a Music Information Intelligence Team. It seemed obvious to ask them what they thought of the project. Postdoctoral researcher Shintaro Seki was kind enough to give me a few comments.
“I felt that the overall design of the project was extremely well thought out, and that it was a project made possible precisely because it represents a collaboration between a historically established choir and computer science. By entrusting the interpretation of the score and the production of sound to a choir, who are deeply versed in church music, and limiting the role of the computer to a mechanism for obtaining musically coherent scores, the project adopts a clear division of labor.”
“This not only defines in a compact way the problems that should be addressed by computation, but also succeeds in preemptively avoiding potential criticism or controversy that might arise when approaching religious topics through the use of computers, by preserving the act of choral singing—an activity that can itself be considered religious—within the process.”
Now, let’s listen to it!
About the Regensburger Domspatzen. In 975 CE, Bishop Wolfgang founded his own cathedral school, which, in addition to general education, placed particular emphasis on musical training. This marked the birth of the Regensburger Domspatzen. With their 1050-year tradition, they are probably one of the oldest boys’ choirs in the world. Even back then, the students were responsible for liturgical singing in the bishop’s church. To this day, they are the cathedral choir of Regensburg Cathedral. They can be heard in St. Peter’s on Holy days, Sundays, and public holidays during the school year.


















