I think Davids solution seems pretty much what I need. But I think it needs a tweek.
The << seems to throw an error. I f I don't include it, I get the text in the right sort of
place but on bar 3 and 4 rather than 1 and 2.
It looks like you've left out the >> which closes the simultaneous music construct. (See below.)
\header {
title = "hello world"
}
\new RhythmicStaff {
\new Voice = "myRhythm" <<
{
\time 4/4
r8 r8 r8 c8 r8 c8 c8 r8
c8 r8 c8 r8 r8 c8 c8 r8
}
{
\override MultiMeasureRest #'transparent = ##t
R1-\markup { \center-align bar1 }
R-\markup { \center-align bar2 }
}
>> % need this
}