If I have a midi file of a public domain work, it the midi file copyrighted? This is a question that is related to this thread/question: Can I use public domain midi files commercially?
They can be, and usually would be.
If someone uses a a keyboard or other instrument that records a MIDI file, that file is protected by copyright as soon as it is saved. Or if some person or group perform a work and captures the performance with a digital recorder and saves it to a MIDI file, again that MIDI file will be protected by copyright as soon as it is recorded.
However, if an existing recording is converted into a MIDI format, the MIDI will have the same copyright as the source recording, if any. No new copyright is generated, just as there is no new copyright for making a photocopy of a book. If the original recording was PD, so will the MIDI file be.
Similarly, if a MIDI file is created directly and automatically from a score, it would have the same copyright as the score, nothing added, nothing changed. If the score is PD, so is the MIDI. But often the publisher of a score will claim a copyright on that version, even if the composition is PD. Sometimes such a claim is valid, sometimes not. It depends on how much original content the publisher added.
If a work that is under copyright is recorded in a MIDI file, the file will be subject to two copyrights, the one on the composition, and the one on the recording. And if permission is not obtained from whoever holds the copyright on the composition, this will be copyright infringement. (There are, however, some cases where the law grants an automatic license to a performer for a "cover" version of a copyrighted work.)
If a work that is PD is recorded in a MIDI file, the file will be subject to only one copyright, the one on the recording. This will initially belong to the musicians, or to their employer, depending on the agreements they have made.
In short a MIDI recording is not legally different from a recording on magnetic tape or on vinyl, or in any other medium. The copyright is on the performance, although it protects the recording.
I would say this is equivalent to asking is something typed on paper copyrighted. Yes or No, depending on the process that caused the text to be typed. If you copy a page of Shakespeare and print it out you have not produced something that can be copyrighted.
Similarly if you slavishly transliterate a score into a MIDI file you have not exercised any choices or creativity. On the other hand, if the MID file is a recording of a performance of the score then a new copyrightable thing has been created.
One program that can make a MIDI file from a score sutomatically.
I understand the following sentence:
I have a midi file of a public domain work
In the way that the composition is not protected (any longer) - maybe because the composer of the music died centuries ago.
Your question did not say which country you are living in. For this reason my answer is based on the situation in Germany. I have to clarify that I'm not a lawyer, so my answer might not be correct.
You have to distinguish between different cases:
A musician played some music on the keyboard and this was recorded as MIDI file
In this case, the musician who played the song on the keyboard is an "Ausübender Künstler" (§73 UrhG). Such a person has less rights than an "Urheber" (which would be the composer in the case of music), but he has some rights.
So the MIDI file would be protected.
Some computer program was used to play the music exactly as it was written on the sheet
In Germany, the person who engraved some musical notes has some rights on the notes. So it would not be allowed to photocopy the musical notes. However, as far as I understand it correctly, he only has the rights on the visual appearance of the notes.
(Unlike US laws) The German law explicitly lists what you are not allowed to do with some protected work without permission (copying, for example) and if some action is not listed, it is allowed. (*) "Extracting" unprotected (public domain) information from a protected work seems not to be listed.
Because the person having engraved the music only has the rights on the visual appearance, he does not have any rights on any "non-graphical" representation of the music.
(Unlike the US laws) The German law also explicitly lists who has the right on some "work". A person who stupidly types some template (here: a music sheet) into a computer and then runs some computer program (automatically building a MIDI file from the information typed in) does not have any rights on the output of the computer program (§2 UrhG).
This means that such a MIDI file would indeed not be protected.
A musician added additional voices, chords ... and some computer program was used to play the music
In this case, the song is seen as work on its own while the person who added the additional voices is the composer (§3 UrhG) and therefore an "Urheber" (who has more rights than an "Ausübender Künstler").
The MIDI file is protected.
However, I have heard that many German courts said that chords and "base lines" are not protected by law in many cases so adding a "base line" would not be enough to become a co-composer of the song.
If this is the case, the MIDI file would not be protected.
(*) Microsoft lost a lot of trials because their license conditions for various computer programs said: "You are not allowed to ..." but the law did not say that doing so requires a permission of the copyright holder.