When a tune becomes somebody else's
Two rights in every song
Any recorded song carries at least two copyrights: the composition (melody, harmony, lyrics) and the sound recording (the specific captured performance).
A generated track cannot infringe a sound recording unless it actually reproduces the recorded audio, which is rare. It can infringe a composition, because a melody is exactly the kind of thing a model trained on melodies might reproduce.
The standard, and why it is unpredictable
Infringement of a composition generally requires access to the original and substantial similarity to it. Neither is measured in a way that produces reliable predictions.
There is no number of notes below which you are safe. Cases have turned on a handful of notes and been lost on longer passages. Prominent litigation of the last decade produced outcomes that are hard to reconcile: one high-profile case found infringement on the basis of feel and production style rather than a copied melodic line, another found no infringement on a widely-noticed similarity in a famous opening, and a substantial verdict in a third was overturned on the ground that the shared material was a commonplace musical building block.
The honest summary is that outcomes are inconsistent, expert testimony carries enormous weight, and juries respond to what sounds similar rather than to a technical analysis. This is not a criticism of the courts so much as an observation that music similarity resists formalisation.
Why a model might reproduce a melody
The memorisation mechanism from the first module applies here with unusual force. Popular songs appear in training data many times: the original, covers, live versions, remixes, karaoke tracks, tutorials, background in videos. That is exactly the duplication pattern that produces near-exact reproduction.
So the risk is not spread evenly across all music. It concentrates on the most famous melodies in the world, which are also the ones most likely to be recognised and most vigorously defended.
Some systems block prompts naming artists or songs. This reduces deliberate copying and does nothing about the accidental case, which is the one that will catch you.
What to actually do
Listen critically. Play the generated melody and ask whether it reminds you of anything. Your ear is a better first filter than any tool.
Ask other people. Melodic similarity is heard more reliably by a fresh listener than by the person who has been iterating on it for an hour.
Search it. Melody-search services and query-by-humming features in ordinary music apps will identify a close match. This takes a minute for a hook you are about to build a campaign on.
Change it if it is close. Move an interval, change the rhythm, alter the contour. Cheap now, expensive later.
Prefer generated material that has no strong hook for background use. Ambient and textural music carries almost no melodic infringement risk, because there is no melody to be substantially similar to. A great deal of what people need music for is exactly this.
Keep the record. Prompt, model, date, and the generated file. If a claim ever arrives, the ability to show what you did and when is worth a great deal.
The defence that does not exist
Say it plainly: "the model generated it" is not a defence in any jurisdiction. Liability for publishing an infringing work falls on the publisher. Whether the model's developer is also liable is a separate question that the courts are working through, and their answer will not remove your exposure for what you published.
Nor is a vendor's indemnity a substitute for care. Indemnities have conditions — you must have used the service as intended, not modified the output, notified promptly, allowed the vendor to control the defence — and the final module goes through what they typically cover and what they do not.
The unsettled part: what happens when a model produces a melody that is substantially similar to an existing one without any human intending it. The composition was not copied by a person, and it was learned from a corpus that included the original. Nobody has a settled answer to how the traditional access-and-similarity test applies to that, and the first cases to test it directly will be worth watching.
The one thing to keep
Music infringement can turn on a few seconds of melody, the standards are inconsistent and unpredictable, and "a model generated it" is not a defence anywhere.
Before you move on
A generated instrumental hook sounds strongly reminiscent of a well-known song. Which response is best supported by how the risk arises?
Pick the one you would defend. Nobody sees your answer.