Topic: A pin beeper engine on ESP32
An interesting approach to the same problem with whole different tools and mindset:
https://habr.com/ru/companies/timeweb/articles/835798/
The article is in Russian only, and I can't get Google Translate to pick it up by some reason, but many example sounds are there.