Lodovico Giustini wrote the first ever piano sonatas for the instrument invented by Bartolomeo Cristofori
One of the main disadvantages of the harpsichord is its constant volume level which does not depend on the strength of the key press. This fact prompted many makers of the musical instrument to search for a new mechanism of the sound extraction, especially when composers during the transition from the Baroque to the Classical period began to pay special attention to the loudness of various parts of the pieces.
The early piano received many changes over the next 100 years which—by the time of the Romantic era—formed the modern design of the instrument, but it was Bartolomeo Cristofori who defined the basic principle of volume control by striking the string with a hammer.
Cristofori 's early piano:
The earliest known music written explicitly for the piano was the work of an Italian composer Lodovico Giustini first published in 1732. His twelve keyboard sonatas, composed in an early classic style, exhibit influences of the Italian violin sonata and French harpsichord music.
Lodovico Giustini tried to adapt his sonatas to the new capabilities of the Cristofori's piano by adding the dynamic markings piano and forte which can be found in most movements.
Listen to Lodovico Giustini's Sonata in G Minor performed by Andrea Coen:
Keyboard sonatas were not something new in European music of the early 18th century since many composers thought it was time for keyboard instruments to get a solo role, but the invention of the piano action mechanism prepared the stage for another level of piano popularity, eventually making it a symbol of the Romantic era itself.