The limits are not really about the duration of a single note, it is also possible to add instead of single notes some voice sample, or a conversation, or even a full song as those can last several minutes.
The limitation are the number of sound that a single speaker can play, if you use "polyphony", then a single pulse sent to a speaker can trigger a sample to be played, the next pulse, a second one, from the same speaker, the 3rd one and so on, but if the notes are too long, the first one is still playing and maybe the 8th or 9th will not trigger a new note because the speaker is busy playing different notes already, i'm not sure exactly how many.
The other limitation is the number of sound the game can play, if you use 4324234835 speaker, it will not work, some of them won't be allowed to play. The number is much lower, but i don't know it precisely, it's "audible" when you have maybe 200 or 300 speakers that would each be playing 10 notes ? then some of them just don't play.
Hopefully that gives indication on the difference in usage between "with" and "without" pedal for the piano, the longer sample cause 1 speaker to be allowed to play a "new note" less often, or a player need more speakers to play the same melody.
For the sample of sounds there is something like this : https://github.com/IAmTomaton/musical-speaker-fixed/releases/tag/v1.0.3 which contain a lot of instruments, the whole MIDI family that was part of this mod that has not been updated : https://mods.factorio.com/mod/musical-speaker-fixed there are several pianos !
But for the instrument already published and the future piano i plan to use "FL studio" and then inside synthetizer like Serum or Sytrus or VST plugins. There exist open source or "free" alternative to "FL studio", it just needs to be able to play the notes from a MIDI file ideally. I have made one such MIDI pianoroll setup already where it plays all the notes of the keyboard 1 by 1, and i just have to change the instrument , or the EQ, add filters ( with or without pedal) , adapt mastering and BPM, it creates a .mp3 file that is a few minutes long of a very boring song.
This i import in audacity, where i'm using something like a subtitle template with already all the labels of the notes , adjust the BPM to the same as in FL studio so they fit perfectly with the mp3 if the samples are longer or shorter. There's a few steps here and there to make sure the notes are tuned properly and the label actually match the notes, like looking with the spectrogram in audacity to spot mistakes and plugins in FL studio to detect the pitch of the samples shows when there are 96 notes some are not properly tuned like at the very end of the keyboard .They are not really sound that can be used for music, they just help the structure of the instrument identical. This help to export in .ogg every file in a row with proper naming scheme to put them in a mod easily.
I guess i'll make a few pictures to describe the process, i'm learning how to do those, I'm not too sure i'm doing it right , i'm very new to attempting to make music x)