MidiKeyboard + MD

Hi, can I use a MIDI Keyboard with the MD to program faster the MID machines? Something like keep pressed the step and press a note in my Keyboard (or a chord). Can it be recorded in realtime?

Thank you for the reply, then I think only worths connect a standard MIDI controller for mute/unmute fast. Only wanted to confirm.