Musical cryptogram
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.

History
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 Romantic period. From the mid-19th century it has become quite common. Sporadic earlier encipherments used solmization syllables.

Systems

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.

German
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.

French
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.

20th century
A French tradition of celebratory uses developed from the Haydn centenary, with tributes to 
Gabriel Fauré by Maurice Ravel, Florent Schmitt, Charles Koechlin and others in 1922 (added to later by Arnold Bax, 1949) and to Albert Roussel by Francis Poulenc, Arthur Honegger, Darius Milhaud and others  (using various ciphering schemes) in 1929. Honegger's system involved placing the letters after 'H' under sharpened and flattened notes, an example of how chromatic cryptograms could be more easily accommodated in 20th-century music.

Olivier Messiaen developed his own full cipher, involving pitches and note lengths, for his organ work Méditations sur le mystère de la Sainte Trinité (1969).

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.

Others
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.

Summary of signature motifs

The following list includes only motifs which are known to have been used in published works.
 A, B, E, B, A
 for Aubrey Brain, used in Gordon Jacob's Sextet for Piano and Winds, which was inscribed "In memoriam Aubrey Brain"

 A, B, B, F (= A, B, H, F)
for Alban Berg and Hanna Fuchs-Robettin (A. B. and H. F.), used in Berg's Lyric Suite

A, B, E, G, G (= A, B, E, G, G)
for Meta Abegg, the fictional inspiration for Robert Schumann's Abegg Variations, op. 1

A, D, A, A, F (= A, L, A, I, N)
for Jehan Alain, used by Maurice Duruflé in his Prélude et Fuge sur le nom d'Alain (op. 7) and derived on the French system but leaving H = B-natural and starting the second line with 'I'

A, D, E, C, B, F, E (= A, D, S, C, H, F, E)
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 Arnold Schoenberg  (A. Schönberg), set 6-Z44

B, A, B, E (= B, r, A, H, m, Es)
for Brahms, used by Alfred Schnittke in his Quasi Una Sonata along with the B-A-C-H motif and other quotations, and allusions

B, A, C, B (= B, A, C, H)
for Johann Sebastian Bach

B, A, D, D, G (= H, A, Y, D, N)
for Joseph Haydn, used by Maurice Ravel in his Menuet sur le nom d'Haydn and by other contributors to the S.I.M. commemoration and derived on the French system

B, A, F (= B, La, F)
for Mitrofan Belyayev, used by Nikolay Rimsky-Korsakov, Alexander Borodin, Anatoly Lyadov and Alexander Glazunov in a string quartet

B, D, G, A, C, F (= B, Re, Gis, La, Do, Fa)
from the Russian phrase берегись Лядова (beregis' Lyadova, beware of Lyadov), used by Nikolay Myaskovsky in his String Quartet No. 3

B, E, B, A or B, A, B, E
for Béla Bartók (Béla Bartók, the latter motif recognizing the Hungarian practice of placing the family name before the personal name)

C, A, G, E
for John Cage, used by Pauline Oliveros and, in the composition CAGE DEAD, by Simon Jeffes of the Penguin Cafe Orchestra

C, F, E, B, A, C, H
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.

D, A, C, H, S
for Josef Dachs. He was a piano teacher at the Vienna conservatory. Hans Rott was probably one of his students at the conservatory when he composed his Dachs-Studie for string orchestra.

D, E, C, B (= D, S, C, H)
for Dmitri Shostakovich (D. Schostakowitsch)

E, A, C, B, E, D (= Es, A, C, H, E, Re)
for Paul Sacher, known as the Sacher hexachord

E, A, E, D, A (= E, La, Mi, Re, A)
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's Symphony No. 3

F, E, C, B (= F, S, C, H)
for Franz Schubert (F. Schubert) 

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."

G, E, A, B (= G, Es, A, H)
for Gustav Holst (Gustav Holst), used as the opening motif in the movement Uranus from The Planets.

A, E, G, E, B, B (= La, Es, Sol, Mi, Ti, Ti)
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."