Elizabethan plays usually featured music and songs which would add to the impact of a scene, increase or slow down the pace, set the mood, introduce a character and, at least, be generally understood, or at least appreciated, by most.
Barbary was Desdemona's mother's maid who was abandoned by her crazed lover:
"he she loved proved mad / And did forsake her.”
Desdemona married a "foreigner" and the name Barbary is similar to "barbarian" which Iago called Othello, suggesting that the union was doomed from the start.
Desdemona is truly a victim of circumstances and innocent of what she is accused of. Her trust is usurped and misinterpreted, much to Iago's relief, as, with so many willing "victims," he is able to serve his cause. Desdemona trusts Othello and despite having feelings of foreboding, she does as he asks. She seeks solace from Emilia and tells the story of Barbary and sings
a “willow song” about forsaken love and death.
The story and the song serve to foreshadow her death
If I do die before thee, prithee shroud me / In one of those same sheets
and lead her to contemplate whether women really are unfaithful to their husbands, a concept evidently, beyond the scope of her imagination:"Wouldst thou do such a deed for all the world?".It is Emilia who tells her that it is the case.
Desdemona's behavior is sedate and almost accepting because her loyalty to Othello is so complete that she will, despite her concerns, do exactly as he says, regardless of the consequences. Barbary died while singing the "willow song" and Desdemona's disposition is so calm and the music lyrical - Shakespeare was a lyric poet - that her fate seems sealed.