No, you need to use a recording program like audacity
There are two record buttons in piano-roll editor, right after the play button. They capture the melody you play on your midi or computer keyboard in real time, quantising it according to the current settings in the same window.