Silver is a different story. It ceased to be a monetary metal after the Napoleonic wars, as the world switched over to central banking. In other words, when paper money is introduced, silver is no longer necessary in coins. However, it continued to be used for prestige reasons, interrupted by times of war and revolution.
Around the 1960's, there was a huge energy crisis, as oil went from $4/barrel to $32/barrel, sliding back to a still hefty $15/barrel with a lot of volatility. This drove home that using silver (just another commodity, that had risen on the back of oil) in coins is a waste of taxpayer's money. The US was a special case, as USD was cut loose from the price of gold, making a hefty depreciation possible. If I remember correctly, USD depreciated by about a third against a basket of currencies. However, the oil crisis caused rampant inflation in a majority of developing countries, so those still using silver also quickly found out that using silver for coins is wasteful. As silver went out of fashion, most of the rest of the world followed suit. If memory doesn't deceive, Mexico - producing both oil and silver in quantity - was one of the last or the last country issuing (low grade) silver coins. I still got them in circulation around 1970.
Gold went out more quickly, because it was more harmful to the economy: it was used as an inflation hedge when war threatened. (France was infamous as a country where people would keep gold "in the mattress", even through the 1960s. The introduction of the new franc reduced the habit to small time metal trading.) This would aggravate financial market volatility: just as more liquidity was needed to face an economic crisis, retail investors would go illiquid. After the first world war, gold coins would still be struck, though they were no longer circulated, but used for small time investment. After the second world war, they were just issued to milk collectors. The only exceptions were central Asian OPEC countries, where gold was in demand for prestige purposes and - for a short period only - a loophole in the EU tax regulations.
Piano music endured all these crises. Yes, you have a large lead on me there. As a boy, I had a one octave piano and I could play "Frère Jacques"on it, though, so consider yourself warned

Peter