But this problem can be solved. We need musical instruments that remember every note. Consisting of a movement sensor to activate recording, a microphone (and potentially other sensors), an interface (USB/Wifi/Bluetooth) and perhaps music recognition capability to turn the recording into midi, sheet music or tablature. All powered by a long life battery (or perhaps piezoelectrics? or solar panels? or a kinetic energy collecting?).
As to those other sensors? Perhaps pressure sensors in the keys or fingerboards?
In addition to helping you to remember that cool little tune you just played, having a recording of everything you've every played would be useful in tracking how much you're practising, what you're practising, and how you're improving.