You can directly tween the music table

I haven’t experimented much with music in Codea yet. Apologies if this is a well-known hack (I searched and couldn’t see it). Or just incredibly obvious. You can directly tween Codea’s music table. You don’t even need a closure for the callback. Eg, 1-line fade-out and stop of the current playing track:

tween(7, music, {volume = 0}, tween.easing.sineInOut, music.stop)

Anyway, I was pleasantly surprised that tweening music was so straightforward, so thought I’d share.

very cool!
thanks for sharing

Wow