Difference between revisions of "Sound Packs"

From Luanti Wiki
Jump to navigation Jump to search
(→‎See also: thats now at another place)
(Rewrite big parts, includes fixes for outdated and false information (it was never possible to override sounds, afaik))
 
(22 intermediate revisions by 8 users not shown)
Line 1: Line 1:
== Description ==
+
Luanti supports sound packs, which are client provided folders containing sound files, which are used as fallback for non-existent sounds. They can not override sounds.
Sound Packs can be used to reduce the amount of Media which needs to become loaded. If the server does not have specific sounds, the sounds in the testsounds folder instead of the ones of the server are used, so the sounds do not need to become loaded from the server.
+
 
 +
Historically, they were used to reduce the amount of media which needs to be loaded, reducing the player join time. The server didn't have the sound, and the player was responsible for providing it manually via their sound pack. Nowadays, there is lazily streamed sound loading in another thread, which makes sound loading time unnoticeable, and dynamic media, which server mods can use to send sounds after joining, so this use-case no longer makes sense.
  
 
== Installation ==
 
== Installation ==
Currently sound packs can be stored at the shared path of minetest, not at the user path. And the sounds need to be put into a folder called "testsounds".<br/>
+
Sound packs are located at <code>path_share/sounds/</code> and <code>path_user/sounds/</code>. So you have to put sounds for example to <code>/usr/share/minetest/sounds/somemod_craw.ogg</code> or <code>~/.minetest/sounds/somemod_fox.1.ogg</code>. Subdirectories are not supported.
eg. <code>/usr/share/minetest/testsounds/craw.ogg</code><br/>
+
 
The sound pack path might be configurable soon.
+
In older versions of Luanti, the user path was not supported. It was useful to link the sounds folder so that you don't need to change the rights of your global Luanti folder. Example:<br/>
 +
<code>$ sudo ln -r -s ~/.minetest/ingame_sounds /usr/share/minetest/sounds</code>
 +
 
 +
== For Technic ==
 +
If you want to use the music box of technic, you usually need to put the tracks into the sounds folder. You can easily download them automatically using following command(s):
  
Of course, you can also link the testsounds folder that you don't need to change the rights of your global minetest folder.<br/>
+
1. ensure that you are in the right folder, e.g.
e.g.<br/>
+
 
$ sudo ln -r -s ~/.minetest/testsounds /usr/share/minetest/testsounds
+
cd ~/.minetest/sounds
 +
 
 +
2. Download them all at once (parallel) using curl:<br/>
 +
 
 +
for i in {1..9}; do if [ ! -e technic_track${i}.ogg ]; then curl -s https://raw.githubusercontent.com/minetest-technic/technic_game/master/mods/ambience/sounds/technic_track${i}.ogg > technic_track${i}.ogg; fi & done
  
 
== See also ==
 
== See also ==
[https://github.com/minetest/minetest/blob/master/src/game.cpp#L776 Is the folder still called "testsounds"?]
+
* [https://github.com/minetest/minetest/blob/8c56434bd3e93e89e258d82171b9af71b558145e/src/client/sound.cpp#L46 Implementation in the source code], [https://github.com/minetest/minetest/blob/8c56434bd3e93e89e258d82171b9af71b558145e/src/gui/guiEngine.cpp#L92 and here for the main menu] (as of 2024-11-25)
 
+
* [[Texture Packs]]
  
{{Incomplete}}
 
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
 +
[[Category:Gameplay]]

Latest revision as of 21:16, 25 November 2024

Luanti supports sound packs, which are client provided folders containing sound files, which are used as fallback for non-existent sounds. They can not override sounds.

Historically, they were used to reduce the amount of media which needs to be loaded, reducing the player join time. The server didn't have the sound, and the player was responsible for providing it manually via their sound pack. Nowadays, there is lazily streamed sound loading in another thread, which makes sound loading time unnoticeable, and dynamic media, which server mods can use to send sounds after joining, so this use-case no longer makes sense.

Installation

Sound packs are located at path_share/sounds/ and path_user/sounds/. So you have to put sounds for example to /usr/share/minetest/sounds/somemod_craw.ogg or ~/.minetest/sounds/somemod_fox.1.ogg. Subdirectories are not supported.

In older versions of Luanti, the user path was not supported. It was useful to link the sounds folder so that you don't need to change the rights of your global Luanti folder. Example:
$ sudo ln -r -s ~/.minetest/ingame_sounds /usr/share/minetest/sounds

For Technic

If you want to use the music box of technic, you usually need to put the tracks into the sounds folder. You can easily download them automatically using following command(s):

1. ensure that you are in the right folder, e.g.

cd ~/.minetest/sounds

2. Download them all at once (parallel) using curl:

for i in {1..9}; do if [ ! -e technic_track${i}.ogg ]; then curl -s https://raw.githubusercontent.com/minetest-technic/technic_game/master/mods/ambience/sounds/technic_track${i}.ogg > technic_track${i}.ogg; fi & done

See also