A 17th century mansion has hit the market for just under £5m – complete with a stunning music room modelled on the Alhambra.