Implicit in what you describe is the need for a valve, either an electrically operated solenoid valve, an air operated valve or a mechanical that can be operated 40 times a second.
I think this operating frequency is really pushing it for a solenoid valve and is totally impossible for an air operated valve. You may be able to drive a mechanical valve fast enough but then I think you would come up against the problem that the compressed air simplay cannot move fast enough to give the rate you want.
Maybe someone will come on with an example that shoots me down but I think what you are proposing is simply impossible.
An open mind is a virtue...so long as all the common sense has not leaked out.