def play_Bar(self, bar, channel=1, bpm=120):
        """Play a Bar object.

        Return a dictionary with the bpm lemma set on success, an empty dict
        on some kind of failure.

        The tempo can be changed by setting the bpm attribute on a
        NoteContainer.
        """
        self.notify_listeners(self.MSG_PLAY_BAR, {'bar': bar, 'channel'
                              : channel, 'bpm': bpm})

        # length of a quarter note
        qn_length = 60.0 / bpm
        for nc in bar:
            if not self.play_NoteContainer(nc[2], channel, 100):
                return {}

            # Change the quarter note length if the NoteContainer has a bpm
            # attribute
            if hasattr(nc[2], 'bpm'):
                bpm = nc[2].bpm
                qn_length = 60.0 / bpm
            ms = qn_length * (4.0 / nc[1])
            self.sleep(ms)
            self.notify_listeners(self.MSG_SLEEP, {'s': ms})
            self.stop_NoteContainer(nc[2], channel)
        return {'bpm': bpm}
Play a Bar object.

        Return a dictionary with the bpm lemma set on success, an empty dict
        on some kind of failure.

        The tempo can be changed by setting the bpm attribute on a
        NoteContainer.