The natural trumpet was originally used as a military instrument to facilitate communication (e.g. break camp, retreat, etc).
Even before the early Baroque period the (natural) trumpet had been accepted into Western Art Music. There is evidence, for example, of extensive use of trumpet ensembles in Venetian ceremonial music of the 16th century. Although neither Andrea nor Giovanni Gabrieli wrote music specifically for the trumpet, they would have been very familiar with its technical possibilities.
Later, talented players such as the early baroque composer Girolamo Fantini demonstrated that by playing in the extreme upper register and "lipping" the notes of the 11th and 13th harmonics (that is, flattening or sharpening those impure harmonics into tune with the embouchure), it was possible to play diatonic major and minor scales (and, hence, actual melodies) on a natural trumpet. The most talented players were even able to produce certain chromatic notes outside the harmonic series by this process (such as lipping a natural C down to B), although these notes were mostly used as brief passing tones. (In Germany, this technique was called Heruntertreiben, literally "driving down".) Other "impure" harmonics (such as the 7th and 14th - B on an instrument pitched in C - which are very flat) were avoided by most composers, but were sometimes deliberately used, for example, where their unusual sonic qualities would complement the accompanying text in a sacred work.
Baroque composers—such as Antonio Vivaldi, Georg Philipp Telemann, George Frideric Handel and Johann Sebastian Bach—made frequent use of trumpets in sacred, orchestral, and even solo works. Many of these trumpet parts are technically quite difficult to play on a natural instrument, and were often written with a specific virtuoso performer in mind, such as Gottfried Reiche (Bach's chief trumpeter and the subject of a famous painting of the era) or Valentine Snow, for whom Handel composed some of his more noted trumpet parts. Indeed, highly skilled trumpeters were a prized commodity in the era, held in high esteem and avidly sought after by musical patrons.
The vast majority of baroque trumpet parts were written for a natural instrument pitched in C or D, although there were occasional exceptions. J.S. Bach, for example, calls for a trumpet in B in his Cantatas Nos. 5 and 90, trumpets in E in the first version of his Magnificat and, most famously, the solo trumpet in high F in his Brandenburg Concerto No. 2.
Natural trumpets continued to be used through the Classical era and even into the early Romantic period. But changing musical styles along with a growing dearth of sufficiently capable players spelled an end to the high, florid, complicated parts typical of baroque music. A few transitional composers, such as Michael Haydn, Leopold Mozart and Johann Molter wrote concerti for natural trumpets in the early Classical era. In fact, it could be argued that the concertos of Haydn and Molter represent the zenith of the natural trumpet in terms of technical demands, containing as they do some of the highest notes ever penned for the trumpet in symphonic works (in the case of Haydn, a G above high C - the 24th harmonic on a natural instrument). However, for many decades following, most orchestral trumpet writing consisted of basic harmonic support (what many trumpeters derisively refer to as "thumps and bumps") and fanfare-like passages, with very little in the way of melody. There were a few notable exceptions, such as Mozart's Symphony No. 39 in E-flat major, where the trumpets intone the main theme of the opening movement, Haydn's Symphony No. 103 in E-flat major ("Drum Roll"), where the trumpets often outline the melody in all four movements, or Beethoven's Symphony No. 9 in which the trumpets double the melody of the famous "Ode to Joy" in the finale of the work.
After a brief attempt at developing a keyed trumpet, the instrument for which Joseph Haydn and Johann Nepomuk Hummel wrote their famous concerti, the development of the more versatile valve trumpet spelled the eventual demise of the natural trumpet in Western music, until its resurrection in the 20th century. Throughout the first half of the 19th century, the valveless, natural trumpet and the valved trumpet (also the cornet) vied for position in the orchestra, with the valved trumpet establishing a permanent position only in the second half. Even as late as 1843, for example, Wagner was writing for valveless trumpets in his opera The Flying Dutchman. In modern-day performances of Baroque and Classical works by period orchestras, the trumpets used are usually slightly altered copies of natural instruments of the period, with the addition of anachronistic nodal "tone holes" (also called "venting holes") used to more easily and accurately correct the intonation of the instrument. (There is a growing consensus to refer to these instruments as "baroque trumpets" to distinguish them from pure "natural trumpets.") The use of finger holes on reconstructions of natural trumpets is traceable to Otto Steinkopf, who early in the 20th century discovered holes on a few museum originals. However, it appears that these holes were usually placed at antinodes, and thus designed to prevent the note from sounding, rather than allowing it to be played in tune. While modern reconstructions with nodal finger holes may not be completely authentic in comparison with the originals, they nevertheless allow a close approximation of the sound of the natural trumpet (and its ability to more easily blend with other instruments in an ensemble) without the "quirks" of intonation to which modern ears are unaccustomed.
In conventional (non-period) orchestras, the highest baroque trumpet parts are usually played on the modern piccolo trumpet, an instrument that provides firm support of range, attack and intonation, while producing a brighter sound--very different from the natural trumpet the composers had in mind. The natural trumpet is differentiated from another valveless brass instrument, the bugle, in that it is nearly twice the length. This places the higher harmonics (from the 8th harmonic up, which are closer together in pitch) in a playable range, enabling the performance of diatonic melodies. The bugle, by contrast, is only useful for performing simple fanfares and military calls (such as "Taps") in a lower range (normally only utilizing the 2nd through 6th harmonics), based on the notes of a major triad. (For example, the notes B, D, and F on a bugle pitched in B.)