Programs that just
take raw MIDI input and figure out tempo, upbeats, meter, tuplets etc.
all on their don't exist yet. This is a top notch research problem
related to the automatic transcription of music.
Indeed, my idea was to just save the note, (C, D, E etc.) with a
standard duration. I mean, even if you play a note for three seconds
it just recognize the note and show it on the staff. Then you can
modify the duration as you like. Maybe this is a bit simpler. Or not?