update halfwave diff