Help me with my polyrhythms
JavaScript (ES6), 131 bytes

Outputs 0 as the tap character.



r=&gt;l=&gt;`  ${g=n=&gt;n?s.replace(/./g,(_,x)=&gt;[,a=x%(k/r),x%=k/l,a*x][n]&amp;&amp;' '):++k%l|k%r?'-'+g():`-
`,s=g(k=0)}R ${g(1)}L ${g(2)}M `+g(3)


Try it online!

How?

We use the same helper function \$g()\$ for two different purposes.

When \$g()\$ is called with no argument or an argument equal to \$0\$, it recursively builds the hyphen string of length \$k=\operatorname{lcm}(l,r)\$ with a trailing linefeed:

g = _ =&gt; ++k % l | k % r ? '-' + g() : `-\n`


This string is saved in \$s\$.

When \$g()\$ is called with \$1 \le n \le 3\$, it generates a tap string by replacing each hyphen at position \$x\$ in \$s\$ with either a space or \$0\$:

g = n =&gt; s.replace(/./g, (_, x) =&gt; [, a = x % (k / r), x %= k / l, a * x][n] &amp;&amp; ' ')