Page 1 of 2

[Mod] Game background music [mpd]

Posted: Wed May 31, 2017 19:13
by orwell
A background music backend.

As of 2023-09, without any music after copyright issues.
Original mod description wrote:Hello again
There are no really full-featured background music mods. There are:
- ambience, which plays the music desynchronized, which is bad when multiple players play in the same room, and it can't be controlled (also, it happens very often that the same song is played twice)
- playmus, which basically does its job, but does not really good keep track of what's happening, and all players have the same volume and can't disable the music
- jdukebox/jukebox/jukerboxer. OK, these are jukeboxes, not background music.
I made a background music mod around a year ago. Here is it. Songs are picked in random order, with 30s pause between them (can be adjusted via settings)
EDIT: indeed, there is one, it's called tmusic_player

Now with vote functionality using https://github.com/minetest-mods/vote
For all players:
/mvolume <volume>
Set your individual music volume or disable background music. Saved across server restarts.

With mpd privilege:
/mpd_list: list available music
/mpd_play <id>: play a song
/mpd_stop: stop the current song. Unless /mpd_play or /mpd_next are invoked, no more music is played
/mpd_next: Play the next song

Download from Content-DB: https://content.minetest.net/packages/orwell/mpd/
Git repository: https://notabug.org/orwell/mpd

Re: [Mod] Game background music [mpd]

Posted: Wed May 31, 2017 20:34
by GamingAssociation39
It's giving me an error for the mod

Re: [Mod] Game background music [mpd]

Posted: Thu Jun 01, 2017 15:25
by orwell
GamingAssociation39 wrote:It's giving me an error for the mod
mpd mod directory has to be named "mpd"?

Re: [Mod] Game background music [mpd]

Posted: Thu Jun 01, 2017 16:09
by azekill_DIABLO
looks nice. please get a better presentation on your first post :D

Re: [Mod] Game background music [mpd]

Posted: Fri Jun 02, 2017 01:54
by GamingAssociation39
orwell wrote:
GamingAssociation39 wrote:It's giving me an error for the mod
mpd mod directory has to be named "mpd"?

Re: [Mod] Game background music [mpd]

Posted: Fri Jun 02, 2017 11:08
by azekill_DIABLO
GamingAssociation39 wrote:
orwell wrote:
GamingAssociation39 wrote:It's giving me an error for the mod
mpd mod directory has to be named "mpd"?
Image
MINECRAFT.

Re: [Mod] Game background music [mpd]

Posted: Fri Jun 02, 2017 11:30
by Desour
Why wasn't this mod made client-side?

Re: [Mod] Game background music [mpd]

Posted: Fri Jun 02, 2017 17:50
by TumeniNodes
Thank you orwell,
I have been planning on doing this at some point, but now I don't need to : D

I'll have to wait for the release coming to try it out though..., (I'm a boring "stable" kinda guy)

Re: [Mod] Game background music [mpd]

Posted: Wed Jun 07, 2017 12:32
by orwell
DS-minetest wrote:Why wasn't this mod made client-side?
There are 2 ways to understand your question
1.) "I want to listen to my own music while playing minetest"
Use a music player.
2.) "This mod is what I wanted, but why doesn't it involve any Client Side Modding"
Why should it? The most important point is that it synchronizes music across clients, but lets everyone keep his own volume, which works best server-side.

However, a mod that plays user-defined music in-game client-side would be an interesting thing...

Re: [Mod] Game background music [mpd]

Posted: Wed Jun 07, 2017 13:02
by hajo
orwell wrote:background music mods:
- ambience .. it can't be controlled
- playmus, .. all players have the same volume and can't disable the music

I made a background music mod around a year ago. .. Songs are picked in random order,
with 30s pause between them (can be adjusted in init.lua)

For all players:
/mvolume <volume> Set your individual music volume or disable background music.
For me, the most important feature of such mods is the ablity to disable the music.

Because after hearing it a few times, it might get boring/annoying.
Also, waste of bandwidth / datatransfer-volume...

