Anyone program their Arduino to have a Power-up/Power-down sound?

Hello! Has anyone done this or know how to do it? I'm trying to figure out a way to have a power-on/power-off sound that will sound with Arduino when I turn the power source on and off. I think it'd be pretty sweet! Any advice is appreciated. Thank you!

Having a power down sound requires you know when the power is down and making sure the Arduino will run for a short time after that. This requires a short term power supply. Normally this is done to write data to the eeprom on power loss so you want to look at the solution to that problem.

However I must say that this is not the sort of thing you do with an embedded processor like this.

Maybe a pure hardware solution would be better with a battery controlled hand held sound effects module.

You could power the Arduino via an external relay that you could self-latch via an Arduino output. You would need start/stop buttons or a single latching switch and external circuitry. You could have a shut sequence in the form of a function, which will play whatever sounds you want, then write the latching output low.