Opera 1.0 in French

I set up the first version of the opera program.  Right now it is in French, and only has Wagner’s Die Walkure, and Puccini’s Madame Butterfly, but it will have more.  Both of these operas are quite emotionally interesting.  The opera txt files should be placed in a directory called opera.

Having to use a windows box for the upload so the accents won’t come through.  Try it anyway!

Update: here´s the version with accents.  Also, I added a little from Otello.  The 3 opera files are at the bottom.

# opera.sh v.1.0 a program submitted by livedoggb on 6/1/2012
# dependencies compiled random1.c, and intdiv2float.c and opera directory with a txt file called 01 Butterfly-Puccini.txt 02 Otello-Verdi.txt …
# itunes directory named musique française with songs that you want to use sequentially numbered 01 …, 02 …, 03 … etc.
# not yet implemented: itunes directory named opera highlit with audio tracks of the opera quotes made by you named french-nouns01.avi, french-nouns33.avi, etc.
# with the number corresponding to the line number of the noun in the text file.
# It also outputs a file sommaire.out that has the statistics of your session.

function trim_line {
#num_words=$(gawk ‘{ sum += $1 }; END { print sum }’ testline.out)
while [ “$words_left” != “” ]
j=$(( $i + 7 ))
words_left=$( echo $line | cut -d’ ‘ -f$i-$j )
echo $words_left
i=$(( $j + 1 ))

function echo_in_color_random {
color=$( $dir_path/random1 1 3 )
case “$color” in
echo -e ‘\E[47;34m'”33[1m$echo_verb33[0m”
echo -e ‘\E[47;31m'”33[1m$echo_verb33[0m”
echo -e ‘\E[47;42m'”33[1m$echo_verb33[0m”
tput sgr0


tvf=$( echo “$language”)
dir_txt_path=$( echo $dir_path/$tvf/ )
if [ -e $dir_path/sommaire.out ]
rm $dir_path/sommaire.out
#rm $dir_path/hyper-tense-files_used.out
echo “Attendez pour quelques minutes pour que le systeme arrange la base de donnee de musique.”
if [ -e $dir_path/hyper-tense-$language-time2.out ]
echo “Le programme a trouvé un fichier de temps.”
echo “1. Utilisez ce fichier.”
echo “2. En faire un nouveau fichier. Choisissez 2 si vous avez changé la musique.”
echo “Choisissez:  (Sí vous n´êtes pas sûr, choisissez 2.  Le default c´est 2.)”

read choice
if [ -e $choice ]
case “$choice” in
echo “On utilise le vieux fichier.”
echo “On construit un autre fichier.  Ça prendra quelques minutes.”
echo “0” > $dir_path/hyper-tense-$language-time2.out
mplayer -msglevel all=-1 -profile gnome-mplayer -ss 10 -endpos 1 -volume 0 /mnt/sda1/Documents\ and\ Settings/TEMP/My\ Documents/My\ Music/iTunes/iTunes\ Media/Music/opera/[0-9]*\ *.m4a | tee temp.out | grep “^A: ” | sed -e “s/^A: .* of \([0-9]*\).* .*/\1/g” >> $dir_path/hyper-tense-$language-time2.out

time_array=($(cat $dir_path/hyper-tense-$language-time2.out))
num_files=$(expr $(grep -c . $dir_path/hyper-tense-$language-time2.out))

while [ $i -lt $num_files ]
echo “$i. ${time_array[$i]}”
i=$(( $i + 1 ))
num_files=$(( $num_files – 1 ))
echo “num_files=” $num_files
echo “Plusieurs options sont possibles.  Choisissez.”
echo “1.  Option Entrainement (trouver le mot).”
echo “2.  Option Quiz (interactif).”
read choice
echo  “Avec parôles? Choisisez o ou n.  Default c´est non.”
read read_aloud
if [ -e $read_aloud ]

case “$choice” in
echo “Option Entrainement.”
echo “Option Quiz.”
echo “Tout information derive des fichiers .txt dans le dossier $language.”
num_vfiles=$(expr $(ls -1  $dir_txt_path/*.txt | grep -c . ))
hours_bgn=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\1/”| sed “s/0\([0-9]\)/\1/” )
min_bgn=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\2/”| sed “s/0\([0-9]\)/\1/” )
sec_bgn=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\3/”| sed “s/0\([0-9]\)/\1/” )

while [ -e $c ]
random_verb_num=$( $dir_path/random1 1 $num_vfiles)
echo “random_verb_num is:” $random_verb_num
verb=$(ls $dir_txt_path/$fn*.txt | sed “s/^.*$fn \(.*\).txt/\1/” )
if [ -e $dir_txt_path/$fn*.txt ]
maxlinenum=$( grep -c . $dir_txt_path/$fn*.txt)
maxlinenum=$(( $maxlinenum – 1 ))
quizfact=$( $dir_path/random1 1 $maxlinenum)
correctquizfact=$( echo “$quizfact”c)
omit_line=$( grep “^$correctquizfact:” $dir_txt_path/$fn*.txt)
#      echo “random quiz line is:” $quizfact $correctquizfact
if [ “$omit_line” != “” ]
#noun=$( grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.*ENG:\(.*\) SENT:.*/\1/” )
#echo “Le nom c´est: ” $noun
echo “Random quiz line is:” $quizfact
if [ “$choice” == “2” ]
testline=$( grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.*QUESTION:\(.*\)/\1/” )
testline=$( grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.*QUESTION:\(.*\)/\1/” )
asked=$(( $asked + 1 ))
while [ -e $verb_guess ]
echo “Donnez la réponse correcte (mettez s pour en sortir):”
read verb_guess
if [ “$verb_guess” == “s” ]
echo_verb=$( grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^[0-9]*c: \(.*\) QUESTION:.*/\1/” )
if [ “$verb_guess” == “$echo_verb” ]
echo “Correcte.”

right=$(( $right + 1 ))
average=$(( $right/$asked ))
rightverbs=$( echo $rightverbs, $echo_verb)
num_mus=$( $dir_path/random1 1 $num_files )
num_mus_fixed=$(echo $num_mus | sed -e “s/^0//”)
prob_time=$(( ${time_array[$num_mus_fixed]} – 20 ))
ssx=($(expr $($dir_path/random1 0 $prob_time)))
mplayer -msglevel all=-1 -profile gnome-mplayer -ss $ssx -endpos 20 -volume 200 /mnt/sda1/Documents\ and\ Settings/TEMP/My\ Documents/My\ Music/iTunes/iTunes\ Media/Music/opera/$num_mus*.*


echo -n “Non.  La reponse correcte, c´est: ”
wrongverbs=$( echo $wrongverbs, $echo_verb )

if [ $read_aloud == “o” ]
if [ -e /mnt/sda1/Documents\ and\ Settings/TEMP/My\ Documents/My\ Music/$language\ highlit/$verb$quizfact.* ]
while [ $repeat == “o” ]
mplayer -volume 80 /mnt/sda1/Documents\ and\ Settings/TEMP/My\ Documents/My\ Music/$language\ highlit/$verb$quizfact.*
echo “Ecrivez la phrase entendue sur du papier.  Repetez? (o ou n. default c´est non.)”
read repeat
if [ -e $repeat]

shighlit=$(grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.* SENTCOMP:\(.*\).*/\1/”)
echo Comptez les fautes dans ce que vous aviez écrit. Un point pour châque mot.
echo Quel est le nombre de fautes?
read fault_number
if [ -e $fault_number ]
sum_faults=$(( $sum_faults + $fault_number ))
trans_sent=$(grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.*SENTCOMP:\(.*\)/\1/”)
shighlit=$(grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.* SENTCOMP:\(.*\).*/\1/”)
#echo “Maintenant, finissez par lire à haute voie la ligne au-dessus.”
echo “numero de la ligne c´est:” $quizfact
#echo $testline | sed “s/.*(\(.*\)).*/\1/”
#echo $testline | sed “s/(.*)/$echo_verb/”
#echo $trans_sent
aver_right=$( $dir_path/intdiv2float $right $asked | sed -e “s/\([0-9]*\…\).*/\1/” )
echo $right “/” $asked ” correcte.  Batting average:” $aver_right “Fautes de dictation: ” $sum_faults
echo “Attendez…je cherche une autre exemple…”
hours_end=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\1/”| sed “s/0\([0-9]\)/\1/” )
min_end=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\2/”| sed “s/0\([0-9]\)/\1/” )
sec_end=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\3/”| sed “s/0\([0-9]\)/\1/” )
hours_diff=$(( $hours_end – $hours_bgn ))
min_diff=$(( $min_end – $min_bgn ))
sec_diff=$(( $sec_end – $sec_bgn ))
if [ $hours_diff -lt 0 ]
hours_diff=$(( $(( $midnight – $hours_bgn )) + $hours_end ))
# fix hour change if it happens at midnight or noon,
time_of_ans=$(( $hours_diff * 60 + $min_diff ))
aver_time=$( $dir_path/intdiv2float $time_of_ans $((asked – 1)) | sed -e “s/\([0-9]*\…\).*/\1/” )
echo “Vous avez travailler ” $time_of_ans “minutes pour une moyenne de: ” $aver_time “minutes par question, et une somme de ” $(($asked – 1)) “questions.” | tee >>sommaire.out
echo “Les réponses correctes (” $right “):” $rightverbs  | tee >>sommaire.out
wrong=$(( $asked – $right – 1 ))
echo “Les réponses avec fautes (” $wrong “):” $wrongverbs | tee >>sommaire.out
num_entries=$(grep “^[0-9]*c:” $dir_txt_path/*.txt | grep -c .)
echo “La base de données avait ” $num_entries “données.” | tee >>sommaire.out
echo “Votre pourcentage est: ” $aver_right | tee >>sommaire.out
cat sommaire.out

Wagner´s Die Walküre as described by Wikipedia in: http:
01c: second QUESTION: Die Walküre is the ___________ of the four operas that form the cycle Der Ring des Nibelungen by Richard Wagner.
02c: Fricka QUESTION: The 2 Gods in Die Walküre are Wotan, a bass-baritone, and _________, a mezzo-soprano, who is the guardian of wedlock.
03c: Norse QUESTION: The source of the plot in Wagner´s Die Walkúre derives from 2 stories in ________ mythology: the Volsunga saga and the Poetic Edda.
04c: contralto QUESTION: Of the 9 Walkúre in Wagner´s Der Ring des Nibelungen, four are soppranos, another four are mezzo-soppranos, and the remaining one, Schwerteleite, is a _____________.
05c: souls QUESTION: The 9 Walkúre in Wagner´s Der Ring des Nibelungen, are the daughters of Wotan.  They were raised as warrior maidens who gather the ________ of fallen heroes to form an army against Alberich.
06c: tenor QUESTION: One of the 3 humans in the human love triangle of Der Ring des Nibelungen, the main male character, Siegmund, is a _________ (choose soprano, alto, tenor, or bass).
07c: Siegmund QUESTION: The original title of Die Walküre was ___________ and Sieglinde: der Walküre Bestrafung (punishment).
08c: München QUESTION: Wagner´s Die Walküre originally premiered in the Theatre Nationale ___________ on 26 June 1870 at the insistence of King Ludwig II of Bavaria.
09c: Ride QUESTION: The best-known leitmotif of Wagner´s entire Ring cycle is entitled Walkürenritt or “The ______ of the Valkyries”.
10c: sister QUESTION: Filled with drama, the plot of Wagner´s “Die Walküre”, is psychologically complex.  Siegmund is on a mission to find his twin, abducted in childhood when his mother was killed.  As an adult in flight from an attempt to defend a young girl from being forced into marriage, Siegmund unknowingly stumbles into the house of, and falls in love with, his now married _____________.
11c: husband QUESTION: In Act 1 of Wagner´s “Die Walküre¨, Sieglinde drugs her ___________, Hunding, because he reveals that, although required by custom to offer Siegmund one night´s hospitality, he is pursuing Siegmund, and must engage him in battle in the morning.
12c: father QUESTION: Called “Nothung” or needful, the sword that Siegmund withdraws from the tree trunk in the middle of Hunding´s and Sieglinde´s house in Act 1 of Wagner´s Die Walküre, fulfills a dual prophecy.  It was placed there by a man, likely the _________ of Sieglinde, during the wedding feast of the unwilling marriage of Sieglinde to Hunding.  No one has been able to remove it.  Sieglinde declares that she wants to be rescued by someone strong enough to remove it.  Siegmund removes it to fight Hunding.  Siegmund remembered being promised by Wälse, his father, that “he would find a sword when he most needed it.”
13c: Wotan QUESTION: In Act II of Wagner´s “Die Walküre”, Fricke knows that __________, a god, secretly disguised himself as the mortal Wälse in order to father Siegmund and Sieglinde.  As the guardian of wedlock, she demands punishment of his children, Siegmund and Sieglunde, who have committed incest.  Fricke´s husband, understandibly distraught, must decide between protecting Siegmund, his mortal son, and respecting his wife, a goddess, who wants both children dead.
14c: Rheingold QUESTION: At the end of “Das ____________”, Wagner´s first opera of the cycle Der Ring des Nibelungen, Wotan seduces the earth goddess Erde, to learn more about the prophesied doom.  One of the Walkúre, Brúnehilde, is the daughter of this seduction, raised with the other 8 Walkúre.
15c: sister QUESTION: In Act II of Wagner´s “Die Walküre”, Waton tells his daughter Brünnhilde to obey Fricka and ensure his son Siegmund´s death.  Brünnhilde, instead, finds Siegmund running with his ___________ Sieglinde, and tries to persuade him to leave Sieglinde to go with her to Valhalla in order to save himself.  Siegmund responds by threatening to kill both himself and Sieglinde, rather than separate.
16c: Sieglinde QUESTION: Act II of Wagner´s “Die Walküre” has a climactic battle beteen Hunding and Siegmund.  Siegmund, protected by Brünnhilde, begins to overpower Handung, when Wotan appears, destroying Siegmund´s sword with his spear.  The disarmed Siegmund is stabbed to death by Handung.  While Wotan grieves, Brünnhilde gathers up the remnants of Siegmund´s sword, and flees on horseback with ___________.
17c: husband QUESTION: At the end of Act II of Wagner´s “Die Walküre”, Sieglinde´s __________, Hunding, is struck dead by her father, Wotan, who is infuriated by his daughter Brünnhilde´s disobedience.
18c: prelude QUESTION: Act III of Wagner´s “Die Walküre” opens with a _________ containing the leitmotif Walkürenritt as the Walkúre assemble on a mountain summit, each with a dead hero in their saddlebag.  Brünnhilde arrives instead with the live body of Sieglinde.
19c: Siegmund QUESTION: In Act III of Wagner´s “Die Walküre”, Brúnnhilde begs the other Walküre for assistance with Sieglinde, pregnant by ___________ with a son who is named Siegfried.
20c: key QUESTION: The central conflict of Act III of Wagner´s “Die Walküre” is resolved when Wotan pronounces judgment on his favorite daughter Brünnhilde for her disobedience.  She sings the words ‘Der diese Liebe mir ins Herz gehaucht’ (He who breathed this love into me) in the _____ of E major, claiming to have acted according to Wotan´s true, rather than articulated, will.
21c: Siegfried QUESTION: Act III of Wagner´s “Die Walküre” ends when Loge, the demigod of fire, places a ring of fire around Brünnhilde to protect her from men who might pass by.  As punishment for her disobedience to her father, she has been stripped of her Walküre status and becomes mortal.  Wotan kisses her eyes and she falls into an enchanted slumber, only to be awakened by a man who will not fear Wotan´s spear.  This man will be ________


Puccini´s Madame Butterfly as described by Wikipedia in: http:
01c: libretto QUESTION: The Italian __________ of Puccini´s “Madame Butterfly” was written by Luigi Illica and Giuseppe Giacosa.
02c: Nagasaki QUESTION: According to one scholar, the story of Puccini´s opera “Madame Butterfly” originated in events that actually occurred in the early 1890´s in the same city where the opera is set: ___________, Japan.
03c: bass QUESTION: In Act 1 of Puccini´s “Madame Butterfly”, Ciocio-san´s uncle, a bonze, sung by a ____________ (baritone, bass, tenor, contralto, alto, mezzosoprano, soprano) finds out that Cio-Cio-san has converted from Japanese religion to Christianity to marry Pinkerton.  He curses her and orders the family to renounce her, which they do.
04c: Ciocio QUESTION: In Act 1 of Puccini´s “Madame Butterfly”, a US Naval Officer named Pinkerton marries a 15-year-old Japanese girl ________-san, a name which literally means butterfly.
05c: fancy QUESTION: In Act 1 of Puccini´s “Madame Butterfly”, the duet “Amore o grillo” meaning “Love or ______” is sung by US Naval Officer Pinkerton and Sharpless, the US Consul at Nagasaki who will marry Pinkerton to 15 year old Ciocio-san although Pinkerton admits that for him it is a marriage of convenience until he can find an American bride.  Japanese divorce laws are lax, and he is bewitched with Butterfly´s innocence, charm and beauty.
06c: prelude QUESTION:  Act 1 of Puccini´s “Madame Butterfly” opens with two musical themes, one followed by another: a short busy, fugal opening orchestral _________ followed by a second theme of more overtly Japanese character leading straight into the opening scene.
07c: un passo QUESTION: In Act 1 of Puccini´s “Madame Butterfly”, after Pinkerton´s expression of the temporal nature of the marriage arrangement to Sharpton, the soprano Butterfly is heard jubilantly declaring to her friends that she is the happiest girl in the whole world in the aria “Ancora ___ _______” which means “One step more.”
08c: Iera QUESTION: In Act 1 of Puccini´s “Madame Butterfly”, Butterfly tells Pinkerton in the aria “______ son salita tutta sola” or (“Yesterday, I went all alone”) that she converted to Christianity, “following her destiny and, full of humility, bows to Mr. Pinkerton´s God.”
09c: 1 QUESTION: Act ____ (1 2 or 3) of Puccini´s “Madame Butterfly” ends with a famous long love duet that starts with the words “Bimba, Bimba, non piangere” or “Sweetheart, sweetheart, do not weep” where Pinkerton tells Butterfly that all of her relatives and priests in Japan are not worth the tears from her eyes.
10c: Suzuki QUESTION: In Act 2 of Puccini´s “Madame Butterfly”, Butterfly´s maid called ___________ (a mezzo-soprano), keeps trying to convince Butterfly that Pinkerton, who left shortly after their marriage 3 years ago, will not come back, singing the aria “E Izaghi e Izanami”.  They are almost out of money.
11c: Un dì QUESTION: In the aria “___ bel ___” or “One beautiful day”, the most famous aria of Puccini´s “Madame Butterfly”, Butterfly describes how she plans to greet Pinkerton when he returns, not answering when he calls her, partly for fun and partly not to die from the excitement of the first meeting.  The aria is one of the most popular works in the soprano repertoire.

Otello – from Verdi based on Wikipedia http://
01c: Shakespeare QUESTION: The source for Otello, considered by many to be Verdi´s penultimate work, written for a libretto by Adrecci Biocci, derives from _______________.
02c: Iago QUESTION: In the opera Otello, the three leading roles of Desdemonna, _______, and Otello, are among Verdi´s most demanding roles, both vocally and dramatically.
03c: baritones QUESTION: Although the part of Verdi´s Otello is traditionally sung by a tenor, many famous _____________ have sung the part of Iago.
04c: Cyprus QUESTION: Verdi´s Otello is set in the late 1400´s on the island of ___________.
05c: ballet QUESTION: In 1894, Verdi composed a short ______ for a French production of Otello which takes place during the 3rd act that precedes the entrance of Ludovico.
06c: aria QUESTION: Otello stands out among his predecessors´ and contemporaries´ works because Verdi tries to do away with the traditional recitative-_________ structure of opera.
07c: strings QUESTION: Rapidly changing sixteenth notes played by the lower _______ and woodwinds create an image of a turbulent sea in the storm that dominates the opening chorus of Act 1 of Verdi´s Otello.
08c: scales QUESTION: The rising and descending _________ in the upper woodwinds represent the unpredictable patterns of the wind in the tempest in the opening chorus of Act 1 of Verdi´s Otello.
09c: brass QUESTION: Frequent interjections from the _________ and percussion portray the bolts of lightning and thunder which accompany the storm in the opening chorus of Act 1 of Verdi´s Otello.
10c: beviam QUESTION: In the drinking song “Roderigo, __________!” or “Roderigo, let´s drink”) in Act 1 of Verdi´s Otello, bassoons and low instruments depict the internal effects of alcohol upon Cassio.



This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s