You have an analog source that produces a pure tone. You can switch the source on or off by the input event on or off. Using Stateflow (or similar), construct a timed automaton that provides the on and off signals as outputs, to be connected to the inputs of the tone generator.