
609 A.2d 1122 (1992)
Kevin A. BECKHAM, Appellant,
v.
UNITED STATES, Appellee.
No. 89-CF-1238.
District of Columbia Court of Appeals.
Argued April 10, 1992.
Decided May 22, 1992.
*1123 Mitchell S. Baer, Washington, D.C., appointed by the court, for appellant.
William Landers, Asst. U.S. Atty., with whom Jay B. Stephens, U.S. Atty., and John R. Fisher and Thomas J. Tourish, Jr., Asst. U.S. Attys., Washington, D.C., were on the brief, for appellee.
Before FARRELL and KING, Associate Judges, and BELSON, Senior Judge.
FARRELL, Associate Judge:
In this appeal from appellant's adjudication of criminal contempt for violating a condition of pretrial release, we are obliged to reverse because the trial judge denied appellant the constitutional right to testify in his own behalf under oath.

I.
Appellant was arrested on May 30, 1989, for unlawfully possessing cocaine with intent to distribute (D.C.Code § 33-541(a)(1) (1988)). The following day, the court released him on his personal recognizance pending trial. On June 28, 1989, appellant pled not guilty to the indictment charging the cocaine offense, and the court again ordered his release but imposed the condition that he refrain from illegal drug use and submit to weekly urine testing at the Adult Drug Detection Unit of the Pretrial Services Agency. Appellant submitted as required, testing negative for controlled substances on June 28, July 5, and July 12, 1989.[1] But tests conducted on samples collected on July 19 and July 26 showed him positive for cocaine.
At an informal status hearing held on July 28, appellant, in response to questions from the court, denied having ingested cocaine willfully. Admitting that he had been present recently in a room where others were smoking crack cocaine, he maintained through counsel that the positive tests might have resulted from passive inhalation of second-hand smoke.[2] The judge regarded skeptically appellant's assertion that he had remained in the room while others  but not he  had smoked crack cocaine,[3] and strongly implied that she could not credit his explanation without proof that a detectable quantity of cocaine could be ingested passively.[4] Appellant persisted in his denial, however. Accordingly, the judge scheduled a formal hearing under Rule 42(b), Superior Court Rules of Criminal Procedure, to determine whether he should be held in contempt for violating a condition of pretrial release. D.C.Code § 23-1329(c) (1989); see also D.C.Code § 11-944(a) (Supp.1991) (court may punish for disobedience of an order). Altogether, appellant's utterances at the status hearing consisted of fifteen words, unsworn, in response to three questions by the court.[5]
The court held the contempt hearing on September 22, 1988, without a jury. The government called the supervisor of the Adult Drug Detection Unit, who confirmed that appellant had tested positive for cocaine on the two occasions in July, and described the procedures used to ensure an unbroken chain of custody and accurate testing of samples. On cross-examination, *1124 appellant's counsel attempted at length to impeach the reliability of the testing, inquiring further into the overall probability of error, as well as the possibility of mishandling of samples, miscalibration, false positives, and the like.[6] Counsel then told the court that he intended to call appellant as a witness and that appellant would deny having used cocaine, as well as explain "that on one occasion before his first test he was in a room, a small room that was closed with somebody else who was smoking cocaine." The court responded:
I would note that he has already said those things. It was not under oath. I am sure he would say the same thing under oath. I don't need to hear it again. I will certainly accept the fact that that would be his testimony.
When counsel protested that he "would prefer to put [appellant] on the stand" so that the court could "judge his demeanor," the judge remarked, with reference to the earlier status hearing, "Counsel, I judged his demeanor when I set up this hearing." The judge then adverted to the "concrete scientific proof" establishing the violation in the form of two successive positive tests.[7] Counsel replied that he still maintained that the results were in error or the result of passive inhalation, "[a]nd since the standard here is beyond a reasonable doubt... I would want Mr. Beckham to testify so you can judge his demeanor." The court essentially concluded the matter by stating:
Counsel, as I said he is going to do nothing but say under oath what he has previously said to the court. I judged his demeanor on that occasion. And the fact is I didn't believe him. I verbalized it.
But I said I would leave him on the street, give him ever[y] possibility, and I would have this hearing. I have sat here for an hour now listening to testimony, keeping in mind every word.... I have a perfect recollect[ion] of his testimony or statements to the court [at the status hearing]. And I believe that the defendant's statement to me not under oath is no different than his statement to me [would be] under oath in the sense that as far as the court is concerned he was addressing the court, and I would not expect him to say anything differently. And based on what you are telling me your proffer is that he won't. And I have judged his demeanor. I don't believe him. I accept the scientific proof of these tests.... I didn't believe him then and I see nothing that's going [t]o change that. I mean I think the law is decided in this issue and this court believes that this defendant has misrepresented and lied to this court, in addition to using drugs.
Having found that appellant used cocaine willfully in violation of a condition of release, the court adjudged him in criminal contempt and, after argument by counsel, sentenced him to imprisonment for two days.

II.
As this court explained in In re Wiggins, 359 A.2d 579 (D.C.1976), "A criminal contempt proceeding is not a criminal prosecution, and consequently not all procedures required in a criminal trial are necessary in a hearing on a charge of contempt." Id. at 580 & n. 4 (citing, inter alia, Myers *1125 v. United States, 264 U.S. 95, 103-05, 44 S.Ct. 272, 273, 68 L.Ed. 577 (1924)). But, as we also recognized in Wiggins, the Supreme Court has made clear that, as a matter of fundamental due process, the defendant in a proceeding for criminal contempt alleged to have been committed outside the presence of the court is entitled to a broad array of procedural protections, including "the right to offer testimony and to call witnesses on one's own behalf." Id. at 581 n. 5 (emphasis added) (citing In re Oliver, 333 U.S. 257, 68 S.Ct. 499, 92 L.Ed. 682 (1948)). In Oliver the Court had declared:
Except for a narrowly limited category of contempts, due process of law ... requires that one charged with contempt of court be advised of the charges against him, have a reasonable opportunity to meet them by way of defense or explanation, have the right to be represented by counsel, and have a chance to testify and call other witnesses in his behalf, either by way of defense or explanation.
333 U.S. at 275, 68 S.Ct. at 508-09 (emphasis added).[8] This necessary "chance to testify... in his behalf" is derived from "[a] person's right to ... an opportunity to be heard in his defense," a right "basic in our system of jurisprudence." Id. at 273, 68 S.Ct. at 507.
More recently, in Rock v. Arkansas, 483 U.S. 44, 107 S.Ct. 2704, 97 L.Ed.2d 37 (1987), the Court affirmed the constitutional "right to testify on one's own behalf at a criminal trial," id. at 51, 107 S.Ct. at 2709, and in so doing found this right anchored (among other places) in the Constitution's guarantee of due process. Id. In recognizing that the right to due process of law "include[s] a right to be heard and to offer testimony," the Court relied expressly on the reference in In re Oliver to the guarantee of a person's "opportunity to be heard in his defense." Id. See also Cooke v. United States, 267 U.S. 517, 537, 45 S.Ct. 390, 395, 69 L.Ed. 767 (1925); Boyd v. United States, 586 A.2d 670, 672 (D.C. 1991).
In light of these authorities, we cannot accept the government's general argument that, whatever may be required in a jury trial involving a criminal prosecution, a trial of contempt to the court as factfinder does not always require  under due process  that the defendant be permitted to testify under oath. The government cites no authority for this argument;[9] its contention appears to be that, because due process is an inherently flexible concept, there will be non-jury contempt cases where the defendant must be allowed to testify, but others where his testimony is unnecessary  as where the court has heard him tell his story in an antecedent proceeding (whether or not under oath) and purportedly is able already to assess his credibility and demeanor. We think this distinction underestimates the importance of the right to testify, which in addition to being  in some cases  the most important means the defendant has to convince the trier of fact of his innocence, Rock, 483 U.S. at 52, 107 S.Ct. at 2709; Boyd, 586 A.2d at 673, "advances important dignity interests which can only be served by honoring the defendant's decision." Id. at 674. Instead, we view the Constitution as conferring upon defendants in criminal contempt proceedings under Rule 42(b) an unqualified right to testify in their behalf, subject to normal rules of relevance and *1126 procedure. See Rock, 483 U.S. at 52, 107 S.Ct. at 2709 ("Logically included in the accused's right to call witnesses whose testimony is material and favorable to his defense is a right to testify himself") (citation and internal quotation marks omitted).[10]
The government's narrower contention is that, assuming appellant had a constitutional right to testify under oath at his contempt hearing, the right was not violated by the court's refusal to allow him to testify "about an irrelevant and immaterial issue  his presence in a room when others were smoking crack cocaine." It is true that, as to the first positive test at least, appellant's counsel proffered that appellant wished to describe his presence in the smoke-filled room and lay the putative foundation for a passive inhalation defense. If that were the sole reason appellant sought to testify, we would have to face an evidentiary question: Without any expert testimony or similar scientific support for a theory of passive ingestion of a detectable amount of crack cocaine, was appellant entitled to testify to circumstances relevant only to that defense? There is, of course, "no constitutional right to present irrelevant evidence." Gibson v. United States, 536 A.2d 78, 82 (D.C.1987). And it may plausibly be argued that testimony about passive inhalation of cocaine smoke, offered without scientific underpinning, is excludable because it has no tendency "to make the existence or nonexistence of a fact more or less probable than would be the case without that evidence." Punch v. United States, 377 A.2d 1353, 1358 (D.C. 1977), cert. denied, 435 U.S. 955, 98 S.Ct. 1586, 55 L.Ed.2d 806 (1978).
We conclude that we need not decide this issue, however, because appellant's assertion of his right to testify was not limited to the specific defense of passive inhalation. Asked why his client wished to testify, appellant's counsel answered that the government bore the burden of proof beyond a reasonable doubt and that  to attempt to create such a doubt  appellant wished to testify so the court could "judge his demeanor" and meld that appraisal into the other circumstances, including appellant's at least partial record of negative test results. Though counsel did not proffer precisely what this "demeanor" testimony would be, a denial by appellant under oath that he had deliberately ingested cocaine, offered to impress the judge with its sincerity if nothing else, could not be said to be irrelevant. See E. CLEARY, McCORMICK ON EVIDENCE § 185 (3d ed. 1984). There was, therefore, no legitimate reason for the refusal to let appellant be sworn and attempt to exculpate himself by his own words.
The government's remaining argument is that the denial of appellant's right to testify was harmless error. This also raises a troublesome issue. Appellant contends that we should treat a complete exclusion of the defendant from the stand in a contempt proceeding (or criminal trial) as per se reversible error. He apparently regards the denial of the right to testify as a "structural defect[] in the constitution of the trial mechanism," Arizona v. Fulminante, ___ U.S. ___, 111 S.Ct. 1246, 1265, 113 L.Ed.2d 302 (1991), of the kind the Supreme Court has held defies harmless error analysis.[11] In appellant's favor, we *1127 note the Supreme Court's description of "an accused's right to present his own version of events in his own words" as "[e]ven more fundamental to a personal defense than the right of self-representation," Rock v. Arkansas, 483 U.S. at 52, 107 S.Ct. at 2709  the latter right having been held not subject to harmless error analysis, McKaskle v. Wiggins, 465 U.S. 168, 177-78 n. 8, 104 S.Ct. 944, 950-51 n. 8, 79 L.Ed.2d 122 (1984). The question would remain, however, whether a refusal to let the defendant testify involves "a structural defect affecting the framework within which the trial proceeds," and hence may not be analyzed for harmlessness, Arizona v. Fulminante, 111 S.Ct. at 1265,[12] or whether it is at bottom a trial error indistinguishable conceptually from other erroneous evidentiary exclusions. Id.
We find it unnecessary to decide this issue. Assuming harmless error analysis applies, we cannot hold in this case that the court's refusal to allow appellant to testify was harmless beyond a reasonable doubt. Id. at 1264; Chapman v. California, 386 U.S. 18, 24, 87 S.Ct. 824, 828, 17 L.Ed.2d 705 (1967). The government points out that in this bench trial the judge stated that she had had adequate opportunity to appraise appellant's demeanor and had made clear that mere repetition of his denial of voluntary ingestion, under oath, would not change her mind. The government suggests, therefore, that reversal would make something of a fetish of the oath under these circumstances. The government does not dispute, of course, that in various circumstances courts  including this one  have stressed the importance of the oath as an aid to truth in the fact-seeking process.[13] Hence courts must be reluctant to make any ruling that would devalue it. But assuming that unsworn statements by the defendant might ever substitute for sworn testimony, they cannot do so on this record. Appellant uttered barely fifteen words at the status hearing in response to three questions by the court. This was not the equivalent of the right to testify; it was not a substitute for the defendant's opportunity, under questioning by his advocate, to account for his activities at the relevant times in enough detail, and with enough evidence of sincerity, to have a chance of persuading the factfinder. Cf. Ferguson v. Georgia, 365 U.S. 570, 81 S.Ct. 756, 5 L.Ed.2d 783 (1961) (trial procedure that permits defendant to make only an unsworn statement to jury, and then only without benefit of questioning by his counsel, violates right to counsel).
In the context of an analogous right, but arguably one less fundamental both practically and symbolically than the right to testify, the Supreme Court has stressed the constitutional importance of the opportunity to present closing argument in a criminal case, even one tried to the court. In Herring v. New York, 422 U.S. 853, 95 S.Ct. 2550, 45 L.Ed.2d 593 (1975), the Court *1128 pointed out that "for the defense, closing argument is the last clear chance to persuade the trier of fact that there may be reasonable doubt of the defendant's guilt," id. at 862, 95 S.Ct. at 2555; it is an opportunity for the defendant, through counsel, "to be heard in summation of the evidence from the point of view most favorable to him." Id. at 864, 95 S.Ct. at 2556. The Court added, in language relevant here:
Some cases may appear to the trial judge to be simple  open and shut  at the close of the evidence. And surely in many such cases a closing argument will, in the words of Mr. Justice Jackson, be "likely to leave [a] judge just where it found him." But just as surely, there will be cases where closing argument may correct a premature misjudgment and avoid an otherwise erroneous verdict. And there is no certain way for a trial judge to identify accurately which cases these will be, until the judge has heard the closing summation of counsel.
Id. at 863, 95 S.Ct. at 2556 (footnotes omitted). Even more so must courts be reluctant to assume that relevant testimony by the defendant under oath, elicited "from the point of view most favorable to him" but also tested by cross-examination, will have no capacity to "correct a premature misjudgment" by the trier of fact.[14]
Because we are unable to conclude beyond a reasonable doubt that testimony by appellant under oath would have been incapable of instilling a reasonable doubt in the mind of the trial judge, we must reverse the adjudication of contempt.
So ordered.
NOTES
[1]  Appellant had also tested negative on May 31.
[2]  At the subsequent contempt hearing, appellant's counsel argued that the first positive test had resulted from the passive exposure and that the second was simply in error.
[3]  "And he doesn't use drugs, but he just stayed in this little small room with all of this cocaine; is that what you're telling me?"
[4]  "It just doesn't work. I've had experts. I've talked to them, I've asked questions. It may happen with PCP because you'll hold PCP, it comes in your pores. It will not happen with cocaine...." Later the court added, "[I]f you can find an expert, you make sure your expert explains the conditions to you ... under which he would have to sit continually to get that kind of discrete intense result[] in his urine. And not just a little bit, but a lot. And then you see if I'm supposed to believe your client....
[5]  Appellant remained on pretrial release between the status and contempt hearings and continued to submit to weekly testing. There were no further indications of illegal drug use.
[6]  Counsel also attempted to explore whether passive inhalation of a controlled substance could result in a positive test report, but the court terminated this line of questioning because counsel apparently was relying on a study that involved marijuana only, and the witness had neither the personal knowledge nor the expertise to draw other than speculative conclusions from the analogy.
[7]  Earlier the court had observed, "Two in a row is no aberration." The court also cited Jones v. United States, 548 A.2d 35 (D.C.1988), for the proposition that the results of an EMIT test  the test employed generally by the Pretrial Services Agency and in this case  "are presumptively reliable and thus generally admissible into evidence in every case." Id. at 46 (footnote omitted). Appellant's counsel conceded admissibility, but argued that the results should not be treated as conclusive, pointing, in turn, to a later decision by the trial judge whose reliability analysis we had substantially adopted in Jones. That judge ultimately found EMIT test results lacking in sufficient weight, by themselves, to support a contempt conviction based on use of PCP. See Jones, 548 A.2d at 46 n. 8.
[8]  "The narrow exception to these due process requirements includes only charges of misconduct, in open court, in the presence of the judge, which disturbs the court's business, where all of the essential elements of the misconduct are under the eye of the court, are actually observed by the court, and where immediate punishment is essential to prevent `demoralization of the court's authority' before the public." Oliver, 333 U.S. at 275, 68 S.Ct. at 509. See Swisher v. United States, 572 A.2d 85, 90-91 (D.C.1990).
[9]  Swisher v. United States, 572 A.2d 85 (D.C. 1990), on which it relies, was a proceeding for summary contempt. See Super.Ct.Crim.R. 42(a). Even there we held that, "in summary proceedings based on failure to appear in court, the accused is entitled, at least," to rights that include "a reasonable opportunity to present a defense." Id. at 92 (emphasis added); see also Williams v. United States, 576 A.2d 1339, 1344 (D.C.1990) (stating in context of proceeding based on failure to appear that "defendant must have an opportunity to rebut").
[10]  We note further, as a statutory matter, that under D.C.Code § 23-1329 a person who violates a condition of release is subject to revocation of release as well as contempt sanctions. Section 23-1329(b) provides that the procedures applicable to pretrial detainees initially, see § 23-1322(c) & (d), shall apply in proceedings for revocation. These procedures expressly include the right to testify. § 23-1322(c)(4). It would be anomalous if the accused enjoyed a right to testify at a post-charge hearing to determine whether he should remain at liberty pretrial, and at a hearing to determine whether pretrial release should be revoked, but did not enjoy the same right in a proceeding that could result in both loss of liberty and conviction for a crime. See also Michaelson v. United States ex rel. Chicago, St. Paul, Minneapolis & Omaha Rwy., 266 U.S. 42, 66-67, 45 S.Ct. 18, 20, 69 L.Ed. 162 (1924) (where contempt is in the nature of a crime, fundamental characteristics of criminal prosecution and contempt proceeding are the same except for right to jury trial).
[11]  Appellant would distinguish Crane v. Kentucky, 476 U.S. 683, 106 S.Ct. 2142, 90 L.Ed.2d 636 (1986), in which the Court held that the erroneous exclusion at trial of all testimony about the circumstances surrounding the defendant's confession was "subject to harmless error analysis," id. at 691, 106 S.Ct. at 2147. The erroneous ruling in Crane did not purport to keep the defendant off the stand for all purposes; rather it prevented him from testifying concerning the circumstances affecting the voluntariness of his confession, but presumably left him free to testify to other relevant matters. Id. at 686, 106 S.Ct. at 2144.
[12]  See also Rose v. Clark, 478 U.S. 570, 587, 106 S.Ct. 3101, 3111, 92 L.Ed.2d 460 (Stevens, J., concurring in the judgment) ("[V]iolations of certain constitutional rights are not, and should not be, subject to harmless-error analysis because those rights protect important values that are unrelated to the truth-seeking function of the trial"); Boyd v. United States, 586 A.2d at 677-78.
[13]  E.g., Parker v. United States, 363 A.2d 975, 977 (D.C.1976) (government could properly claim surprise and thus impeach its own witness with prior sworn grand jury testimony where witness presumably "knew the significance of an oath"); Wheeler v. United States, 93 U.S.App.D.C. 159, 165-66, 211 F.2d 19, 25 (1953) (same) ("The prosecution could reasonably have expected the threatened contradiction to dissolve in the atmosphere of the witness stand"), cert. denied, 347 U.S. 1019, 74 S.Ct. 876, 98 L.Ed. 1140 (1954). See also United States v. DeSisto, 329 F.2d 929, 933-34 (2d Cir.) (Friendly, J.) (noting that prior testimony under oath is given "with the oath administered not in any perfunctory fashion but in a setting calculated to impress the witness with the gravity of the responsibilities assumed"), cert. denied, 377 U.S. 979, 84 S.Ct. 1885, 12 L.Ed.2d 747 (1964); see also FED.R.EVID. 801(d)(1)(A).
[14]  In criminal jury trials, a standard instruction given the jury at the start of trial explains: "It is important that you keep an open mind and not decide any issue in the case until the entire case has been submitted to you with my final instructions." CRIMINAL JURY INSTRUCTIONS FOR THE DISTRICT OF COLUMBIA, No. 1.02 (3d ed. 1978) (emphasis added). By the same token, the injunction of Canon 3 of the ABA Code of Judicial Conduct (1972) that a judge perform his or her duties "impartially" would appear to impose on the judge, sitting as trier of fact, the obligation not to prejudge the general issue until all of the evidence has been heard. Cf. Turman v. United States, 555 A.2d 1037, 1038-39 (D.C.1989).
