The diegetic use of sound in the play A Streetcar Named Desire is an effective technique that infuses music, as well as other auditory effects, in tandem with climactic scenes, or with the internal world of the character whose presence initiates them. It is also successful in creating the atmosphere of the scene, serving as a background that colors it with either sadness, nostalgia, or exhilaration. An additional result of the use of sound is that it gives the scene a form of "personality", for the sounds, or the music, often come from the memories, or from the deep emotions, of a character.
The first example in A Streetcar Named Desire of the use of music as an expressionistic detail is the use jazz background and the street sounds that are required in the stage directions.
[Scene One] Stage direction (the music of the Blue Piano grows louder)
It is the music that takes the audience right into the heart of New Orleans, and it is the use of the street sounds that alerts the audience of Stella's living conditions.
Another example is the use of Varsouviana polka music. It first happens early in the play when Blanche meets Stanley, whose heritage is Polish. We see this motif again during Blanche's conversation with Mitch about her late husband, Allen Grey. During this specific scene the music plays erratically and louder. This happens at the same time as Blanche remembers the night when she found her husband in bed with another man, and then pretending that nothing happened, went with them to dance to that very music. Hours later, her true emotions surfaced, leading her to tell her husband the words that, ultimately, drove the man to shoot himself and commit suicide: "You disgust me."
[Polka music sounds, in a minor key faint with distance]
We danced the Varsouviana! Suddenly, in the middle of the dance the boy I had married broke away from me and ran out of the casino. A few moments later -- a shot!
[The polka stops abruptly. Blanche rises stiffly. Then, the polka resumes in a major key]
The music often comes back to haunt Blanche, particularly, because the only thing that stops the music from playing in her head is the sound of her husband's gunshot as it occurred that night.
Concisely, the combination of sounds and music works for a theatrical piece as effectively as a musical score works for a film: it produces an atmosphere that intensifies the emotion of the characters, or the uniqueness of the scene. In A Streetcar Named Desire the use of sound plays the additional role of shadowing Blanche's emotions and serving as the foundation of a very bad memory. In all, the use is quite effective and serves the purpose that it is meant to serve.