Fix #28781 and avoid selection.firstTick() segfault

This makes MIDI input while concert pitch is off result in appropriately transposed notes. I've also transposed the echoing of the MIDI input, as otherwise we play a different note based on whether 'Note Input Mode' is on or off, which is probably quite unexpected. Finally I've made a selection in list mode return valid (or invalid) ticks in tickStart and tickEnd, as otherwise I was triggering a segfault.