Fix globalautomationvalueat and coding style

Noticed this slight error: we have to account for the pattern's position when reading miditime values from it