Tuning the MIDI output in Herz

This snippet can be used to tune the MIDI output so that the A has an arbitrary frequency expressed in Hertz. For example, 440 Hz is the most common tuning, and 415 Hz is a typical baroque tuning.