There has been a few questions by people assuming that a computer program, doing things on its own, may be treated as if it were a sentient being.
It is not. Certainly, there are no laws which would treat it as such. A computer program is a device. It enjoys no more rights than a fountain pen.
Whoever operates the device produces a certain outcome, as they would when using any other tool. The fact that the device is sophisticated, or that the outcome is sophisticated, does not change it.
A computer program, the running of which would produce a certain specific melody, is a tool just like a mechanical piano, modified to play a certain melody when prompted to do so.
But a program, the running of which would produce a melody not known to the person running the program ahead of time, is just like a regular old piano. The fact that the person operating it may not know its internal workings does not change the fact that it's just a tool and that it is the person using the tool who is responsible for the produced outcome.