Using a sketch for a 16Mhz processor on an 8Mhz mini 198

I am reading MIDI data using Nick Gammon’s MIDI_decoder sketch on a ProMini168 (the 3V type) running at 8 mhz. The sketch assumes a 16 mhz clock.

The sketch is fine - well, it’s working quite well, but clearly can’t “get” all the data, for instance I don’t get NoteOn’s, but I get NoteOff’s, program changes etc, there’s generally just some data missing.
Is there a variable I can change here to get it working? - I tried the MIDI baud rate to half, but NoGo of course - but I couldn’t see anything else I could change.

So I think the question resolves down to "How do you get a 16mhz sketch to run on a 8 mhz processor?

You would need to double the baud rate, not half it, if running on slower hardware.

The normal baud rate setting will adapt to the currently selected board when compiled, so
do you have the right board setting?

I tried double & half the Baud again - I am still getting half the information & it is incorrect, eg repeatedly tapping the same note, shows on/off messages, but a different note each time, chaotic values for the note velocity, & nothing in the note number. It's a timing issue - the code seems to think all is well.
Well, if I find out what the prob is, I will post it.
Thanks for your response.

If you are getting some MIDI messages through but not others there is nothing wrong with the baud rate.
I find it hard to believe you are missing anything due to the clock rate as I used to do MIDI on a 4MHz processor back in the day and that was writing the code with interpreted BASIC.
You must have something else wrong in you code or your physical setup.