The cold, hard truth: If the bot writes the whole song, it belongs to the public. Here is the legal secret to locking it down.