A great book that touches on the subject is "Musicophilia" by the late Oliver Sacks. It goes deep into the neurology of conditions like acquired savant syndrome, though the core of the book is on music-related neurological anomlaies
https://www.amazon.com/Musicophilia-Tales-Music-Revised-Expa...