[CSM] Mumble Positional audio w/ handler [mumble]

Post Reply
User avatar
sparky
Member
Posts: 154
Joined: Sun Oct 05, 2014 00:54
GitHub: Elkien3
IRC: ircSparky
In-game: sparky
Location: USA
Contact:

[CSM] Mumble Positional audio w/ handler [mumble]

by sparky » Post

Info:
A friend of mine (chipgw) made a handler that receives client positional data from a csm and sends it to mumble for positional audio without having to make a custom build of minetest.

Installation:
(I made a video tutorial if that's easier.)
Install the csm (/minetestmod/mumble/)
Start mumble, the handler will have an error otherwise. Make sure Positional Audio and Link is enabled in Settings -> Audio Output and Settings -> Plugins. (Both need advanced options to be shown.)
Run the executable (in the releases) with the minetest program as an argument. (can be done easily with shortcuts in windows, and .sh files in linux)
After a few seconds after joining a world the terminal for the handler/minetest should go a bit crazy, outputting your players location and heading. If it dosn't, the csm probably isn't correctly installed.
After that Mumble should say in it's chat "Minetest linked" If it dosn't, double check your Mumble settings and make sure Positional Audio is enabled both in Settings -> Audio Output and Settings -> Plugins.

Github:
Browse
Releases (you'll need both the CSM zip/tar as well as the executable for your respective OS)

If you want to connect with other users that use this, join the Discord
Last edited by sparky on Sat Nov 23, 2019 16:43, edited 3 times in total.

User avatar
Mantar
Member
Posts: 584
Joined: Thu Oct 05, 2017 18:46
Contact:

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by Mantar » Post

Nice! This is something that should really be in the engine IMO, but a CSM is the next best thing. Tell your friend he rocks.
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile

User avatar
sparky
Member
Posts: 154
Joined: Sun Oct 05, 2014 00:54
GitHub: Elkien3
IRC: ircSparky
In-game: sparky
Location: USA
Contact:

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by sparky » Post

I will :D
maybe if it's popular someone will take another look at adding it to the engine, who knows.

btw if anyone wants to do a demonstration video with me; let me know. It would be nice to have one for here as well as the tutorial video.

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by Nathan.S » Post

I love making Minetest videos, I'd be down to making a demo video with you.

EDIT:
Here's the video, https://youtu.be/6AsHD9h8IE8
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by benrob0329 » Post

This is the kind of stuff CSM should be used for.

User avatar
sparky
Member
Posts: 154
Joined: Sun Oct 05, 2014 00:54
GitHub: Elkien3
IRC: ircSparky
In-game: sparky
Location: USA
Contact:

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by sparky » Post

lol yea, though it would be nice if there was some way to do this without the extra handler program without creating a possible security issue

User avatar
false_chicken
Member
Posts: 53
Joined: Wed Feb 04, 2015 23:41
GitHub: falsechicken
In-game: false_chicken
Location: Florida, USA

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by false_chicken » Post

Finally xD. I am a bit late to this party but I was among some of the first users to request this feature on Github years ago. Finally got around to checking up on it to see it finally exists lol.
DISCLAIMER: I am probably wrong.

User avatar
sparky
Member
Posts: 154
Joined: Sun Oct 05, 2014 00:54
GitHub: Elkien3
IRC: ircSparky
In-game: sparky
Location: USA
Contact:

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by sparky » Post

Made a Discord for whoever wants to connect with other users of this mod, since the mod isn't much good with only one person. https://discord.gg/nG8ZgF9

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by Miniontoby » Post

Is this like proximity mod for mc????
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
sparky
Member
Posts: 154
Joined: Sun Oct 05, 2014 00:54
GitHub: Elkien3
IRC: ircSparky
In-game: sparky
Location: USA
Contact:

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by sparky » Post

You can set it up as a Proximity Voice Chat, comparable to https://github.com/zsawyer/MumbleLink

gamesbond
New member
Posts: 3
Joined: Fri Jan 07, 2022 13:54
In-game: gamesbond

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by gamesbond » Post

Hey sparky,

This unfortunately doesn't seem to work with the flatpak build of minetest. What do I do?

c56
Member
Posts: 307
Joined: Wed Apr 21, 2021 03:05
GitHub: tigercoding56
In-game: bm5 or bemo5 also sell_her_on55

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by c56 » Post

gamesbond wrote:
Fri Jan 07, 2022 13:58
Hey sparky,

This unfortunately doesn't seem to work with the flatpak build of minetest. What do I do?
flatpak is in a sandbox so i guess it will not work (without modifying the flatpak minetest pakage )
this is a signature not a place to post messages also if i could change my username i would change it to sell_her_on55

elized
Member
Posts: 11
Joined: Fri Nov 11, 2022 07:32

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by elized » Post

gamesbond wrote:
Fri Jan 07, 2022 13:58
Hey sparky,

This unfortunately doesn't seem to work with the flatpak build of minetest. What do I do?

Check to see if your flatpack configs goes here: /home/$USER/.var/app/
And also see if your flatpack bin goes here: /var/lib/flatpak/exports/bin/

If it does then do any of the instructions but just point it to here:

/home/$USER/.var/app/net.minetest.Minetest/.minetest
/var/lib/flatpak/exports/bin/net.minetest.Minetest

I made a super easy bash script installer for myself but you can use it if you want: (Tested on Linux Mint)

(Copy paste into an empty file named install-minetest_mumble_wrapper.sh or whatever and right click Properties-Permission-Allow Executing as a Program then run it.)

Code: Select all

#!/bin/bash
# Minetest with Mumble Wrapper Installer

# This mkdir is to make this script possible to run successfully even before installing the Minetest flatpack
mkdir /home/$USER/.var/app/net.minetest.Minetest
mkdir /home/$USER/.var/app/net.minetest.Minetest/.minetest

echo -e 'debug_log_level = \nenable_client_modding = true' >> /home/$USER/.var/app/net.minetest.Minetest/.minetest/minetest.conf

mkdir /home/$USER/.var/app/net.minetest.Minetest/.minetest/clientmods

echo -e 'load_mod_mumble = true' >> /home/$USER/.var/app/net.minetest.Minetest/.minetest/clientmods/mods.conf

mkdir temp-mumble-wrapper
cd temp-mumble-wrapper

wget -O minetest-mumble-CSM.zip https://github.com/Elkien3/minetest-mumble-wrapper/releases/download/0.2/minetest-mumble-CSM.zip
unzip minetest-mumble-CSM.zip
rm minetest-mumble-CSM.zip
mv mumble /home/$USER/.var/app/net.minetest.Minetest/.minetest/clientmods/mumble

wget -O minetest-mumble-wrapper-0.2_linux_x86_64 https://github.com/Elkien3/minetest-mumble-wrapper/releases/download/0.2/minetest-mumble-wrapper-0.2_linux_x86_64
mv minetest-mumble-wrapper-0.2_linux_x86_64 /home/$USER/.var/app/net.minetest.Minetest/.minetest/

cd ..
rmdir temp-mumble-wrapper

echo -e '#!/bin/bash\n# Minetest Mumble Wrapper\n/home/'$USER'/.var/app/net.minetest.Minetest/.minetest/minetest-mumble-wrapper-0.2_linux_x86_64 /var/lib/flatpak/exports/bin/net.minetest.Minetest' >> /home/$USER/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh

chmod +x /home/$USER/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh

chmod +x /home/$USER/.var/app/net.minetest.Minetest/.minetest/minetest-mumble-wrapper-0.2_linux_x86_64

echo -e '[Desktop Entry]\nName=Minetest-Mumble\nExec=/home/'$USER'/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh\nComment=Play Minetest with Mumble Positional Audio\nTerminal=false\nIcon=minetest\nType=Application' >> /home/$USER/Desktop/Minetest-Mumble.desktop

chmod +x /home/$USER/Desktop/Minetest-Mumble.desktop

cp /home/$USER/Desktop/Minetest-Mumble.desktop /home/$USER/.local/share/applications

echo -e 'Categories=Game;Simulation;' >> /home/$USER/.local/share/applications/Minetest-Mumble.desktop

# This part creates startup scripts that you can use if you auto start Mumble, point to them (located in /home/$USER/) in your Startup Applications or wherever (I set the delay at 3 seconds in my settings)

# This script sets the volume at 100% if Mumble sets the volume to 0 every startup
echo -e '#!/bin/bash\n# Set volume to 100%\npactl set-sink-volume 0 100%\namixer -q -D pulse set Master 100% unmute' >> /home/$USER/.set-volume.sh

chmod +x /home/$USER/.set-volume.sh

# This script auto minimizes the screen including Mumble if you set them at startup
echo -e 'wmctrl -k on' >> /home/$USER/.show-desktop.sh

chmod +x /home/$USER/.show-desktop.sh


elized
Member
Posts: 11
Joined: Fri Nov 11, 2022 07:32

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by elized » Post

Of-course as soon as I posted my script I found a flaw in it...

If your distro accepts capital usernames then $USER will be different from the directory path, I should have used $HOME.

So ignore my flawed script above and use this new and improved one instead:

(Copy paste into an empty file named install-minetest-mumble-wrapper.sh or whatever and right click Properties-Permission-Allow Executing as a Program then run it.)

Code: Select all

#!/bin/bash
# Minetest with Mumble Wrapper Installer

mkdir $HOME/.var/app/net.minetest.Minetest
mkdir $HOME/.var/app/net.minetest.Minetest/.minetest

echo -e 'debug_log_level = \nenable_client_modding = true' >> $HOME/.var/app/net.minetest.Minetest/.minetest/minetest.conf

mkdir $HOME/.var/app/net.minetest.Minetest/.minetest/clientmods

echo -e 'load_mod_mumble = true' >> $HOME/.var/app/net.minetest.Minetest/.minetest/clientmods/mods.conf

mkdir temp-mumble-wrapper
cd temp-mumble-wrapper

wget -O minetest-mumble-CSM.zip https://github.com/Elkien3/minetest-mumble-wrapper/releases/download/0.2/minetest-mumble-CSM.zip
unzip minetest-mumble-CSM.zip
rm minetest-mumble-CSM.zip
mv mumble $HOME/.var/app/net.minetest.Minetest/.minetest/clientmods/mumble

wget -O minetest-mumble-wrapper-0.2_linux_x86_64 https://github.com/Elkien3/minetest-mumble-wrapper/releases/download/0.2/minetest-mumble-wrapper-0.2_linux_x86_64
mv minetest-mumble-wrapper-0.2_linux_x86_64 $HOME/.var/app/net.minetest.Minetest/.minetest/

cd ..
rmdir temp-mumble-wrapper

echo -e '#!/bin/bash\n# Minetest Mumble Wrapper\n'$HOME'/.var/app/net.minetest.Minetest/.minetest/minetest-mumble-wrapper-0.2_linux_x86_64 /var/lib/flatpak/exports/bin/net.minetest.Minetest' >> $HOME/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh

chmod +x $HOME/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh

chmod +x $HOME/.var/app/net.minetest.Minetest/.minetest/minetest-mumble-wrapper-0.2_linux_x86_64

echo -e '[Desktop Entry]\nName=Minetest-Mumble\nExec='$HOME'/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh\nComment=Play Minetest with Mumble Positional Audio\nTerminal=false\nIcon=minetest\nType=Application' >> $HOME/Desktop/Minetest-Mumble.desktop

chmod +x $HOME/Desktop/Minetest-Mumble.desktop

cp $HOME/Desktop/Minetest-Mumble.desktop $HOME/.local/share/applications

echo -e 'Categories=Game;Simulation;' >> $HOME/.local/share/applications/Minetest-Mumble.desktop

echo -e '#!/bin/bash\n# Set volume to 100%\npactl set-sink-volume 0 100%\namixer -q -D pulse set Master 100% unmute' >> $HOME/.set-volume.sh

chmod +x $HOME/.set-volume.sh

echo -e 'wmctrl -k on' >> $HOME/.show-desktop.sh

chmod +x $HOME/.show-desktop.sh

echo -e '[Desktop Entry]\nName=Mumble\nGenericName=Voice Chat\nGenericName[de]=Sprachkonferenz\nGenericName[fr]=Chat vocal\nGenericName[tr]=Sesle Sohbet\nComment=A low-latency, high quality voice chat program for gaming\nComment[de]=Ein Sprachkonferenzprogramm mit niedriger Latenz und hoher Qualität für Spiele\nComment[fr]=Un logiciel de chat vocal de haute qualité et de faible latence pour les jeux\nComment[tr]=Oyunlar için yüksek kaliteli ve düşük gecikmeli sesle sohbet programı\nExec=mumble %u\nIcon=mumble\nTerminal=false\nType=Application\nStartupNotify=false\nMimeType=x-scheme-handler/mumble;\nCategories=Network;Chat;Qt;\nKeywords=VoIP;Messaging;Voice Chat;Secure Communication;\nVersion=1.0\nX-GNOME-Autostart-enabled=true\nNoDisplay=false\nHidden=false\nName[en_US]=Mumble\nComment[en_US]=A low-latency, high quality voice chat program for gaming\nX-GNOME-Autostart-Delay=0' >> $HOME/.config/autostart/mumble.desktop

echo -e '[Desktop Entry]\nType=Application\nExec='$HOME'/set-volume.sh\nX-GNOME-Autostart-enabled=true\nNoDisplay=false\nHidden=false\nName[en_US]=Set Volume 100%\nComment[en_US]=Auto set volume at 100%\nX-GNOME-Autostart-Delay=3' >> $HOME'/.config/autostart/Set Volume 100%.desktop'

echo -e '[Desktop Entry]\nType=Application\nExec='$HOME'/show-desktop.sh\nX-GNOME-Autostart-enabled=true\nNoDisplay=false\nHidden=false\nName[en_US]=Show Desktop\nComment[en_US]=Auto minimize programs on screen\nX-GNOME-Autostart-Delay=3' >> $HOME'/.config/autostart/Show Desktop.desktop'

If your distro uses $HOME'/.config/autostart then my script creates autostartup for Mumble and my other custom fixes.

This script sets up everything for you so all you need to do is install Minetest flatpak and Mumble.

I find the Mumble flatpak lacking the Link plugin in my Linux Mint distro so I used the non-flatpak version 1.3.4-1.

To configure Mumble go to the settings then Audio Output and check the Positional Audio in the Interface section. Make sure the Minimum Volume is zero in the Positional Audio section. And then in Plugins, check Link to Game and Transmit Position. Make sure that Link v1.2.0 is enabled in the list of plugins.

Here's my personal Positional Audio settings for reference:

Minimum Distance 1.0 m
Bloom 150%
Maximum Distance 30.0 m
Minimum Volume 0%

elized
Member
Posts: 11
Joined: Fri Nov 11, 2022 07:32

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by elized » Post

Okay this is getting ridiculous but I figured if the beginner friendly minetest.mumble-helpers.zip for windows has the feature of auto opening and auto closing Mumble together with Minetest then why can't Linux have one as well?...

And so third time's the charm, here's once again the new new and improved beginner friendly Minetest-Mumble-Wrapper installer bash script:

(You know the drill, copy paste into an empty file named install-minetest-mumble-wrapper.sh or whatever and right click Properties-Permission-Allow Executing as a Program then run it.)

Code: Select all

#!/bin/bash
# Minetest with Mumble Wrapper Installer

mkdir $HOME/.var/app/net.minetest.Minetest
mkdir $HOME/.var/app/net.minetest.Minetest/.minetest

echo -e 'enable_client_modding = true\ndebug_log_level = ' >> $HOME/.var/app/net.minetest.Minetest/.minetest/minetest.conf

mkdir $HOME/.var/app/net.minetest.Minetest/.minetest/clientmods

echo -e 'load_mod_mumble = true' >> $HOME/.var/app/net.minetest.Minetest/.minetest/clientmods/mods.conf

mkdir temp-mumble-wrapper
cd temp-mumble-wrapper

wget -O minetest-mumble-CSM.zip https://github.com/Elkien3/minetest-mumble-wrapper/releases/download/0.2/minetest-mumble-CSM.zip
unzip minetest-mumble-CSM.zip
rm minetest-mumble-CSM.zip
mv mumble $HOME/.var/app/net.minetest.Minetest/.minetest/clientmods/mumble

wget -O minetest-mumble-wrapper-0.2_linux_x86_64 https://github.com/Elkien3/minetest-mumble-wrapper/releases/download/0.2/minetest-mumble-wrapper-0.2_linux_x86_64
mv minetest-mumble-wrapper-0.2_linux_x86_64 $HOME/.var/app/net.minetest.Minetest/.minetest/

cd ..
rmdir temp-mumble-wrapper

echo -e '#!/bin/bash\n# Minetest Mumble Wrapper\nsleep 2\n'$HOME'/.var/app/net.minetest.Minetest/.minetest/minetest-mumble-wrapper-0.2_linux_x86_64 /var/lib/flatpak/exports/bin/net.minetest.Minetest' >> $HOME/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh

chmod +x $HOME/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh

echo -e '#!/bin/bash\n# Start Mumble + Minetest\nmumble & '$HOME'/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh && killall -9 mumble' >> $HOME/.var/app/net.minetest.Minetest/.minetest/start-mumble-minetest.sh

chmod +x $HOME/.var/app/net.minetest.Minetest/.minetest/start-mumble-minetest.sh

chmod +x $HOME/.var/app/net.minetest.Minetest/.minetest/minetest-mumble-wrapper-0.2_linux_x86_64

echo -e '[Desktop Entry]\nName=Minetest-Mumble\nExec='$HOME'/.var/app/net.minetest.Minetest/.minetest/start-mumble-minetest.sh\nComment=Play Minetest with Mumble Positional Audio\nTerminal=false\nIcon=minetest\nType=Application' >> $HOME/Desktop/Minetest-Mumble.desktop

chmod +x $HOME/Desktop/Minetest-Mumble.desktop

cp $HOME/Desktop/Minetest-Mumble.desktop $HOME/.local/share/applications

echo -e 'Categories=Game;Simulation;' >> $HOME/.local/share/applications/Minetest-Mumble.desktop

I made this script general purpose but if you want Mumble to automatically connect to the server of your choice either add the server in the Server Connection Dialogue and then in the Settings > Network check "Reconnect to last server on startup" though it will not always connect to your dedicated Minetest server if you use lots of servers OR just replace 3rd line in your $HOME/.var/app/net.minetest.Minetest/.minetest/start-mumble-minetest.sh with this:

Code: Select all

mumble mumble://INSERTYOURMUMBLESERVERADDRESSHERE:INSERTYOURSERVERPORTHERE/?version=1.2.9 & /home/INSERTYOURUSERNAMEPATH/.var/app/net.minetest.Minetest/.minetest/start-minetest.sh && killall -9 mumble
This script sets up everything for you so all you need to do is install Minetest flatpak and Mumble.

I find the Mumble flatpak lacking the Link plugin in my Linux Mint distro so I used the non-flatpak version 1.3.4-1.

To configure Mumble go to the settings then Audio Output and check the Positional Audio in the Interface section. Make sure the Minimum Volume is zero in the Positional Audio section. And then in Plugins, check Link to Game and Transmit Position. Make sure that Link v1.2.0 is enabled in the list of plugins.

Here's my personal Positional Audio settings for reference:

Minimum Distance 1.0 m
Bloom 150%
Maximum Distance 30.0 m
Minimum Volume 0%

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by Miniontoby » Post

Hey elized,

Thanks for your script!

Am I allowed to use the script as a reference for the installer which I might make for the mtlauncher project?

Kind regards,
Miniontoby
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

gamesbond
New member
Posts: 3
Joined: Fri Jan 07, 2022 13:54
In-game: gamesbond

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by gamesbond » Post

I'm getting this error when I try to execute the wrapper:

Code: Select all

Access denied. Reason: Lua: Runtime error from mod '' in callback environment_step(): mumble:init.lua:30: attempt to compare nil with number
stack traceback:
	mumble:init.lua:30: in function <mumble:init.lua:7>
	*builtin*:client/register.lua:25: in function <*builtin*:client/register.lua:13>
Minetest version: 5.7.0-dev-b3503e7
Mumble version: 1.5.0
Wrapper version: 0.2

gamesbond
New member
Posts: 3
Joined: Fri Jan 07, 2022 13:54
In-game: gamesbond

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by gamesbond » Post

Ok so I commented the lines from 30 till 34 in init.lua because I'm guessing the value of minetestversion on builds that are compiled from source has a nil value.

Edit:
And positional audio works now

User avatar
sparky
Member
Posts: 154
Joined: Sun Oct 05, 2014 00:54
GitHub: Elkien3
IRC: ircSparky
In-game: sparky
Location: USA
Contact:

Re: [CSM] Mumble Positional audio w/ handler [mumble]

by sparky » Post

ok, thanks for report. I'll make some changes

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests