Transcribing a Solo Voice Recording to Western Musical Notation

(a failed attempt)

David Prager Branner

Hacker School
11 September, 2014

Goal

  • To transcribe solo-voice melody automatically.
  • The recording is of Taiwanese “cantillation” (yínsòng 吟誦): a classical poem is read in “reading pronunciation” (different from spoken language) and the tones of the words are elaborated artistically into a melody.
  • The poem in question is the “Ballad of the Lute” (pípá xíng 琵琶行) of Bái Jūyì 白居易 (772–846), Ms. Hsü I-t‘ing 許禕娗 singing, c. 2009. The melody is that taught by Mr. Hong Zenan 洪澤南.

First listen to the opening eight lines (of eighty-eight):

Chinese text: 潯陽江頭夜送客
Taiwanese: sîm-iông-kang-thiô || iā-sòng-khek
Seeing off a guest by night
        at Sîmiông River’s edge —

 

Chinese text: 楓葉荻花秋瑟瑟
Taiwanese: hong-ia̍p te̍k-hoa || chhiu sek-sek
‘Seksek’ went the wind,
        through sweetgum leaves,
        through silver-grass blossoms —

 

Chinese text: 主人下馬客在船
Taiwanese: chú-lîn || hā-má khek chāi-sôan
The host dismounted;
        at boatside was the guest —

 

Chinese text: 舉酒欲飲無管弦
Taiwanese: kú-chiú || io̍k-ím bû-kóan-hiân
They raised their wine to drink;
        no flutes or strings there were —

 

Chinese text: 醉不成歡慘將別
Taiwanese: chuì put-sêng-hoan || chhám tsiong-pia̍t
Drunk, but not to the point of happiness —
        miserable at parting —

 

Chinese text: 別時茫茫江浸月
Taiwanese: pia̍t-sî bông-bông || kang-chhim-go̍at
Vast it seemed, at parting —
        river drenched moon —

 

Chinese text: 忽聞水上琵琶聲
Taiwanese: hut-bûn || suí-siōng pî-pâ-seng
Suddenly was heard
        the sound of a lute on the waters —

 

Chinese text: 主人忘歸客不發
Taiwanese: chú-lîn bông-kui || khek put-hoat
The host forgot about going back;
        the guest did not set off —

First attempt

  • After many experiments, I settled on WaoN) (和音 ‘harmonious notes’), an open-source command-line tool for converting convert .wav files into MIDI.
  • The WaoN output heard here was converted to MP3 via FluidSynth) using the “GeneralUser” SoundFont (lines 1-2 only). GeneralUser models the sound of the piano, and I judge it less unpleasant than most other SoundFonts for analytical purposes.

First attempt

  • Result:
  • Terrible! Tremolo in the voice and reverb in the recording lead to chords or trills in MIDI transcription. Stray notes abound.

Second attempt

  • For comparison, I also paid a professional transcriber to produce a transcription (here, lines 1-2 only).
  • Professional transcription:
  • Is this significantly better than the WaoN version? (The paid transcriber relied on Finale 2011 and professional training.)
  • It seems to me that the WaoN version is truer to the feeling of the original, though the paid transcriber’s is better for having fewer notes.

New idea

  • Can we clean MIDI with Python?
  • There are MIDI modules for Python, but I felt a purer approach would be to convert MIDI to text (using MIDICSV) and write a script to discard all but the notes with highest “note-on velocity” (playback volume and intensity). I used a priority queue to hold notes and selected the highest-velocity note at each time-tick.
  • Result: Still terrible!

Finally

  • Eventually I learned to use MuseScore, an open source program for music transcription, with export to MIDI, MXL (MusicXML), and many other formats.
  • The human brain seems to have won this round. I learned a lot by making the attempt, though.
  • Below is the MuseScore transcription and play-back (first eight lines of the poem).
Chinese text: 潯陽江頭夜送客
Taiwanese: sîm-iông-kang-thiô || iā-sòng-khek
Seeing off a guest by night
        at Sîmiông River’s edge —

Chinese text: 楓葉荻花秋瑟瑟
Taiwanese: hong-ia̍p te̍k-hoa || chhiu sek-sek
‘Seksek’ went the wind,
        through sweetgum leaves,
        through silver-grass blossoms —

Chinese text: 主人下馬客在船
Taiwanese: chú-lîn || hā-má khek chāi-sôan
The host dismounted;
        at boatside was the guest —

Chinese text: 舉酒欲飲無管弦
Taiwanese: kú-chiú || io̍k-ím bû-kóan-hiân
They raised their wine to drink;
        no flutes or strings there were —

Chinese text: 醉不成歡慘將別
Taiwanese: chuì put-sêng-hoan || chhám tsiong-pia̍t
Drunk, but not to the point of happiness —
        miserable at parting —

Chinese text: 別時茫茫江浸月
Taiwanese: pia̍t-sî bông-bông || kang-chhim-go̍at
Vast it seemed, at parting —
        river drenched moon —

Chinese text: 忽聞水上琵琶聲
Taiwanese: hut-bûn || suí-siōng pî-pâ-seng
Suddenly was heard
        the sound of a lute on the waters —

Chinese text: 主人忘歸客不發
Taiwanese: chú-lîn bông-kui || khek put-hoat
The host forgot about going back;
        the guest did not set off —

I'd be grateful for any corrections you may find to make in my transcription.

END