Understanding switching octaves in songs

Perhaps this is a solution for you: