Useful signal manipulation functions