I think you're into an interesting aspect about licensing here, because if my understanding is correct, purchasers of BB/RB are free to sell their compositions. To the extent that the material itself is in the public domain (of which I would imagine most RealBook tunes are not) - then it would be perfectly legal.

For those tunes that are not in the public domain - then I would imagine the issue would be that of not paying royalties to the copyright owners of each song, but NOT for the generation of the music.

There are many more knowledgeable than I about such things. I hope to learn more and if appropriate be corrected regarding the angle I presented.