This page uses content from Wikipedia and is licensed under CC BY-SA.
The BACH motif.
A musical cryptogram is a cryptogrammatic sequence of musical notes, a sequence which can be taken to refer to an extra-musical text by some 'logical' relationship, usually between note names and letters. The most common and best known examples result from composers using ciphered versions of their own or their friends' names as themes or motifs in their compositions. Much rarer is the use of music notation to encode messages for reasons of espionage or personal security called steganography.
Because of the multitudinous ways in which notes and letters can be related, detecting hidden ciphers and proving accurate decipherment is difficult.
From the initial assignment by Western music theorists of letter names to notes in the 9th century it became possible to reverse the procedure and assign notes to the letters of names. However, this does not seem to have become a recognized technique until the Baroque period. From the mid-19th century it has become quite common. Sporadic earlier encipherments used solmization syllables.
Syllables to solmization names
It is believed that this method was first used by Josquin des Prez in his Missa Hercules Dux Ferrarie. It was named Soggetto cavato by the later theorist Zarlino. Under this scheme the vowel sounds in the text are matched to the vowel sounds of the solmization syllables of Guido of Arezzo (where 'ut' is the root, which we now call 'do'). Thus the Latin name of the dedicatee 'Hercules Dux Ferrarie' (Ercole d'Este, Duke of Ferrara) becomes re-ut-re-ut-re-fa-mi-re, which translates as D-C-D-C-D-F-E-D in modern notation with C as 'ut'. This is used as the cantus firmus of the mass setting. Josquin's method was imitated by several of his contemporaries and successors, including Adrian Willaert and Costanzo Festa.
Letters to note names
Since the note names only cover letters A to G (reflecting the octave repetition of these names), the problem arises as to how to cipher the rest of the alphabet. Historically there have been two main solutions, which may be labelled for convenience the 'German' and the 'French' methods.
Because the development of note names took place within the framework of modes, in the German-speaking world B-flat was named 'B' and B-natural was named 'H'. The most common musical cryptogram is the B-A-C-H motif, which was used by Johann Sebastian Bach himself, by his contemporaries and by many later composers. Other note names were derived by sound, for example E-flat, 'Es' in German, could represent 'S' and A-flat the digraph 'As'.
Composers less fortunate than Bach usually seem to have chosen to ignore non-musical letters in generating their motifs. For example, Robert Schumann, an inveterate user of cryptograms, has just S-C-H-A (E-flat, C, B-natural, A) to represent himself in Carnaval. Sometimes phonetic substitution could be used, Schumann representing Bezeth by B-E-S-E-D-H. Johannes Brahms used B-A-H-S (B-flat, A, B-natural, E-flat) for his surname in the A-flat minor organ fugue, and the mixed language Gis-E-La (G-sharp, E, A) for Gisela von Arnim, among many examples.
The 'French' method of generating cryptograms arose late in the 19th century and was more akin to normal encipherment. The most popular version involved writing out the letters H-N, O-U and V-Z in lines under the original diatonic notes A-G, as follows:
so that A, H, O, and V are enciphered by note 'A', B, I, P and W by 'B' (flat or natural) and so on. This scheme was used by Jules Écorcheville, editor of the journal S.I.M., to solicit centenary commemorations of Joseph Haydn in 1909, except that he diverted the 'H' to B-natural, presumably to avoid too many repeated notes. Writing to Gabriel Fauré about the invitation, Camille Saint-Saëns said he was writing to Écorcheville asking him to prove that Y and N could signify D and G as "it would be annoying to get mixed up in a farcical business which would make us a laughing stock in the German musical world." 
The many-to-one mapping of this method makes it more difficult to extract possible motifs from the musical score than the one-to-one correspondence (apart from 'As') of the German system.
Dmitri Shostakovich used the German scheme for his personal motto D-Es-C-H (D, E-flat, C, B-natural), representing D.SCH, which appears in many of his most characteristic works. Elliott Carter featured both a cryptogram for the last name "Boulez" in his piece Réflexions (2004) and a sonic symbol of the first name "Pierre".
Cryptograms were less common in England, but Edward Elgar, who was also interested in general cryptography and puzzles, wrote an early Allegretto for his pupils the Gedge sisters using G-E-D-G-E  and part of the 'enigma' in the Enigma Variations involves cryptograms.
A more sophisticated contemporary use of musical ciphering can be found in the popular online puzzle Cicada 3301. In the puzzle, the creators use dyads (two notes) to represent letters and numbers with word spacing based on prime numbers of beats. There are two notes, both in Ionian mode. The range of the top note is limited to a major 9th and there are 4 bottom notes, thus yielding 36 combinations, enough for 26 letters and 10 numbers. This makes for a naturally musical and melodic result while still permitting entire sentences to be encrypted.
In 1947 Friedrich Smend also been suggested that Bach enciphered significant numbers through methods including repetitions of a motif, word, or phrase; the notes played on the continuo; the use of sequence; and the notes played by the accompaniment. However, Ruth Tatlow has presented evidence questioning the plausibility of Smend's claims.
During the first quarter of the 20th century, American author and occultist Paul Foster Case established an esoteric musical cryptogram for the purposes of ceremonial magick. The system was a derivative of a cipher used by an affiliated magical order called the Hermetic Order of the Golden Dawn. Each note of the 12 tone system was assigned a set of correspondences including colors, planets, zodiacal signs, and Hebrew letters. The holy names of biblical characters were translated letter by letter into a linear sequence of musical notes, so that each letter could be sung by the congregation in unison.
Ezra Sandzer-Bell has written and published two books on this subject, describing how Paul Foster Case's system of musical cryptography could be applied to songwriting. Any word can be translated phonetically into Hebrew and converted using Case's cryptogram to generate a series of notes. Sandzer-Bell's project involves the conversion of the common and Latin names of plants, trees, and mushrooms into melodies. Each song was composed by consuming the plant in tea or tincture form, then using the physical effects of the plant to determine what kind of rhythm, harmony, instruments, and dynamics to use. A lengthy demonstration and proof concept is publicly available on the author's website.
BACH motif followed by transposed version from Schumann's Sechs Fugen über den Namen B-A-C-H, op. 60, no. 4, mm. 1-3Play (help·info). Note that C and H are transposed down, leaving the spelling unaffected but changing the melodic contour.
for Alfred Schnittke and Vladimir Feltzmann, used by Alfred Schnittke in his Sonata No. 1
A, E♭, C, B♮ (= A, S, C, H) and A♭, C, B♮ (= As, C, H)
used in Schumann's Carnaval, Op. 9. He was romantically involved with Ernestine von Fricken, who came from the town of Aš, in German "Asch". Every piece in the whole cycle is based on one or other of these motifs. The letters are also the note names from 'Schumann' and he added the motif E♭, C, B, A (= S, C, H, A) so that three are displayed in breves in the section 'Sphinxes'. It has been noted that ASCH and SCHA also appear in the title of Schumann's Faschingsschwank aus Wien, Op. 26.
[A], E♭, C, B♮, B♭, E(♮), G (= [A], S, C, H, B, E, G)
for Carl Philipp Emanuel Bach with the initials of his name - Carl Philipp (Filippo) Emanuel Bach -. The motif is based on the German musical nomenclature, however the initials of the composer’s name appear partially in German and in Italian version, instead of Philipp as Filippo. The C. F. E. BACH motif appears in an unpublished Fughetta in F major of C. Ph. E. Bach, found in the Brussels Conservavorium.
for Elmira Nazirova, pupil of Dmitri Shostakovich, used in his Symphony No. 10
E♭, C, B♮, A (= S, C, H, A)
for Schumann, used in Carnaval, it is a re-ordering of that piece's A-S-C-H motif
F, A, E and F, A, F
for Frei aber einsam and Frei aber froh, "free but lonely" and "free but happy" in German; the former, his friend Joseph Joachim's motto (F-A-E Sonata), described as "more romantic" than the latter, a "gender-separatist" motto of Johannes Brahms'sSymphony No. 3
G, A, B, D, B, E, E, F, A, G, D, E (= G, A, B, Re, H, E, Le - F, A, Ug, Re, E)
for Gabriel Fauré, used by contributors to Henri Prunières' Fauré celebration in the October 1922 issue of La revue musicale (F, A, G, D had also been used 20 years earlier for "Fauré" in a collaborative string quartet)
G, A, D, E
for Niels Gade; the motif is the basis of Robert Schumann's "Nordisches Lied", No. 41 from Album for the Young, Op. 68. Its subtitle is "Gruss an G."
for the initials of the London Symphony Orchestra (=La Es Sol) and Michael Tilson Thomas (=Mi Ti Ti), used by Oliver Knussen in Flourish with fireworks. Thomas commissioned Knussen for the opening concert of his first season as principal conductor of the London Symphony Orchestra - the piece is "affectionately dedicated to Michael Tilson Thomas and the London Symphony Orchestra."
^McVeagh, Diana M. (2007) Elgar the Music Maker. Woodbridge, Suffolk: Boydell Press. p. 3. ISBN978-1-84383-295-9. "The Allegretto on GEDGE (1885) is based, Schumann-like, on the musical letters of Elgar's pupils, the Gedge sisters."