Add relative mode for MIDI input

I extended MIDI input to allow for relative mode both for single notes and chords. I hope this is a helpful contribution.