An appeal may be taken by the defendant:
(a) From a final judgment of conviction except as provided in Section 1237.1 and Section 1237.5. A sentence, an order granting probation, or the commitment of a defendant for insanity, the indeterminate commitment of a defendant as a mentally disordered sex offender, or the commitment of a defendant for controlled substance addiction shall be deemed to be a final judgment within the meaning of this section. Upon appeal from a final judgment the court may review any order denying a motion for a new trial.
(b) From any order made after judgment, affecting the substantial rights of the party.