There are apps that have virtual keyboards for playing their own synths and samples, and there are apps that are controllers for sending MIDI messages to other software and hardware-- search the app store for "midi controller" to see what comes up-- but I have no experience with the latter, and the former don't generally have options for silencing their built-in synths or samples and outputting MIDI messages to some other software or hardware.