Sibelius or Finale are the two main music notation programs out there these days. They work in the same manner as what you described, and they use MIDI to communicate with other devices (you can save as MIDI as well). They're both rather expensive programs, but I believe Finale has a cheaper version you might want to check out.