Actually Jazz was formed out of Afro-Cuban music. Music influences music and evolves, but Cuban music before it was known as Salsa in New York was also was part of the formation of Jazz. Jazz music was born out of the habanera. A ferry twice a day between New Orleans and Havana brought musicians back and forth daily that were influenced by one another. The origins of Afro-Cuban jazz date from the early 20th century. The abolition of slavery in Cuba in 1886 gave origin to a large migration from the island into New Orleans. A process of cultural exchange began that led to a mixture of musical instruments and styles.
It was a fusion between the musicians in New Orleans and Havana that gave birth to modern day jazz.
Jazz started in New Orleans, but before Jazz was even Jazz and in its early stages of development in the 1800’s it was a fusion of sounds between Big Band musicians in New Orleans and Havana. It was not called Cuban Jazz in Cuba, this was a term coined by Afro-Cubans in New York City in the 1940’s and is a sub-genre of jazz.
Afro-Cuban influence: African-American music began incorporating Afro-Cuban rhythmic motifs in the 19th century when the habanera (Cuban contradanza) gained international popularity. Musicians from Havana and New Orleans would take the twice-daily ferry between both cities to perform, and the habanera quickly took root in the musically fertile Crescent City. John Storm Roberts states that the musical genre habanera "reached the U.S. twenty years before the first rag was published." For the more than quarter-century in which the cakewalk, ragtime, and proto-jazz were forming and developing, the habanera was a consistent part of African-American popular music.
Habaneras were widely available as sheet music and were the first written music which was rhythmically based on an African motif (1803). From the perspective of African-American music, the "habanera rhythm" (also known as "congo"),"tango-congo", or tango can be thought of as a combination of tresillo and the backbeat. The habanera was the first of many Cuban music genres which enjoyed periods of popularity in the United States and reinforced and inspired the use of tresillo-based rhythms in African-American music.
New Orleans native Louis Moreau Gottschalk's piano piece "Ojos Criollos (Danse Cubaine)" (1860) was influenced by the composer's studies in Cuba: the habanera rhythm is clearly heard in the left hand. In Gottschalk's symphonic work "A Night in the Tropics" (1859), the tresillo variant cinquillo appears extensively. The figure was later used by Scott Joplin and other ragtime composers.
Comparing the music of New Orleans with the music of Cuba, Wynton Marsalis observes that tresillo is the New Orleans "clavé", a Spanish word meaning "code" or "key", as in the key to a puzzle, or mystery. Although the pattern is only half a clave, Marsalis makes the point that the single-celled figure is the guide-pattern of New Orleans music. Jelly Roll Morton called the rhythmic figure the Spanish tinge and considered it an essential ingredient of jazz.
The Black Codes outlawed drumming by slaves, which meant that African drumming traditions were not preserved in North America, unlike in Cuba, Haiti, and elsewhere in the Caribbean. African-based rhythmic patterns were retained in the United States in large part through "body rhythms" such as stomping, clapping, and patting juba dancing.
In the opinion of jazz historian Ernest Borneman, what preceded New Orleans jazz before 1890 was "Afro-Latin music", similar to what was played in the Caribbean at the time. A three-stroke pattern known in Cuban music as tresillo is a fundamental rhythmic figure heard in many different slave musics of the Caribbean, as well as the Afro-Caribbean folk dances performed in New Orleans Congo Square and Gottschalk's compositions (for example "Souvenirs From Havana" (1859)). Tresillo (shown below) is the most basic and most prevalent duple-pulse rhythmic cell in sub-Saharan African music traditions and the music of the African Diaspora.
Tresillo is heard prominently in New Orleans second line music and in other forms of popular music from that city from the turn of the 20th century to present. "By and large the simpler African rhythmic patterns survived in jazz ... because they could be adapted more readily to European rhythmic conceptions," jazz historian Gunther Schuller observed. "Some survived, others were discarded as the Europeanization progressed."
In the post-Civil War period (after 1865), African Americans were able to obtain surplus military bass drums, snare drums and fifes, and an original African-American drum and fife music emerged, featuring tresillo and related syncopated rhythmic figures. This was a drumming tradition that was distinct from its Caribbean counterparts, expressing a uniquely African-American sensibility. "The snare and bass drummers played syncopated cross-rhythms," observed the writer Robert Palmer, speculating that "this tradition must have dated back to the latter half of the nineteenth century, and it could have not have developed in the first place if there hadn't been a reservoir of polyrhythmic sophistication in the culture it nurtured."