mumble-voip/mumble

Positional audio: round table-like arrangement

Open

#6,308 opened on Jan 14, 2024

View on GitHub
 (8 comments) (0 reactions) (0 assignees)C++ (5,642 stars) (1,062 forks)batch import
clientfeature-requestgood first issuepositional audio

Description

Context

Using Mumble as conference software.

Description

I would like to see a positional audio plugin included in Mumble where all participants are placed as if sitting at a round table in a conference room.

That is, every user selecting it as the plugin for positional audio will be positioned at the outline of an imaginary circle with a fixed minimum distance between each other user, facing the center of the circle. Assuming alphabetical order (more specifically, the order in which users are listed in the channel overview), every user should hear the "next" user to her left, end the "previous" user to her right, implying that all user's positions are laid out clockwise in ascending alphabetical order.

This might make Mumble more appealing for serious applications like online conferences, since listening to different people from different angles might make it easier to focus on one of them (think cocktail party effect).

For demonstration purposes, please have a look at the following Python script that calculates the numbers you need to enter into the "Manual placement" plugin to get an idea of the final result.

#!/usr/bin/env python3

import sys
import math

def radius_2d(min_distance, number_of_participants):
    return min_distance / 2 / math.sin(math.pi / number_of_participants)

def ideal_position_data_2d(min_distance, number_of_participants):
    r = radius_2d(min_distance, number_of_participants)
    for i in range(number_of_participants):
        alpha = i / number_of_participants * math.tau
        yield (r * math.cos(alpha), 0.0, r * math.sin(alpha), math.degrees((-alpha + 0.5 * math.pi) % math.tau), 0.0)

def main(args):
    min_distance = float(args[1])
    context = args[2]
    participants = args[3:]
    number_of_participants = len(participants)
    for (part, pos) in zip(participants, ideal_position_data_2d(min_distance, number_of_participants)):
        print("%15s:  X=% .2f  Y=% .2f  Z=% .2f  azimuth=%3d  elevation=%d  context=%s  identity=%s" % \
            (part, round(pos[0], 2), round(pos[1], 2), round(pos[2], 2), round(pos[3], 0), round(pos[4], 0), context, part))

if __name__ == "__main__":
    main(sys.argv)

For example, if you call it like this …

./demo.py 1.5 rdtbl Alice Bob Chuck

… and Alice, Bob and Chuck enter the numbers as computed for each of them, ideally, they should hear each other as if sitting at a round table, with at least 1.5 meters between each of them.

Bonus points if priority speakers are placed as if floating, talking down from above the center of the imaginary table.

(Actually, I am not sure whether I got the computation right, but it should be enough to get the idea.)

Mumble component

Both

OS-specific?

No

Additional information

Note that I did not try to write such a dedicated plugin myself for various reasons, but especially because I cannot remember the plugin API exposing all of the relevant data (especially the list of all user's names in the same context) for this kind of plugin to be be written as a "normal" positional audio plugin. Besides, having such a plugin built into every Mumble client by default would make adoption much better, maybe even giving Mumble a feature to distinguish it from other, less privacy-oriented conference software.

Contributor guide

Positional audio: round table-like arrangement · mumble-voip/mumble#6308 | Good First Issue