script for delay samples to sample frequency