Buzzby Berkeley Robot Hokey Pokey
Task
Write a program or function to produce an ASCII art animation depicting a line of robots dancing to the lyrics of the Hokey Pokey (or Cokey, if you prefer) in the style of a Busby Berkeley number!
Example Output
Input
Accepts three arguments (assumed to be valid):
N = number of robots in the line (Min=6)
B = duration of one "beat" in milliseconds (Min=10)
D = delay in ms between successive robots (Min=0)
(In the example output above: N=8, B=380, C=75)
Specifications
N robots are shown in a row upon a stage.
One line of text from "the verse" is shown at a time beneath the stage (centred to within 1 character, and enclosed in quotation marks.)
The robots perform the actions for each line as it is shown until the verse has been repeated 5 times.
An action is performed by depicting a robot using a set of ASCII characters and waiting a specified duration before performing the next action. The duration of an action is measured in "beats". The duration of 1 beat is a number of milliseconds, B.
The first robot starts performing the actions for each line of verse immediately when the line's text is displayed.
Each subsequent robot delays starting its actions until a specific time (D) after the robot to its right (your left!) begins its actions.
Robots' depictions vary by the ASCII characters which represent a robot's "antenna", of which there are 5 possible types, distributed randomly every time the program is run.
Each type of antenna must be used by at least one robot, but the same type must not appear on any robots separated by fewer than 3 other robots. The amounts of any two types of antennae may differ by no more than 1 (e.g. 1xType_4 and 3xType_5's is illegal since 3-1>1 )
Verse and Actions
The whole verse is repeated 5 times, 1 line at a time...
Line Text Action/Beats,
---- ----------------------------- ------------------------------------
1 You put your ? in ??/4
2 You take your ? out AA/4
3 You put your ? in ??/4
4 And you shake it all about AA/1, ??/1, AA/1, ??/1
5 You do the Hokey Pokey and...
...you turn yourself around AA/1, H[1-7]/1
6 That's what it's all about! AA/4, ZZ/4
For each repetition (R) of the verse, substitute ? and ??...
R ?= ??=
-- ----------- ---
1. right foot RF
2. left foot LF
3. right hand RH
4. left hand LH
5. whole self WS
Actions and ASCII patterns
Each labelled action is represented by 5 lines of 8 ASCII symbols.
The representation of each action is as follows...
1 | 12 12 12 12 12 12 12
2 | [''] [''] [''] [''] [''] [''] \[*-]
3 | └[__]┘ └[__]┘ └[__]┘┌[__]┘ └[__]┐ ┌[__]┐ [__]\
4 | || /< >\ <\ /> / \ /|
5 |--------------------------------------------------------
|\__AA__/\__RF__/\__LF__/\__RH__/\__LH__/\__WS__/\__ZZ__/
1 | 12 12_ 34_ 34 _34 _12 12
2 | [''] [" ] [ _] [__] [_ ] [ "] ['']
3 | >[__]< [_<] [<.] <[..]> [.>] [>_] <[__]>
4 | || |\ || /| || |\ ||
5 |--------------------------------------------------------
|\__H1__/\__H2__/\__H3__/\__H4__/\__H5__/\__H6__/\__H7__/
In row 1, replace "1-4" with corresponding symbol for each antenna type...
1 | 1234 1234 1234 1234 1234
| \/\/ |┌┐| )||( |||| ┐/\┌ <-- Symbols 1-4 for...
| 1 2 3 4 5 <-- ...antenna types 1-5
Output
The entire scene must be rendered at least once immediately whenever the content of the scene changes in any way. (I.e. assuming the delay between robots' actions is > 0, the output may be rendered no less than N times per action.)
Ideally, for an animation the console or equivalent output area is cleared before each update is rendered. To provide for languages unable to clear the console, output may also be rendered in a continuous stream, subject to the same requirement described above.
Scoring
Winners are the shortest programs in each language, as well as the shortest overall.
Exception 1 Because clearing the console each render is preferable though not required, bytes used exclusively for this luxurious purpose do not count towards the total bytes. This includes commands to clear the console, and padding output with blank lines to scroll the console contents out of view.
Exception 2 CSS or effectively similar means used exclusively for the purpose of styling the output beyond the minimum requirements do not count towards the total bytes. E.g. *{color:blue;text-align:center;}
counts as only 32-10=22 bytes since color:blue;
doesn't serve to satisfy any specification, whereas centred text is specified.
Meta
Inspired by (showing my age) the TRS-80 Dancing Demon, Android Nim, and of course Busby Berkeley (and no, I'm not that old).