The first Ragtime composition to be published was "La Pas Ma La" in 1895. It was written by minstrel comedian Ernest Hogan. The following year in 1896, Ben Harney composed the song "You've Been a Good Old Wagon But You Done Broke Down". The composition was a hit and helped popularize the genre. 
Ragtime was also a modification of the march style popularized by John Philip Sousa, with additional polyrhythms coming from African music. Ragtime composer Scott Joplin (ca. 1868-1917) became famous through the publication of the "Maple Leaf Rag" (1899) and a string of ragtime hits such as "The Entertainer" (1902), although he was later forgotten by all but a small, dedicated community of ragtime aficionados until the major ragtime revival in the early 1970s. For at least 12 years after its publication, "Maple Leaf Rag" heavily influenced subsequent ragtime composers with its melody lines, chord progressions or metric patterns.
In a 1913 interview published in the black newspaper New York Age, Scott Joplin asserted that there had been "ragtime music in America ever since the Negro race has been here, but the white people took no notice of it until about twenty years ago [in the 1890s]."
Ragtime quickly established itself as a distinctly American form of popular music. Ragtime became the first African-American music to have an impact on mainstream popular culture. Piano "professors" such as Jelly Roll Morton played ragtime in the "sporting houses" (bordellos) of New Orleans. Polite society embraced ragtime as disseminated by brass bands and "society" dance bands. Bands led by W. C. Handy and James R. Europe were among the first to crash the color bar in American music. The new rhythms of ragtime changed the world of dance bands and led to new dance steps, popularized by the show-dancers Vernon and Irene Castle during the 1910s. The growth of dance orchestras in popular entertainment was an outgrowth of ragtime and continued into the 1920s. Ragtime also made its way to Europe. Shipboard orchestras on transatlantic lines included ragtime music in their repertoire. James R. Europe's 369th Regiment band generated great enthusiasm during its 1918 tour of France.
Ragtime was an influence on early jazz; the influence of Jelly Roll Morton continued in the Harlem stride piano style of players such as James P. Johnson and Fats Waller. Dance orchestras started evolving away from ragtime towards the big band sounds that predominated in the 1920s and 1930s when they adopted smoother rhythmic styles.
There have been numerous revivals since newer styles supplanted ragtime in the 1920s. First in the early 1940s, many jazz bands began to include ragtime in their repertoire and put out ragtime recordings on 78 rpm records. A more significant revival occurred in the 1950s as a wider variety of ragtime genres of the past were made available on records, and new rags were composed, published, and recorded. In 1971 Joshua Rifkin released a compilation of Joplin's work which was nominated for a Grammy Award.
In 1973 The New England Ragtime Ensemble (then a student group called The New England Conservatory Ragtime Ensemble) recorded The Red Back Book, a compilation of some of Joplin's rags in period orchestrations edited by conservatory president Gunther Schuller. It won a Grammy for Best Chamber Music Performance of the year and was named Top Classical Album of 1974 by Billboard magazine. The movie The Sting (1973) brought ragtime to a wide audience with its soundtrack of Joplin tunes. The film's rendering of "The Entertainer", adapted and orchestrated by Marvin Hamlisch, was a Top 5 hit in 1975.
Ragtime - with Joplin's work at the forefront - has been cited as an American equivalent of the minuets of Mozart, the mazurkas of Chopin, or the waltzes of Brahms. Ragtime also influenced classical composers including Erik Satie, Claude Debussy, and Igor Stravinsky.
Ragtime originated in African American music in the late 19th century and descended from the jigs and march music played by African American bands, referred to as "jig piano" or "piano thumping".
By the start of the 20th century, it became widely popular throughout North America and was listened and danced to, performed, and written by people of many different subcultures. A distinctly American musical style, ragtime may be considered a synthesis of African syncopation and European classical music, especially the marches made popular by John Philip Sousa.
Some early piano rags are entitled marches, and "jig" and "rag" were used interchangeably in the mid-1890s. Ragtime was also preceded by its close relative the cakewalk. In 1895, black entertainer Ernest Hogan composed two of the earliest sheet music rags, one of which ("All Coons Look Alike to Me") eventually sold a million copies. The other composition was called "La Pas Ma La", and it was also a hit.
As black musician Tom Fletcher said, Hogan was the "first to put on paper the kind of rhythm that was being played by non-reading musicians." While the song's success helped introduce the country to ragtime rhythms, its use of racial slurs created a number of derogatory imitation tunes, known as "coon songs" because of their use of racist and stereotypical images of blacks. In Hogan's later years, he admitted shame and a sense of "race betrayal" from the song, while also expressing pride in helping bring ragtime to a larger audience.
The emergence of mature ragtime is usually dated to 1897, the year in which several important early rags were published. In 1899, Scott Joplin's "Maple Leaf Rag" was published and became a great hit and demonstrated more depth and sophistication than earlier ragtime. Ragtime was one of the main influences on the early development of jazz (along with the blues). Some artists, such as Jelly Roll Morton, were present and performed both ragtime and jazz styles during the period the two styles overlapped. He also incorporated the Spanish Tinge in his performances, which gave a habanera or tango rhythm to his music. Jazz largely surpassed ragtime in mainstream popularity in the early 1920s, although ragtime compositions continue to be written up to the present, and periodic revivals of popular interest in ragtime occurred in the 1950s and the 1970s.
The heyday of ragtime occurred before sound recording was widely available. Like classical music, and unlike jazz, classical ragtime had and has primarily a written tradition, being distributed in sheet music rather than through recordings or by imitation of live performances. Ragtime music was also distributed via piano rolls for player pianos. A folk ragtime tradition also existed before and during the period of classical ragtime (a designation largely created by Scott Joplin's publisher John Stillwell Stark), manifesting itself mostly through string bands, banjo and mandolin clubs (which experienced a burst of popularity during the early 20th century) and the like.
A form known as novelty piano (or novelty ragtime) emerged as the traditional rag was fading in popularity. Where traditional ragtime depended on amateur pianists and sheet music sales, the novelty rag took advantage of new advances in piano-roll technology and the phonograph record to permit a more complex, pyrotechnic, performance-oriented style of rag to be heard. Chief among the novelty rag composers is Zez Confrey, whose "Kitten on the Keys" popularized the style in 1921.
Ragtime also served as the roots for stride piano, a more improvisational piano style popular in the 1920s and 1930s. Elements of ragtime found their way into much of the American popular music of the early 20th century. It also played a central role in the development of the musical style later referred to as Piedmont blues; indeed, much of the music played by such artists of the style as Reverend Gary Davis, Blind Boy Fuller, Elizabeth Cotten, and Etta Baker could be referred to as "ragtime guitar."
Although most ragtime was composed for piano, transcriptions for other instruments and ensembles are common, notably including Gunther Schuller's arrangements of Joplin's rags. Ragtime guitar continued to be popular into the 1930s, usually in the form of songs accompanied by skilled guitar work. Numerous records emanated from several labels, performed by Blind Blake, Blind Boy Fuller, Lemon Jefferson, and others. Occasionally ragtime was scored for ensembles (particularly dance bands and brass bands) similar to those of James Reese Europe or as songs like those written by Irving Berlin. Joplin had long-standing ambitions of synthesizing the worlds of ragtime and opera, to which end the opera Treemonisha was written. However, its first performance, poorly staged with Joplin accompanying on the piano, was "disastrous" and was never performed again in Joplin's lifetime. The score was lost for decades, then rediscovered in 1970, and a fully orchestrated and staged performance took place in 1972. An earlier opera by Joplin, A Guest of Honor, has been lost.
The rag was a modification of the march made popular by John Philip Sousa, with additional polyrhythms coming from African music. It was usually written in 2/4 or 4/4 time with a predominant left-hand pattern of bass notes on strong beats (beats 1 and 3) and chords on weak beats (beat 2 and 4) accompanying a syncopated melody in the right hand. According to some sources the name "ragtime" may come from the "ragged or syncopated rhythm" of the right hand. A rag written in 3/4 time is a "ragtime waltz."
Ragtime is not a meter in the same way that marches are in duple meter and waltzes are in triple meter; it is rather a musical style that uses an effect that can be applied to any meter. The defining characteristic of ragtime music is a specific type of syncopation in which melodic accents occur between metrical beats. This results in a melody that seems to be avoiding some metrical beats of the accompaniment by emphasizing notes that either anticipate or follow the beat ("a rhythmic base of metric affirmation, and a melody of metric denial"). The ultimate (and intended) effect on the listener is actually to accentuate the beat, thereby inducing the listener to move to the music. Scott Joplin, the composer/pianist known as the "King of Ragtime", called the effect "weird and intoxicating." He also used the term "swing" in describing how to play ragtime music: "Play slowly until you catch the swing...".
The name swing later came to be applied to an early style of jazz that developed from ragtime. Converting a non-ragtime piece of music into ragtime by changing the time values of melody notes is known as "ragging" the piece. Original ragtime pieces usually contain several distinct themes, four being the most common number. These themes were typically 16 bars, each theme divided into periods of four four-bar phrases and arranged in patterns of repeats and reprises. Typical patterns were AABBACCC?, AABBCCDD and AABBCCA, with the first two strains in the tonic key and the following strains in the subdominant. Sometimes rags would include introductions of four bars or bridges, between themes, of anywhere between four and 24 bars.
In a note on the sheet music for the song "Leola" Joplin wrote, "Notice! Don't play this piece fast. It is never right to play 'ragtime' fast."E. L. Doctorow used the quotation as the epigraph to his novel Ragtime.
Ragtime pieces came in a number of different styles during the years of its popularity and appeared under a number of different descriptive names. It is related to several earlier styles of music, has close ties with later styles of music, and was associated with a few musical fads of the period such as the foxtrot. Many of the terms associated with ragtime have inexact definitions and are defined differently by different experts; the definitions are muddled further by the fact that publishers often labelled pieces for the fad of the moment rather than the true style of the composition. There is even disagreement about the term "ragtime" itself; experts such as David Jasen and Trebor Tichenor choose to exclude ragtime songs from the definition but include novelty piano and stride piano (a modern perspective), while Edward A. Berlin includes ragtime songs and excludes the later styles (which is closer to how ragtime was viewed originally). The terms below should not be considered exact, but merely an attempt to pin down the general meaning of the concept.
European Classical composers were influenced by the form. The first contact with ragtime was probably at the Paris Exposition in 1900, one of the stages of the European tour of John Philip Sousa. The first notable classical composer to take a serious interest in ragtime was Antonín Dvo?ák. French composer Claude Debussy emulated ragtime in three pieces for piano. The best-known remains the Golliwog's Cake Walk (from the 1908 Piano Suite Children's Corner). He later returned to the style with two preludes for piano: Minstrels, (1910) and General Lavine-excentric (from his 1913 Préludes), which was inspired by a Médrano circus clown.
Erik Satie, Arthur Honegger, Darius Milhaud, and the other members of The Group of Six in Paris never made any secret of their sympathy for ragtime, which is sometimes evident in their works. Consider, in particular, the ballet of Satie, Parade (Ragtime du Paquebot), (1917) and La Mort de Monsieur Mouche, an overture for piano for a drama in three acts, composed in the early 1900s in memory of his friend J.P. Contamine de Latour. In 1902 the American cakewalk was very popular in Paris and Satie two years later wrote two rags, La Diva de l'empire and Piccadilly. Despite the two Anglo-Saxon settings, the tracks appear American-inspired. La Diva de l'empire, a march for piano soloist, was written for Paulette Darty and initially bore the title Stand-Walk Marche; it was later subtitled Intermezzo Americain when Rouarts-Lerolle reprinted it in 1919. Piccadilly, another march, was initially titled The Transatlantique; it presented a stereotypical wealthy American heir sailing on an ocean liner on the New York-Europe route, going to trade his fortune for an aristocratic title in Europe. There is a similar influence in Milhaud's ballets Le boeuf sur le toite and Creation du Monde, which he wrote after a visit to Harlem during his trip in 1922. Even the Swiss composer Honegger wrote works in which the influence of African American music is pretty obvious. Examples include Pacific 231, Prélude et Blues and especially the Concertino for piano and orchestra.
In the early 1940s, many jazz bands began to include ragtime in their repertoire, and as early as 1936 78 rpm records of Joplin's compositions were produced. Old numbers written for piano were rescored for jazz instruments by jazz musicians, which gave the old style a new sound. The most famous recording of this period is Pee Wee Hunt's version of Euday L. Bowman's "Twelfth Street Rag."
A more significant revival occurred in the 1950s. A wider variety of ragtime styles of the past were made available on records, and new rags were composed, published, and recorded. Much of the ragtime recorded in this period is presented in a light-hearted novelty style, looked to with nostalgia as the product of a supposedly more innocent time. A number of popular recordings featured "prepared pianos", playing rags on pianos with tacks on the hammers and the instrument deliberately somewhat out of tune, supposedly to simulate the sound of a piano in an old honky tonk.
Four events brought forward a different kind of ragtime revival in the 1970s. First, pianist Joshua Rifkin released a compilation of Scott Joplin's work, Scott Joplin: Piano Rags, on Nonesuch Records, which was nominated for a Grammy Award in the Best Classical Performance - Instrumental Soloist(s) without Orchestra category in 1971. This recording reintroduced Joplin's music to the public in the manner the composer had intended, not as a nostalgic stereotype but as serious, respectable music. Second, the New York Public Library released a two-volume set of The Collected Works of Scott Joplin which renewed interest in Joplin among musicians and prompted new stagings of Joplin's opera Treemonisha. Next came the release and Grammy Award for The New England Ragtime Ensemble's recording of Joplin's Red Back Book. Finally, with the release of the motion picture The Sting in 1973, which had a Marvin Hamlisch soundtrack of Joplin tunes edited by Gunther Schuller, ragtime was brought to a wide audience. Hamlisch's rendering of Joplin's 1902 rag "The Entertainer" won an Academy Award, and was an American Top 40 hit in 1974, reaching No. 3 on May 18. Ragtime news and reviews publications during this period included The Ragtime Review (1962-1966), The Rag Times (bimonthly/sporadic, fl. 1962-2003), and The Mississippi Rag (monthly, 1973-2009).
In 1980, an adaption of E. L. Doctorow's historical novel Ragtime was released on screen. Randy Newman composed its music score, which was all original. In 1998, a stage version of Ragtime was produced on Broadway. With music by Stephen Flaherty and lyrics by Lynn Ahrens, the show featured several rags as well as songs in other musical styles.