Here's an abstraction taken from the pitch shifter example: