(1) In cases tried under Chapter XX or Chapter XXII Magistrate of the first or second class and in all proceedings under section 514 (if not in the course of a trial), the Magistrate shall make a memorandum of the substance of the evidence of each witness as the examination of the witness proceeds. (2) Such memorandum shall be written...