Hi mcw1138,
Sorry to hear about your potential or actual condition. I’ve also known people going through similar issues.
Regarding your project, there are many unknowns from what you have stated and from the link you provided that would have to be determined before we could give any useful advice. Additionally, as @PaulHutch pointed out, there is a potential for for serious eye damage if done incorrectly, and I don’t know what levels at various wavelengths would be considered “safe”. There is a fair amount of info available for lasers, but relatively little on LEDs.
Just to get started, we would need to know the LED wavelength (color) you would need. Also, 40Hz does not fully define the nature of the “flicker”. You would also need to know the duty cycle, which is the amount of time the LED is ON vs. OFF for each pulse. For instance, a 10% duty cycle 40Hz square wave would be ON for 2.5ms and OFF for 22.5ms (the length of a single square wave pulse is the inverse of the frequency, which calculates to 25ms in this case). Because of the “persistence of vision” effect, such a light would appear constant to most humans, but would appear as a much dimmer light source since it’s only on for 10% of the time.
You mention LED efficacy - which is essentially how efficiently it produces visible light for a given input power. I’m not clear as to how this is relevant in this case, as it wouldn’t seem to be a power-constrained application. Presumably, one would apply as much power as necessary to obtain the desired luminosity, regardless of the efficacy of any particular LED. Obviously, if this were battery powered, then higher efficacy would tend to allow for longer run time between battery recharges or replacement.
Regarding sharply delineating the On and OFF portions of the LED lighting, LEDs turn on and off in the nanosecond (ns) range. Even if they turned on or off in one microsecond (µs), which is a longer period of time, it would take 1/25,000 of a 25ms wide square wave to turn on or off, so the switching time of the LED itself is pretty insignificant. Now, the circuitry used to do the actual switching could add significantly to this time, but it is still typically only a few µs or less, so still generally not an issue at that frequency.
Regarding dimability, the two common methods are pulse-width modulation (PWM) and linear dimming. PWM is basically what I described above, where an LED will appear dimmer if pulsed at a rate above the human persistence of vision rate at a reduced duty cycle. The lower the duty cycle, the dimmer it will appear.
Linear dimming simply means that the current passing through the LED is reduced. This can be accomplished by adding more resistance in line with the LED, or if the LED circuit is current controlled rather than voltage controlled, by directly reducing the current in the LED driver circuit.
You also mentioned 40Hz sound pulses. That would also need clarification. 40Hz is an audible frequency on its own, lying in the fairly low base region. People can typically hear down to about 20Hz. If it is meant that a higher frequency is turned on for some short time (less that 25ms) and off for a time which together add up to 25ms, then this would produce 40Hz pulses of a higher frequency. You would need to know at what frequency it should transmit while on. Presumably, it would be significantly higher than 40Hz.