Comparing 8 digital inputs to control multiplexer analog inputs

swoshie:
Am I on the right track?

Well, it's a start. If you're trying to measure the frequency of those inputs you need to count pulses - pulseIn() is no help with that. Arrays will avoid you needing to copy your code eight times. To save head-scratching down the line, I recommend that you get used to thinking of your inputs as numbered 0 to 7 rather than 1 to 8. You'll understand why once you start using arrays.