I have a little < $5 bell on my bars. It's just a spring-loaded plastic handle you push down and let go - it strikes the metal casing and DING! I'll pop it a couple of times to indicate my presence, with enough time to dodge the pedestrians if they wig out and do something dumb. If I can clearly see headphones in their ears, I don't bother since they're ignorant of their surroundings anyways, I just give a wide berth as I pass.
I generally signal to other cyclists because my bike is usually fairly quiet.
As a side note, I love it when I see an old squeaky MTB going down the paths and they use a bell, like you couldn't hear them coming from about a hundred feet back. lol.