Goethe wrote the poem in 1773 or early 1774. It was first published in March 1775 in his first SingspielErwin und Elmire which was first set to music in 1775 by the German composer Johann André. In 1771, Goethe had written the poem "Heidenröslein" which tells of a young man's plucking of a feisty rose. In "Das Veilchen" it is a careless girl who destroys a violet, a metaphor for a young man's heart.
Music
This song is Mozart's only setting to a text by Goethe. It not clear where exactly Mozart encountered the poem, but is likely through one of its settings by other composers of the time. Mozart made a telling addition by adding his last line. The poem is written in three stanzas, but instead of using strophic form, Mozart creates a through-composed work, demonstrating his careful attention to the words of the poet by creating a different mood for each verse. At the end of the song, the composer recalls the opening line in a touching 5-bar coda. The piece is 65 bars long and a performance lasts about 2 1/2 minutes. Its key signature is G major; its meter is 2/4. The vocal range covers only the interval of a ninth, from F4 to G5. The piece starts with a 6-bar introduction of the melody of the first line by the piano. The first stanza takes up the next 15 bars. The entry of the shepherdess is marked by a modulation to D major; this is followed by a four-bar segment which summarises the violet's happy mood – and a general pause which precedes the mood swing of the second verse, a change of key to G minor to describe the violet's longing. There is a modulation to the relative majorB-flat major in the latter part of that verse when the violet expresses hope of being loved back, but ending in a falling phrygianlament. The narration of the third verse is a recitativo accompagnato in E-flat major culminating in the trampling of the violet which is emphasised by a following general pause. The dying flower is described by a chromatically falling line, before the final modulation back to G major changes the pain into jubilation: to die at the beloved's feet. Then Mozart adds two phrases of his own as a coda; in recitative, in free time and using only two notes: "Das arme Veilchen!", a long general pause, and closing the song a tempo with a quotation from the third line: "es war ein herzigs Veilchen."