Re: [Mod] Game background music [mpd]

Posted: Wed Jun 07, 2017 13:18
by Linuxdirk
hajo wrote:For me, the most important feature of such mods is the ablity to disable the music.

Because after hearing it a few times, it might get boring/annoying.
Also, waste of bandwidth / datatransfer-volume...
Or when doing Let's play videos copyright owners may claim the content and advertise in/aside your video. (Happened twice to me due to copyrighted music in a background music mod).

Re: [Mod] Game background music [mpd]

Posted: Thu Jun 08, 2017 06:54
by orwell
Actually, no bandwith is wasted, since music is downloaded a single time (on first join) and then stored in your cache. Minetest just instructs the client to play that sound file.

Re: [Mod] Game background music [mpd]

Posted: Thu Jun 08, 2017 08:01
by Chibi ghost
one way to over come the copyright issue is to create the music
but that is only a good solution if the 1, the music is good 1.5, not too obnoxious 2, and it has a decent loop

Re: [Mod] Game background music [mpd]

Posted: Thu Jun 08, 2017 15:42
by azekill_DIABLO
i agree!

Re: [Mod] Game background music [mpd]

Posted: Thu Jul 20, 2017 11:23
by anrc
Hey there, I'm getting the following errors when trying to use the mod on my server.

Code: Select all

