Help me with my polyrhythms I'm a musician, and I need more polyrhythms in my life!

A polyrhythm occurs in music (and in nature) when two events (claps, notes, fireflies flashing etc.) are occurring at two different regular intervals. The two kinds of event happen a different number of times in the same interval.

If I tap with my left hand twice, and with my right hand 3 times, in the same space of time, it looks a little bit like this:

  ------
R . . .
L .  .  


The hyphens at the top denote the length of the polyrthmic pattern, which is the lowest common multiple or 2 and 3. This can be understood as the point at which the pattern repeats. 

There's also a 'metarhythm', which is the pattern produced when either hand is tapping: 

  ------
R . . .
L .  .  
M . ...


This is a simple, and very common polyrhythm, with a ratio of 3:2.

Let's just say I don't want to do a simple polyrhythm that I can work out in my head, so I need something to work it out for me. I could do it long-form on paper, or...



Rules:


Write some code to generate and display a polyrhythm diagram, as described above.
Any old language, try for the fewest bytes.
Your code takes two arguments:


Number of taps with the Left hand (positive integer)
Number of taps with the right hand (positive integer)

It will work out the length, which is the lowest common multiple for the two arguments.
The top line will consist of two whitespace characters followed by hyphens displaying the length (length * '-')
The second and third lines will show the pattern for the right and left hands:


It will start with an R or L, do denote which hand it is, followed by a space.
The interval for that hand is the length divided by it's argument.
The taps will start at the third character, denoted by any character you choose. From then on it will display the same character 'interval' characters apart.
It will not be longer than the length line.

The fourth line is the metarhythm:


It will start with an upper case M, followed by a space.
From the third character onwards, it will show a character (any character you choose) in every position where there's a tap on either the right or the left hand.

Trailing whitespace is irrelevant.




Test cases:

r = 3, l = 2 

  ------
R . . .
L .  .  
M . ...


r = 4, l = 3

  ------------
R .  .  .  .    
L .   .   .    
M .  .. . ..


r = 4, l = 5

  --------------------
R .    .    .    .                     
L .   .   .   .   .      
M .   ..  . . .  ..


r = 4, l = 7

  ----------------------------
R .      .      .      .      
L .   .   .   .   .   .   .   
M .   .  ..   . . .   ..  .


r = 4, l = 8

  --------
R . . . . 
L ........
M ........




Happy golfing!
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; ' ')