[Mod] Game background music [mpd]

User avatar
orwell
Member
 
Posts: 720
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

[Mod] Game background music [mpd]

by orwell » Wed May 31, 2017 19:13

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

Depends: nothing
License of code: WTFPL
With this mod, I included the music from [ambience] along with some others.
“Eastern Feeling” is 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”. 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.
(this very good copyright summary here has been contributed by Wuzzy)
For the other song's copyrights, see readme.txt

Requires latest minetest 0.4.15-dev on the server side (requires commit ef6feca)
Github: https://github.com/orwell96/mpd
Last edited by orwell on Mon Jan 29, 2018 21:37, edited 6 times in total.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
GamingAssociation39
Member
 
Posts: 738
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Re: [Mod] Game background music [mpd]

by GamingAssociation39 » Wed May 31, 2017 20:34

It's giving me an error for the mod
Jesus Is Lord and Savior!!!
 

User avatar
orwell
Member
 
Posts: 720
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

Re: [Mod] Game background music [mpd]

by orwell » Thu Jun 01, 2017 15:25

GamingAssociation39 wrote:It's giving me an error for the mod

mpd mod directory has to be named "mpd"?
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
azekill_DIABLO
Member
 
Posts: 7460
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
GamingAssociation39
Member
 
Posts: 738
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Re: [Mod] Game background music [mpd]

by GamingAssociation39 » Fri Jun 02, 2017 01:54

orwell wrote:
GamingAssociation39 wrote:It's giving me an error for the mod

mpd mod directory has to be named "mpd"?
Attachments
Screenshot (14).jpg
(591.77 KiB) Not downloaded yet
Jesus Is Lord and Savior!!!
 

User avatar
azekill_DIABLO
Member
 
Posts: 7460
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Game background music [mpd]

by azekill_DIABLO » Fri Jun 02, 2017 11:08

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.
 

User avatar
DS-minetest
Member
 
Posts: 1026
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Game background music [mpd]

by DS-minetest » Fri Jun 02, 2017 11:30

Why wasn't this mod made client-side?
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
TumeniNodes
Member
 
Posts: 2547
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod] Game background music [mpd]

by TumeniNodes » Fri Jun 02, 2017 17:50

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)
I'm not your buddy, guy...
 

User avatar
orwell
Member
 
Posts: 720
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

Re: [Mod] Game background music [mpd]

by orwell » Wed Jun 07, 2017 12:32

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...
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

hajo
Member
 
Posts: 596
Joined: Thu Oct 13, 2016 10:45
Location: DE

Re: [Mod] Game background music [mpd]

by hajo » Wed Jun 07, 2017 13:02

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...
 

User avatar
Linuxdirk
Member
 
Posts: 1664
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: [Mod] Game background music [mpd]

by Linuxdirk » Wed Jun 07, 2017 13:18

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).
 

User avatar
orwell
Member
 
Posts: 720
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

Re: [Mod] Game background music [mpd]

by orwell » Thu Jun 08, 2017 06:54

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.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
Chibi ghost
Member
 
Posts: 788
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: [Mod] Game background music [mpd]

by Chibi ghost » Thu Jun 08, 2017 08:01

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
 

User avatar
azekill_DIABLO
Member
 
Posts: 7460
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

anrc
New member
 
Posts: 3
Joined: Thu Jul 20, 2017 11:19

Re: [Mod] Game background music [mpd]

by anrc » Thu Jul 20, 2017 11:23

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!
 

Parnikkapore
Member
 
Posts: 18
Joined: Tue Jun 27, 2017 04:15
In-game: Parnikkapore

Re: [Mod] Game background music [mpd]

by Parnikkapore » Fri Jul 21, 2017 00:24

I simply commented the line out. Everything is currently in init.lua .
 

User avatar
Tmanyo
Member
 
Posts: 196
Joined: Mon Sep 29, 2014 01:20
Location: United States
GitHub: Tmanyo
IRC: Tmanyo
In-game: tmanyo

Re: [Mod] Game background music [mpd]

by Tmanyo » Fri Jul 21, 2017 00:41

Nobody ever recognizes Tmusic Player... :( lol
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
 

User avatar
orwell
Member
 
Posts: 720
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

Re: [Mod] Game background music [mpd]

by orwell » Fri Jul 21, 2017 13:34

Parnikkapore wrote:I simply commented the line out. Everything is currently in init.lua .

Oops... alright, you can comment out the line.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

anrc
New member
 
Posts: 3
Joined: Thu Jul 20, 2017 11:19

Re: [Mod] Game background music [mpd]

by anrc » Fri Jul 21, 2017 14:39

Parnikkapore wrote:I simply commented the line out. Everything is currently in init.lua .


Nice, thank you!

Update: Works great :>
 

User avatar
orwell
Member
 
Posts: 720
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

Re: [Mod] Game background music [mpd]

by orwell » Sat Jul 22, 2017 07:47

problem fixed by a github commit.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
Wuzzy
Member
 
Posts: 3243
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Game background music [mpd]

by Wuzzy » Sun Jan 28, 2018 23:22

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.
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
orwell
Member
 
Posts: 720
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

Re: [Mod] Game background music [mpd]

by orwell » Mon Jan 29, 2018 20:36

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.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
Sirmentio
Member
 
Posts: 21
Joined: Thu Apr 21, 2016 17:22
In-game: Sirmentio

Re: [Mod] Game background music [mpd]

by Sirmentio » Fri Aug 03, 2018 17:29

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. :)
 

User avatar
bosapara
Member
 
Posts: 379
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara
In-game: Jozet

Re: [Mod] Game background music [mpd]

by bosapara » Fri Sep 21, 2018 17:43

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
 

User avatar
orwell
Member
 
Posts: 720
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

Re: [Mod] Game background music [mpd]

by orwell » Fri Sep 21, 2018 19:01

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.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 5 guests