It isn’t. You do have the pitch of the notes correct for the “wheels on the bus” - however, the lengths of the notes are not quite correct.
If you have a look at the notation in the screenshot, the symbols change slightly. The first note is just by itself, not connected to others, and has a ‘flag’ hanging off its ‘stem’. The next few are connected together by horizontal ‘beams’, some even connected by double beams.
These are all just ways of indicating the length of the notes, as well as their timing within a bar.
The notation in the screenshot for the “wheels on the bus” notes (the four F notes) shows that they have different lengths:
- The notes for “wheels” and “bus” both have the same representation - a solid note ‘head’, a single beam connecting them to something - so they have the same length as each other.
- The double ‘beams’ for “on the” mean that those two notes are each half as long as the notes for “wheels” and “bus”.
This gives us a clue that the Sonic Pi representations of those notes are likely to have different lengths too - or in the case of your example, different sleeps between notes, which is almost the same thing. For your code snippet, the first and last notes need to be twice as long as they currently are (ie, the first and last sleeps need to be twice as long).
From there, to translate rhythm from a musical score to Sonic Pi in general, it’s a matter of understanding what each kind of note written in musical notation means when it comes to the note’s length and timing. There are many resources for this - if you’re interested in learning more about Western music theory, there’s certainly no shortage of material! There has been a little discussion elsewhere in this forum about it:
(One particularly interesting resource mentioned in that thread is a series of musical theory ‘lessons’ laid out in PDF form, which you can download for free. It’s even available in several languages):
https://tobyrush.com/theorypages/