LMMS is a free cross-platform alternative to commercial programs like
FL Studio, which allow you to produce music with your computer. This
includes the creation of melodies and beats, the synthesis and
mixing of sounds, and arranging of samples. You can have fun with
your MIDI-keyboard and much more; all in a user-friendly and modern
interface.

jack and fluid-soundfont are optional but highly recommended.
libgig, carla, stk, and portaudio are optional dependencies.
