This is my reason for blasting music from my bicycle. Feels less rude than clicking a bell at the pedestrians and somewhat more effective at attracting attention.
(I have an ebike, so this is especially important. Mine is a legal one: 25 km/h max, 250 W, etc. If yours is faster, this is even more important.)
As an upside, your better get good at hill climbing as freewheeling or backpedaling up hill takes some practice.