Sonicfire Pro 5 from SmartSound has an FCPX plug-in that allows you to generate background music to your required length. The FCPX plugin was just released a couple of weeks back, but they have a decent selection of stock audio you can purchase.
Had a look at this, after reading your posting. Their website seems to be designed to confuse and to suck you in to keep spending. The "Free" software appears to be just a buying tool and then each soundtrack is like $50 or more! This may be fine for production companies, but if I am doing a Youtube video, I sure as hell not gonna spend $50 for each and every track!
The Scorefitter program that I referred to, CREATES the music, so other than buying the program, and maybe a library of its generating recipes it has no additional cost to use.
If I am mistaken about Sonicfire Pro 5, then please correct me, as I wouldn't be surprised if I misunderstood their site.
As I have got my Pinnacle Studio Ultimate 14 license, I created a virtual Windows PC on my Mac, and installed Pinnacle Studio. So now if I want to make a sound track, I just use Pinnacle/Scorefitter to make a movie of the required length with soundtrack, then I can import that into FCPX and split out the audio and trash the video.
It is a bit cumbersome but works. I would be quite prepared to buy a native Mac program to do this in FCPX, but so far I have not found a solution.