(a) When Taken. If it appears that a prospective witness may be unable to attend or prevented from attending a trial or hearing, that the witness’ testimony is material, and that it is necessary to take the witness’s deposition in order to prevent a failure of justice, the court at any time after the filing of an indictment, information, or complaint may upon motion and notice to the parties order that the witness’s testimony be taken by deposition and that any designated books, papers, documents, electronically stored information, photographs (including motion pictures and video tapes), or other tangible objects, not privileged, be produced at the same time and place.(b) Notice of Taking. The party at whose instance a deposition is to be taken shall give to every party reasonable written notice of the time and place for taking the deposition. The notice shall state the name and address of each person to be examined. On motion of a party upon whom the notice is served, the court for cause shown may extend or shorten the time.(c) Defendant’s Counsel. If a defendant is without counsel the court shall advise the defendant of the defendant’s right and assign counsel to represent the defendant pursuant to Rule 44.(d) How Taken. A deposition shall be taken in the manner provided in civil actions. The court at the request of a defendant may direct that a deposition be taken on written interrogatories in the manner provided in civil actions.(e) Use. At the trial or upon any hearing, a part or all of a deposition, so far as otherwise admissible under the rules of evidence, may be used if the court finds that the witness is dead; or that the witness is out of the State of Maine, unless the court finds that the absence of the witness was procured by the party offering the deposition; or that the witness is unable to attend or testify because of sickness or infirmity; or that the party offering the deposition has been unable to procure the attendance of the witness by subpoena. Any deposition may also be used by any party for the purpose of contradicting or impeaching the testimony of the deponent as a witness. If only a part of a deposition is offered in evidence by a party, an adverse party may require the party offering part of a deposition to offer all of it that is relevant to the part offered and any party may offer other parts.(f) Objections to Admissibility. Objections to receiving in evidence a deposition or part thereof may be made as provided in civil actions.(g) At the Instance of the State or Witness. The following additional requirements shall apply if the deposition is taken at the instance of the State or witness. The officer having custody of a defendant shall be notified of the time and place set for the examination, shall produce the defendant at the examination, and shall keep the defendant in the presence of the witness during the examination. A defendant not in custody shall be given notice and shall have the right to be present at the examination.