2017-07-20 13:20:15: ERROR[Main]: ModError: Failed to load and run script from /home/<username>/.minetest/mods/mpd/init.lua:
2017-07-20 13:20:15: ERROR[Main]: /home/<username>/.minetest/mods/mpd/songs.lua: File or directory not found
2017-07-20 13:20:15: ERROR[Main]: stack traceback:
2017-07-20 13:20:15: ERROR[Main]:       [C]: in function 'dofile'
2017-07-20 13:20:15: ERROR[Main]:       /home/<username>/.minetest/mods/mpd/init.lua:13: in main chunk
I guess the file songs.lua is missing (it's not part of the git repo provided). Do I need to create it by myself and if yes, what is supposed to be in there?

Thanks in advance!

Re: [Mod] Game background music [mpd]

Posted: Fri Jul 21, 2017 00:24
by Parnikkapore
I simply commented the line out. Everything is currently in init.lua .

Re: [Mod] Game background music [mpd]

Posted: Fri Jul 21, 2017 00:41
by Tmanyo
Nobody ever recognizes Tmusic Player... :( lol

Re: [Mod] Game background music [mpd]

Posted: Fri Jul 21, 2017 13:34
by orwell
Parnikkapore wrote:I simply commented the line out. Everything is currently in init.lua .
Oops... alright, you can comment out the line.

Re: [Mod] Game background music [mpd]

Posted: Fri Jul 21, 2017 14:39
by anrc
Parnikkapore wrote:I simply commented the line out. Everything is currently in init.lua .
Nice, thank you!

Update: Works great :>

Re: [Mod] Game background music [mpd]

Posted: Sat Jul 22, 2017 07:47
by orwell
problem fixed by a github commit.

Re: [Mod] Game background music [mpd]

Posted: Sun Jan 28, 2018 23:22
by Wuzzy
This mod works great! Using it is easy as pie, also subgame integration is ultra-easy. Definitive recommend.

IMO it just needs some polishing, but otherwise it's good. Simple and good.

Bugs:
- You credited the dark_ambiance track although it does not exist in this mod. xD
- You used a gain greater than 1 in some tracks. I don't think values above 1 are allowed.
- Most or even all track names are wrong
- If you say “/mpd_what” while no track is playing, it says “Nothing playing. 0 sec. left until next song.” But after 0 seconds, there is still no song. xD
- No credit given for 5 tracks
- No license given for the Deemo collection tracks

Suggestions:
- If you type in “/mpd_play” without paramter, play a random track
- Improve the README and add more usage info
- Write complete developer documentation (API calls, songs.txt, etc.)
- Add the name of the authors into the songs metadata
- Add mod.conf with content “name = mpd”. With this the directory name of the mod doesn't matter anymore
- Add settingtypes.txt for the settings
- Give proper credit for ALL tracks

Credits info for your convenience:
eastern_feeling is actually called “Eastern Feeling” and created by Jordach. It can be found in the BFD subgame. License is GPLv3 (license of BFD).

The other tracks are called “Avalon”, “Ethereal”, “Faraway” and “Strangely Beautiful”. With spaces, but without the “Short” at the end. Author is Amethystium <http://amethystium.com/>.

According to viewtopic.php?f=11&t=2807, all files from the ambience mod are WTPFL unless noted otherwise in sounds/SoundLicenses.txt. It is not noted otherwise in this file, so the licence must be WTFPL.

-----------

EDIT 1/8/2023: Correction! I have searched the Internet again but I have found no evidence that the Amethystium music is free/libre at all. So I have to assume this music is actually non-free, until someone can point me to a page that says otherwise. Sorry for this misinformation.

Re: [Mod] Game background music [mpd]

Posted: Mon Jan 29, 2018 20:36
by orwell
Wuzzy wrote:This mod works great! Using it is easy as pie, also subgame integration is ultra-easy. Definitive recommend.

IMO it just needs some polishing, but otherwise it's good. Simple and good.

Bugs:
- You credited the dark_ambiance track although it does not exist in this mod. xD
- You used a gain greater than 1 in some tracks. I don't think values above 1 are allowed.
- Most or even all track names are wrong
- If you say “/mpd_what” while no track is playing, it says “Nothing playing. 0 sec. left until next song.” But after 0 seconds, there is still no song. xD
- No credit given for 5 tracks
- No license given for the Deemo collection tracks

Suggestions:
- If you type in “/mpd_play” without paramter, play a random track
- Improve the README and add more usage info
- Write complete developer documentation (API calls, songs.txt, etc.)
- Add the name of the authors into the songs metadata
- Add mod.conf with content “name = mpd”. With this the directory name of the mod doesn't matter anymore
- Add settingtypes.txt for the settings
- Give proper credit for ALL tracks

Credits info for your convenience:
eastern_feeling is actually called “Eastern Feeling” and created by Jordach. It can be found in the BFD subgame. License is GPLv3 (license of BFD).

The other tracks are called “Avalon”, “Ethereal”, “Faraway” and “Strangely Beautiful”. With spaces, but without the “Short” at the end. Author is Amethystium <http://amethystium.com/>.

According to viewtopic.php?f=11&t=2807, all files from the ambience mod are WTPFL unless noted otherwise in sounds/SoundLicenses.txt. It is not noted otherwise in this file, so the licence must be WTFPL.
First, thanks for the copyright info. I allowed myself to include it 1:1 into the main topic.
Sadly I don't really know where the Deemo tracks came from or what their license is...
Regarding the song names, these are actually the file names and I just didn't rename the files.
Hm, dark_ambiance... as far as i remember it was one of the ambience sounds, but there was no real music in it, so i removed it...
The gain values were just copied over from ambience, because they are supposed to be balanced. And it works, so what...
I've implemented some of your suggestions.

Re: [Mod] Game background music [mpd]

Posted: Fri Aug 03, 2018 17:29
by Sirmentio
orwell wrote: - playmus, which basically does its job, but does not really good keep track of what's happening, and all players have the same volume and can't disable the music
Hey, I'm glad my mod took inspiration for you to do this, I'm glad and hoping this could be a better alternative to what I had made some time ago, and from the sound of it, it certainly looks like it. :)

Re: [Mod] Game background music [mpd]

Posted: Fri Sep 21, 2018 17:43
by bosapara
i have warning when mod loading, how to fix it?

Code: Select all

2018-09-21 21:35:26: WARNING[Main]: [mpd] Misformatted song entry in songs.txt: #File Name           Time       Gain
Title

Re: [Mod] Game background music [mpd]

Posted: Fri Sep 21, 2018 19:01
by orwell
This warning does not cause any harm. If you want it to go away, please delete said line from songs.txt, it's a comment and should be ignored.