(a) The obligation of a party to pay the instrument is discharged as stated in this article or by an act or agreement with the party which would discharge an obligation to pay money under a simple contract.
(b) Discharge of the obligation of a party is not effective against a person acquiring rights of a holder in due course of the instrument without notice of the discharge.