Frederick Crowest tells this story in his "Musicians' Wit, Humour, and Anecdote":
"The late Sir Arthur Sullivan, in the struggling years of his career, once showed great presence of mind, which saved the entire breakdown of a performance of 'Faust.' In the midst of the church scene, the wire connecting the pedal under Costa's foot with the metronome stick at the organ, broke. Costa was the conductor. In the concerted music this meant disaster, as the organist could hear nothing but his own instrument. Quick as thought, while he was playing the introductory solo, Sullivan called a stage hand. 'Go,' he said, 'and tell Mr. Costa that the wire is broken, and that he is to keep his ears open and follow me.' No sooner had the man flown to deliver his message than the full meaning of the words flashed upon Sullivan. What would Costa, autocratic, severe, and quick to take offence, say to such a message delivered by a stage hand? The scene, however, proceeded successfully, and at the end Sullivan went, nervously enough, to tender his apologies to his chief. Costa, implacable as he was, had a strong sense of justice, and the great conductor never forgot the signal service his young friend had rendered him by preventing a horrible _fiasco_."
There are numberless stories of his suiting his composition to erratic themes. Beverley had painted borders for a woodland scene. Sullivan liked the work and complimented Beverley, who immediately said: "Yes, and if you could compose something to fit it now." Instantly, Sullivan, who was at the organ, composed a score within a few minutes which enraptured the painter and which "fitted" his borders.
Again: A dance was required at a moment's notice for a second _danseuse_, and the stage manager was distracted. "You must make something at once, Sullivan," he said. "But," replied the composer, "I haven't even seen the girl. I don't know her style or what she needs." However, the stage manager sent the dancer to speak with Sullivan, and presently he called out: "I've arranged it all. This is exactly what she wants: Tiddle-iddle-um, tiddle-iddle-um, rum-tirum-tirum--sixteen bars of that; then: rum-tum-rum-tum--heavy you know--" and in ten minutes the dance was made and ready for rehearsal.