Costello sang the roles of Anderson and P. T. Barnum in The Secret Arias, which tells the story of Anderson's unrequited love for legendary soprano Jenny Lind. Gisela Stille sang the role of Lind.
Costello told reporters, "The songs will tell a story that I have imagined existing between the lines of Anderson's biography and some of his most famous tales. They speak of a misfit's love for an unattainable woman and a struggle between a huckster and someone who composes music in secret."
Four musicians, rather than an orchestra, accompanied the singers.
Stille and Costello will perform next weekend in Aarhus, Denmark, and the fully staged opera will premiere next year, with an operatic singer in the roles sung by Costello.
Anderson was well known for such stories as "The Little Mermaid" and "The Ugly Duckling"; his story "The Nightingale" may have been written for Lind, who was widely known by that nickname. Costello was commissioned to write an opera about Anderson as part of the 200th anniversary of the writer's birth.