This article is related to the forthcoming publication:
Encounters between music, education and technology (Murillo, Tejada, Marín, Riaño, González, Añó, & Arnal, in press),
part of the ARTSLAB Contemporary Artistic Education series, published by Publicacions de la Universitat de València.
Once the book is published, this entry will be updated with the final details and a link to access the publication.
In a previous blog entry, we analyzed Claude’s ability to understand Lilypond code and even to invent music and technical exercises for that music, with relative success. However, the technical exercises it created, despite showing some intuition, were not useful.
In this entry, we are going to present a Claude Artifact that already knows the typical transformations used for studying fast passages where speed and evenness of notes are required. The artifact is constantly being updated, so if you want to save access to it, it is recommended to bookmark this page and access it via the following link (which will always lead to the latest version) rather than using the direct link to the artifact. You can wait a bit, keep reading to learn how it works, or try your luck and access it directly.
To illustrate how it works, we will use a simple example (from the first Hanon exercise).
A few preliminary considerations
The purpose of the artifact is to create a series of transformations on an original piece of music to help students study that fragment more effectively. It is common, especially among piano teachers, to have a repertoire of “transformations” of the musical text that one wants to study in order to achieve technical improvements that optimize the final performance. Alfred Cortot is a well-known musician and pedagogue who elevated this process to high levels of precision and thoroughness.
When presented with a fragment of music (written in Lilypond code), the artifact is able to extract the notes and apply a series of processes. Currently, the implemented processes are:
Versión 0.1 de "AI_fred CORTOT"
Transformaciones implementadas:
- Staccato
- Doble Staccato
- Acentos (grupos de 2 y de 4 notas)
- Ritmos (grupos de 2 notas)
In future updates to the artifact, other transformation techniques are expected to be implemented. If anyone would like to suggest any, they can leave their ideas in the comments.
Once the desired transformations are applied, the Lilypond code is returned, which can be used in a Lilypond reader and viewed as a musical score.
Claude’s artifact only understands Lilypond code, so the only challenge is obtaining the desired fragment in that format.
- If the fragment is short, it may be worth learning to write directly in Lilypond.
- If you have the score in musicMXL (a format readable by Musescore), Lilypond’s Frescobaldi interface can import that file, allowing you to obtain the code.
- If the score is in PDF format, you can try using Musescore’s scanning feature to obtain the musicMXL.
- If you have the file in MIDI format, Lilypond can also import it.
For the artifact to function properly, it’s best to provide the Lilypond code with only the music you want to transform (preferably in a single staff).
Once you have the code in Lilypond, you can use the note extraction feature to isolate the part of the code you want to transform, or you can directly provide the sequence of notes.
After selecting the transformations, they are presented again as note sequences. If you’re familiar with the Lilypond language, you can re-insert them into your complete text. Alternatively, you can use the function to reconstruct the entire score, which will then present you with a complete Lilypond code to use.
The final code with the exercises can be viewed in Lilypond or Hacklily.
Here’s a short video of Claude creating the artifact in its preliminary versions:
Example with Hanon
We start with the Lilypond code for the first three measures of the first Hanon exercise.
\version "2.22.1"
\header {
title = "Example"
composer = "Charles-Louis Hanon"
}
upper = \relative c' {
\clef treble
\key c \major
\time 4/4
c8-1 e-2 f-3 g-4 a-5 g-4 f-3 e-2 |
d-1 f-2 g-3 a-4 b-5 a-4 g-3 f-2 |
e-1 g-2 a-3 b-4 c-5 b-4 a-3 g-2 |
}
\score {
\new PianoStaff <<
\new Staff = "upper" \upper
>>
\layout { }
}
It is a simple example in which we can clearly identify the sequence of notes:
c8-1 e-2 f-3 g-4 a-5 g-4 f-3 e-2 |
d-1 f-2 g-3 a-4 b-5 a-4 g-3 f-2 |
e-1 g-2 a-3 b-4 c-5 b-4 a-3 g-2 |
In the artifact, we can either input all the code at the beginning (recommended if we want the artifact to return the complete score code) or simply the sequence in the second box (recommended if we understand what we are doing and are only interested in the transformed sequences to place them ourselves in the complete score code).
Once that’s done, we can choose the transformations we want to generate.
For example, for the binary rhythms transformation, it generates this sequence of notes:
c8.-1 e16-2 f8.-3 g16-4 a8.-5 g16-4 f8.-3 e16-2 |
d8.-1 f16-2 g8.-3 a16-4 b8.-5 a16-4 g8.-3 f16-2 |
e8.-1 g16-2 a8.-3 b16-4 c8.-5 b16-4 a8.-3 g16-2 |
We can easily replace this sequence with the original one in Lilypond and we would get a new score with just that sequence. But if we want more, or if we’re not comfortable copying separate parts of the code, there’s another option.
For the latter, we choose the option to rebuild the code, and the complete code can be copied directly into Lilypond.
\version "2.22.1"
\header {
title = "Title"
composer = "Composer"
}
\markup { \vspace #1 }
\markup { \bold "Original" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c8-1 e-2 f-3 g-4 a-5 g-4 f-3 e-2 |
d-1 f-2 g-3 a-4 b-5 a-4 g-3 f-2 |
e-1 g-2 a-3 b-4 c-5 b-4 a-3 g-2 |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 1: Convert to staccato" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c8-1-\staccato e-2-\staccato f-3-\staccato g-4-\staccato a-5-\staccato g-4-\staccato f-3-\staccato e-2-\staccato |
d-1-\staccato f-2-\staccato g-3-\staccato a-4-\staccato b-5-\staccato a-4-\staccato g-3-\staccato f-2-\staccato |
e-1-\staccato g-2-\staccato a-3-\staccato b-4-\staccato c-5-\staccato b-4-\staccato a-3-\staccato g-2-\staccato |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 2: Double staccato" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c32-\staccato-1 c32-\staccato-1 r16 e32-\staccato-2 e32-\staccato-2 r16 f32-\staccato-3 f32-\staccato-3 r16 g32-\staccato-4 g32-\staccato-4 r16 a32-\staccato-5 a32-\staccato-5 r16 g32-\staccato-4 g32-\staccato-4 r16 f32-\staccato-3 f32-\staccato-3 r16 e32-\staccato-2 e32-\staccato-2 r16 |
d32-\staccato-1 d32-\staccato-1 r16 f32-\staccato-2 f32-\staccato-2 r16 g32-\staccato-3 g32-\staccato-3 r16 a32-\staccato-4 a32-\staccato-4 r16 b32-\staccato-5 b32-\staccato-5 r16 a32-\staccato-4 a32-\staccato-4 r16 g32-\staccato-3 g32-\staccato-3 r16 f32-\staccato-2 f32-\staccato-2 r16 |
e32-\staccato-1 e32-\staccato-1 r16 g32-\staccato-2 g32-\staccato-2 r16 a32-\staccato-3 a32-\staccato-3 r16 b32-\staccato-4 b32-\staccato-4 r16 c32-\staccato-5 c32-\staccato-5 r16 b32-\staccato-4 b32-\staccato-4 r16 a32-\staccato-3 a32-\staccato-3 r16 g32-\staccato-2 g32-\staccato-2 r16 |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 3: Accents on odd notes" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c8-1-\accent e-2 f-3-\accent g-4 a-5-\accent g-4 f-3-\accent e-2 |
d-1-\accent f-2 g-3-\accent a-4 b-5-\accent a-4 g-3-\accent f-2 |
e-1-\accent g-2 a-3-\accent b-4 c-5-\accent b-4 a-3-\accent g-2 |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 4: Accents on even notes" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c8-1 e-2-\accent f-3 g-4-\accent a-5 g-4-\accent f-3 e-2-\accent |
d-1 f-2-\accent g-3 a-4-\accent b-5 a-4-\accent g-3 f-2-\accent |
e-1 g-2-\accent a-3 b-4-\accent c-5 b-4-\accent a-3 g-2-\accent |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 5: Accents every 4 notes (1st)" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c8-1-\accent e-2 f-3 g-4 a-5-\accent g-4 f-3 e-2 |
d-1-\accent f-2 g-3 a-4 b-5-\accent a-4 g-3 f-2 |
e-1-\accent g-2 a-3 b-4 c-5-\accent b-4 a-3 g-2 |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 6: Accents every 4 notes (2nd)" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c8-1 e-2-\accent f-3 g-4 a-5 g-4-\accent f-3 e-2 |
d-1 f-2-\accent g-3 a-4 b-5 a-4-\accent g-3 f-2 |
e-1 g-2-\accent a-3 b-4 c-5 b-4-\accent a-3 g-2 |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 7: Accents every 4 notes (3rd)" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c8-1 e-2 f-3-\accent g-4 a-5 g-4 f-3-\accent e-2 |
d-1 f-2 g-3-\accent a-4 b-5 a-4 g-3-\accent f-2 |
e-1 g-2 a-3-\accent b-4 c-5 b-4 a-3-\accent g-2 |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 8: Accents every 4 notes (4th)" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c8-1 e-2 f-3 g-4-\accent a-5 g-4 f-3 e-2-\accent |
d-1 f-2 g-3 a-4-\accent b-5 a-4 g-3 f-2-\accent |
e-1 g-2 a-3 b-4-\accent c-5 b-4 a-3 g-2-\accent |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 9: First dotted, second shortened" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c8.-1 e16-2 f8.-3 g16-4 a8.-5 g16-4 f8.-3 e16-2 |
d8.-1 f16-2 g8.-3 a16-4 b8.-5 a16-4 g8.-3 f16-2 |
e8.-1 g16-2 a8.-3 b16-4 c8.-5 b16-4 a8.-3 g16-2 |
}
}
\layout { }
}
\markup { \vspace #1 }
\markup { \bold "Transformation 10: First shortened, second dotted" }
\score {
\new Staff {
\clef treble
\key c \major
\time 4/4
\relative c' {
c16-1 e8.-2 f16-3 g8.-4 a16-5 g8.-4 f16-3 e8.-2 |
d16-1 f8.-2 g16-3 a8.-4 b16-5 a8.-4 g16-3 f8.-2 |
e16-1 g8.-2 a16-3 b8.-4 c16-5 b8.-4 a16-3 g8.-2 |
}
}
\layout { }
}
With this code generated by the artifact, we will obtain the following in Lilypond:
Video of the process: