How to make audible sound wave on piezzo buzzer?

it is very harsh

I'm not completely sure what the function does above but I see a 2000 that I assume to be Hz with a rising action.

I make my living as an audio engineer. If I want to make someone's ears bleed 2000-3000 is where I'd start. At this frequency sin waves can be more harsh than other options which, for whatever reason, sound more pleasant with upper harmonics. If you have access to square or saw I'd look at those and I'd look to get to lower frequency registers, if possible.

The frequency response of the piezo is going to be limited for sure and that may make things tricky in that you may not ever heard a fundamental frequency of 500Hz or something.