This was either a short anime or animated movie.
3 main characters, as far as I remember. I remember that out of the 2 boys, one was a boy who was from a different planet(dimension?). He played the piano and it had strange effects on those around him. The other boy was human. The human boy and the girl were friends. This anime probably had a school setting.
I remember there being a lot of scenes involving the alien boy going into another dimension where there was always a bed(?) that he talked to. The boy's mission was probably (not sure!) to bring humans back to his home planet...
In the end, the 2 boys decided to leave earth so that alien guy could return to his home and the girl was left behind. As soon as the boys left, the girl lost all her memories about them.
Have been searching for ages now, but I always get Piano no Mori as a result back and that's not it.
Thanks for your help!