It may be strange to think of "B-A-C-H" as a melody, given that the available musical notes we are familiar with include only A,B,C,D,E,F, and G
In the early days of European music notation (4-line staff Gregorian chant manuscripts), only the note B could be altered (i.e. have an accidental applied to it): it could be flattened, thus moving from the hexachordum durum (i.e. the hard hexachord: G-A-B-C-D-E) where it is natural, to the hexachordum molle (i.e. the soft hexachord: F-G-A-B♭-C-D) where it is flat.
The flat sign ♭ actually derives from a round b, signifying the B of the soft hexachord, that is, B flat (hence the name of the flat sign in French "bémol" from medieval French "bé mol" — modern French "bé mou" — or "soft b") and originally meant only B♭;
Both the natural sign ♮ and the sharp ♯ derive from a square b, signifying the B of the hard hexachord, that is, B natural (hence the name of the natural sign in French "bécarre" from medieval French "bé carre", earlier "bé quarre" — modern French "bé carré" — or "square b") and originally meant only B natural.
In the same way, in German music notation the letter B designates B flat while the letter H, which is actually a deformation of a square B, designates B natural.
Thus, in Johannes Sebastian Bach's homeland, his name is indeed a melody, more specifically, a cruciform melody, which Bach encoded into the last theme of the last fugue he ever wrote as a devotion to Christ.