waveform function

Extract or replace a PTSample waveform