"Bist du bei mir, geh ich mit Freuden" (If you are with me, I go with joy) is an aria from Gottfried Heinrich Stölzel's opera Diomedes. The aria is best known as "Bist du bei mir", BWV 508, a version for voice and continuo found as No. 25 in the 1725 Notebook for Anna Magdalena Bach.
In 1717-18 Gottfried Heinrich Stölzel was for a short time court Kapellmeister in Bayreuth. There his opera Diomedes, a.k.a. Die triumphierende Unschuld (the triumphant innocence), was premiered on . Apart from a few arias the music of this opera is lost. A version for soprano, strings and continuo of its aria "Bist du bei mir" survives in an 18th-century manuscript owned by the Sing-Akademie zu Berlin.
In 1725 Johann Sebastian Bach started the second notebook for his second wife Anna Magdalena. A version for voice and continuo of "Bist du bei mir" is among the pieces Anna Magdalena wrote down in that notebook. That version, No. 25 in the notebook, is known as BWV 508.
In an essay in the Bach-Jahrbuch 2002, Andreas Glöckner speculates that Anna Magdalena either obtained the song from the inventory of the Leipzig Opera that had gone bankrupt in 1720, or that it was simply a favourite known to nearly everyone in Leipzig that was particularly suitable for Hausmusik.
The continuo part of the BWV 508 version of "Bist du bei mir" is more agitated and continuous in its voice leading than that of the extant orchestral version of the aria. It is unknown who provided the BWV 508 arrangement, but it is usually assumed to have been Johann Sebastian Bach.
The text of the aria, by an unknown author, is:
Bist du bei mir, geh ich mit Freuden
If you are with me, then I will go gladly
When thou art near, I go with joy
The aria, in the voice and continuo version found in the second notebook for Anna Magdalena Bach, was published as Johann Sebastian Bach's by the Bach Gesellschaft in the second half of the 19th century. Around 1915 Max Schneider discovered Stölzel's orchestral version of the aria, along with four other arias by Stölzel, in an 18th-century manuscript conserved in the library of the Berlin Sing-Akademie. In World War II the archive of the Sing-Akademie went lost.
In 1950 Wolfgang Schmieder listed "Bist du bei mir" as a composition by Bach in the first edition of the Bach-Werke-Verzeichnis, assigning it the number 508 in that catalogue. In 1957 the aria was published in the New Bach Edition, where its editor, Georg von Dadelsen, mentioned the lost orchestral version in the Critical Commentary volume. The 1998 edition of the Bach-Werke-Verzeichnis kept "Bist du bei mir" in the main catalogue (i.e. without moving it to the Anhang either of the doubtful or of the spurious works), but mentions it was based on a setting by Stölzel in an inaccessible source.
In 1999 the lost archive of the Sing-Akademie zu Berlin was recovered in Kiev. Nonetheless the manuscript with the five Stölzel arias was still considered lost as late as 2006. That same year the manuscript was however described in a publication by the Bach Archive, edited by Wolfram Enßlin. In 2009 a full catalogue of the Sing-Akademie's archive was published, in which the manuscript containing the five arias by Stölzel is indicated as SA 808. By this time "Bist du bei mir" and the four other arias of the SA 808 manuscript were identified as belonging to Stölzel's opera Diomedes. The archive of the Sing-Akademie was transmitted to the Berlin State Library, which made a facsimile of the manuscript containing the Diomedes arias available on their website.
"Bist du bei mir" has become a very popular choice for wedding ceremonies and other such occasions. The question whether the perception and popularity of the piece would have been affected if it would have been identified as Stölzel's in an earlier stage remains unanswered. Recordings of "Bist du bei mir" include Elisabeth Schwarzkopf's 1954 recording at Abbey Road Studios with pianist Gerald Moore, and Natalie Dessay's and Rolando Villazón's recording, with an accompaniment for piano, violins, and cello arranged by Philippe Rombi, for the 2005 film Joyeux Noël.