There already exists a CAL script for this called C-NTROLR.CAL. Here is the description from the comments at the top of the script:
;;; This is a CAL program that allows the user to change data for any
;;; controller using addition or subtaction of a fixed amount, a high
;;; and low boundary, or a percentage.
;;;
;;; NOTE: This program automatically deletes any consecutive duplicate
;;; controller values that are on the same MIDI channel.