Currently at Wuha, we are developing an app to index computer files and analyze them in our search engine.
This program works the same way as the sync app of Google Drive or Dropbox : it watches in real-time additions, deletions or changes of files and send them to the Wuha search engine.
In a first version, we were simply instantating a
ReadStream of the file. In NodeJS, a
Stream is a specific object that can read and/or write data. The
ReadStream allows then to read data on the hard drive and redirect them via HTTP on our server.
The issue with this approach is that the read stream is very fast, near the read speed of the drive, and then will saturate the internet bandwidth of the user. Here comes
Transform streams. To continue with the stream analogy, it’s like an hydroelectric dam on a river: a water stream flows in and we transform it into power. Here, data will flow, and we will apply transformations and output it in another stream.
In our case, it will be a simple dam here to the regulate the flow speed. We used the throttle library, which is an implementation of a
Transform stream counting data coming in and making regular pauses with
setTimeout to achieve the required speed.
Here is a Gist to illustrate that system:
Note that if
form-data can usually guess file metadata (name, size…) of a
ReadStream ; it’s not the case for a generic stream. You have to provide them manually for the upload to work correctly.
Thanks to simple streams manipulations, we achieved to control file upload speed and then index our users’ documents without blocking their connection.
In 2013, during my first year of Machine Learning and Data Mining Master’s Degree, I took a very interesting course about Music Information Retrieval ; a field between musicology, physics and machine learning aiming at extracting information from musical data.
We were asked to write a small report on a musical genre of our choice and explain how it could be interesting for the research in this field.
My interest for History made me to work on a forgotten genre, the air de cour, a very popular music genre at the French court and parisian salons in the XVIIth century, essentially vocal and sometimes accompanied by a lute.
Here is this report, mined from the bottom of one of my folders, which is, I believe, not without interest.
An air de cour, brilliantly interpreted by the Ensemble Faenza, to get into the mood. 🎵
In this report, we will study a specific musical genre, who were very popular in France at the royal court, between the late 16th century and early 17th, the “Air de cour”. Nearly forgotten today, we will see its features and the difficulties one may encounter to read and process these old compositions, melting scores in mensural notations, lyrics in old-fashioned French and lute tablatures.
At the end of the 16th century, France is marked by the wars of religions between Catholics and Protestants. At the end of the Renaissance, period where Europe changed completely its vision of the world, we see the emergence of a new artistic movement, trying to show the exuberance and the grandeur, the Baroque, through all the arts, and of course in music. It is in this context that appear the “Airs de cour”, a very specific musical genre, nearly forgotten today.
Air de cour
Adrian le Roy (c. 1520-1598), a french musician of the Renaissance, was the first to use the term “Air de cour” with the publication of his collection of songs “Airs de cour miz sur le luth”1 in 1571.2 This genre were very popular in France at the royal court, and more widely with the Parisian aristocracy and the “salons” until the mid-17th, making “Air de cour” a musical style placed at the border between Renaissance and Baroque periods.
“Air de cour” is essentially a vocal music genre. With time, it successively passed from solo voice to multiple voices, and again solo. It could come with no accompaniment but, usually, it is accompanied by a lute ; therefore, composers write them with the vocal melody, the lyrics in French and the lute accompaniment, as we will see.
Many composers from the late 16th century to early 17th, such as Étienne Moulinié or Bénigne de Bacilly, composed some “airs de cour”.
Figure 1: Charles Mouton, a famous luth player, by Gérard Edelinck, 1692
An “air de cour” is composed of several stanzas, each one sung on the same melody and split in two parts, the second one being repeated once more, playing the role of a chorus. The metric is quite unusual and may appear irregular for us today. Indeed, “airs de cour” were heavily influenced by the principle of “musique mesurée”3, a style trying to adapt the rhythm of the melody to the verse ; longer syllabes set to longer notes and shorter syllabes to shorter notes.
There is today few artists who recorded these musical pieces. We can however mention the work of Suzie Le Blanc4 on Moulinié’s compositions or that of Claudine Ansermet5 on Bacilly’s work. While listening, we clearly hear the two influences of the Renaissance, with the light lute accompaniment, and the Baroque, with the way of declamating the lyrics that will influence the french opera later, especially the french lyric tragedy of Lully.
Study of musical scores
As few studies were lead on this particular style, the best way to understand it is to study in more detail some scores of this time. Fortunately, some of this scores are digitized and freely available to download on the International Music Score Library Project (IMSLP), a project who tries to scan old scores on public domain and publish them to the web. We chose here to focus on the “Airs de cour miz sur le luth” by Adrien le Roy6 and on the first book of “Airs de cour” by Étienne Moulinié7.
The presentation and structure of a piece is quite similar in both books. We find the three essential elements : the melody score, the lyrics and the lute part. It is important to notice that the lute is written in the form of a tablature and not with a pitch representation. We don’t really know why, apart from the fact that this representation is quite usual for string instruments like the lute or the guitar.
Concerning the lyrics, we can say that, even if they are not in what we call usually “Old French”, they are in a old-fashioned French and with some typographic particularities ; but they are still understandable without particular knowledge.
As we stated before, “airs de cour” are at the edge of the Renaissance and the Baroque periods. This is why, in Le Roy’s book, we have a mensural notation8 whereas in Moulinié’s one, we already have a form of our modern notation, as we can see in Figure 2a and Figure 2b.
Figure 2a: Extract of a score from Adrien Le Roy (1571)
Figure 2b: Extract of a score from Étienne Moulinié (1624)
We say “a form” because, as you can see in Moulinié’s score, it is still melted with old-fashioned notations. The G clef, for instance, is quite different from its modern form.
Moreover, it seems that, in both books, metric is written with the mensural notation. As we can see in Figure 3 and Figure 4, they use unusual signs. This needs some explanations. This system is much more complex than the modern one. Indeed, it allowed to define different divisions for two following note types. For example, the division of a Breve into a Semibreve (our modern Whole), called Tempus, could be different from the division of a Semibreve into Minims (our modern Half), called Prolatio. Furthermore, each of these levels could be divided in three (“Perfect” or “Maior” ) or in two (“Imperfect” or “Minor” ). Finally, another notation, a vertical stroke through the previous signs, represents a division by two of all temporal values.
Figure 3: Detail on a metric notation from Adrien Le Roy (1571)
Figure 4: Detail on a metric notation from Étienne Moulinié (1624)
So, as we can see in Figure 4, we can say that, in this score, a Breve is divided in two Semibreves and Semibreves in two Minims. This corresponds roughly to a meter of 2/4 in our modern notation.
But this doesn’t explain the “3” that we see in Figure 3, and that we find throughout the two books. In this scores, the metric could be changed during the composition : either by inserting one of the previous signs we saw, or by inserting a numerical value, like this “3” that means that the length of the notes must be divided by three.
The “airs de cour” seems to have had little attention from the scientific community. The reasons are multiples: complete desuetude of the genre, very specific in its form (only vocal with one instrument accompanying), lack of reputation of its principal composers, lack of scores… However, thanks to the International Music Score Library Project, we can find some of this scores freely in PDF format, of variable quality though.
Today’s Music Information Retrieval’s system could help to fully digitize all this compositions and save them from a complete oblivion: technologies like Optical Music Recognition (OMR) could be used to detect and transcribe the scores. A research project could try to establish a system solving all the challenging issues we would encounter with “airs de cour” scores :
- Recognize mensural notation, or worse, semi-modern notations like Moulinié’s one ;
- Transcribe such recognized mensural notation in modern system ;
- Process the lute tablature ;
- Recognize and process the lyrics in an old-fashioned French with all its grammatical and typographical issues ; involving Optical Character Recognition technologies, and maybe even Machine Translation’s ones.