Need simple script to read 1 ppm signal

PaulS:
...
It is not clear what the code should do if the PPM signal is HIGH for the required duration, or what it should do if the PPM signal is NOT HIGH for the require duration.

The blinking/fading of the LEDs does not seem to relate to the length of the PPM HIGH pulse that I can see.

why it is not clear what the code should do when the signal is high or low?
in my opinion it doens´t make sense if the signal is high or low, the important is how long it is high. that controls the led voids.
or i´m missunderstanding something?