GSequencer is aka. “Advanced Gtk+ Sequencer” is a libre audio and MIDI sequencer. It comes with various software synthesizers and effects. It features a piano roll, automation and wave form editor. It is extensible by plugins.
You might want to connect and configure your MIDI keyboard and assign it to an instrument and assign MIDI CC to audio processing related ports. It allows you to play and capture your MIDI key presses, which are shown in the piano roll editor.
The engine runs at a 16th pulse and supports a resolution upto a 256th. It supports MIDI 1 and 2, on macOS it defaults to MIDI 2.