I've seen birds dance to music

I think the phenomenon you describe is called “entrainment”.

If I recall correctly, there was a parrot in the Guinness Book of World Records that had the most dance moves, and research was done on the extent to which the dancing was due to human interaction.

ETA:

https://www.guinnessworldrecords.com/world-records/587385-most-dance-moves-by-a-bird

A sulphur-crested cockatoo (Cacatua galerita eleonora ) named Snowball[…]

[R]esearch conducted in 2009 and in a follow-up study published in Current Biology on 8 July 2019 suggests that there’s nothing random about the “shapes” that Snowball throws to popular music […] the researchers identified 14 distinct “dance movements”, including head banging, head shaking and foot lifting.

[…] While rhythmic synchronization has been documented in other species, including California sea lions (Zalophus californianus ) and Asian elephants (Elephas maximus ), to date parrots have demonstrated the most complex and diverse ability to “keep the beat” and move to music (i.e., dance).

The actual 2019 study:

https://www.cell.com/current-biology/fulltext/S0960-9822(19)30604-9

~Max