Added a snippet for pulse generation