Music in Minetest...

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Music in Minetest...

by TenPlus1 » Sat Mar 08, 2014 13:21

It would add a nice touch to a world or even a server to have music for the users to enjoy while they play the game, and I know that audio files can be played using a host of mods, but... wouldn't it be a lot better if Minetest could load and play MOD music created with a tracker program ? Not only would the files be a fraction of the size, but it would make a huge selection of music available to Minetest servers/players and use less CPU time playing in comparison to sampled music like mp3 or ogg's...
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Sat Mar 08, 2014 13:42

Music eats bandwith and generates lag for free *woohoo*

EDIT: I think running music on the own computer is the best soulation because not everybody likes the same music.
Last edited by Krock on Sat Mar 08, 2014 13:43, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sat Mar 08, 2014 16:47

There is immerse sounds mod which adds music.
Maybe we should have an option to download/not download sound files bigger than X Mb.
When a sound should be played, a client should check missing files and shouldn't make any attempts to play them at all.

Complaints about bandwith are well-grounded, but MOD files are wa-ay smaller (yes, I've seen MOD music of roughly 16 Mb, but that's not a rule).
So what was proposed was MOD file type support.

Also it would be nice to separate SFX from music.

Also, question of this type is better to be asked via IRC. Pilz Adam stated that clearly more that a year ago. Give it a try there, TenPlus1!
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

by TenPlus1 » Sat Mar 08, 2014 16:52

Sorry 4aiman, I tend not to use IRC and post on the forum only... will give it a go...

Krock: Playing .mod music wont lag the server or eat bandwidth, mods have been played using a 7mhz Amiga computer and works wonderfully and the sizes can range from a few Kb up to Mb's depending on music/instruments contained...
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sat Mar 08, 2014 17:24

TenPlus1 wrote:Sorry 4aiman, I tend not to use IRC and post on the forum only... will give it a go...

Krock: Playing .mod music wont lag the server or eat bandwidth, mods have been played using a 7mhz Amiga computer and works wonderfully and the sizes can range from a few Kb up to Mb's depending on music/instruments contained...

That is because Amigas had special sound chips which were capable to do that.
We don't really need to wath for bandwith or cpu comsumption, encoding/decoding & playing Opus audio would not really add any additional load on the server/client.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
RealBadAngel
Member
 
Posts: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Sun Mar 09, 2014 07:22

Lags? Sound files can be stored on client side. Server doesnt have to send anything.
Mod, either default or immersive sounds just have to tell the client to play the file.
Local stored sounds have to be in /sounds folder.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sun Mar 09, 2014 07:23

TenPlus1 wrote:Sorry 4aiman, I tend not to use IRC and post on the forum only... will give it a go...

No need to worry, I'm too don't want to use IRC and I'm not forcing you either.
While I've been absent (and that's a year for you) things may have changed, but I feel that IRC still is a preferable way. If I'm wrong, then it would be nice to hear the opposite from the devs.

Anyway, back on the topic: I'm all for the MOD support. Maybe along with some other audio formats like xm, vgm or nsf. To my mind it will be cool to listen to some old NES music while being at some creative 8-bit-themed world with lots of pixelart.

RealBadAngel wrote:Lags? Sound files can be stored on client side. Server doesnt have to send anything.
Mod, either default or immersive sounds just have to tell the client to play the file.
Local stored sounds have to be in /sounds folder.


/me likes the idea!
Last edited by 4aiman on Sun Mar 09, 2014 07:24, edited 1 time in total.
 

User avatar
RealBadAngel
Member
 
Posts: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Sun Mar 09, 2014 07:48

4aiman wrote:
TenPlus1 wrote:Sorry 4aiman, I tend not to use IRC and post on the forum only... will give it a go...

No need to worry, I'm too don't want to use IRC and I'm not forcing you either.
While I've been absent (and that's a year for you) things may have changed, but I feel that IRC still is a preferable way. If I'm wrong, then it would be nice to hear the opposite from the devs.

Anyway, back on the topic: I'm all for the MOD support. Maybe along with some other audio formats like xm, vgm or nsf. To my mind it will be cool to listen to some old NES music while being at some creative 8-bit-themed world with lots of pixelart.

RealBadAngel wrote:Lags? Sound files can be stored on client side. Server doesnt have to send anything.
Mod, either default or immersive sounds just have to tell the client to play the file.
Local stored sounds have to be in /sounds folder.


/me likes the idea!


Its not an idea. This is how it works in minetest...
Last edited by RealBadAngel on Sun Mar 09, 2014 07:49, edited 1 time in total.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sun Mar 09, 2014 17:25

So it works like texturepacks and all I need to know are the names of sounds that a game uses?
 

User avatar
RealBadAngel
Member
 
Posts: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Mon Mar 10, 2014 07:07

4aiman wrote:So it works like texturepacks and all I need to know are the names of sounds that a game uses?


Havent checked if local ones are overriding server's sent. Should be easy enough to check ;)
But definitely you can for example move all the sounds from ambience mod to local folder /sounds and leave on the server side only the code.

Also if in the /sounds folder theres a file main_menu.ogg it is played while in menu.
 

User avatar
spootonium
Member
 
Posts: 94
Joined: Fri May 02, 2014 01:38

Re: Music in Minetest... why not procedural?

by spootonium » Fri May 02, 2014 05:30

I've been giving some thought to music and ambiance in Minetest, and it occurred to me that it would be fitting a game featuring unique, procedurally-generated environments also have unique, procedurally-generated ambiance.
I originally thought that this was how music was done in Minecraft (because of the somewhat arrythmic, atonic qualities of the default soundtrack), and I was quit disappointed to find that it wasn't.
With a little research, I found that a feature like on-the-fly, procedural composition would be quite cutting edge in the current gaming landscape (indie or pro), and although there exists some demo API in this direction, none of it appears to be attached to any actual project. Given that one of the recurrent gripes about MT is its lack of "atmosphere", it would seem that there exists an opportunity to introduce an interesting feature to the play experience that would help propel it beyond the shadow of "open-source Minecraft clone".

tl;dr - Introducing a feature such as per-world, procedurally-generated, ambient music, would not only be both cutting-edge and intrinsically cool, but would also silence quite a few critics.
I write code. Sometimes, it even works.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Music in Minetest...

by TenPlus1 » Fri May 02, 2014 06:56

spootonium: that would be a cool feature indeed if someone managed to implement it...
 

thetoon
Member
 
Posts: 106
Joined: Tue Dec 11, 2012 12:55

Re: Music in Minetest... why not procedural?

by thetoon » Fri May 02, 2014 07:27

spootonium wrote:tl;dr - Introducing a feature such as per-world, procedurally-generated, ambient music, would not only be both cutting-edge and intrinsically cool, but would also silence quite a few critics.


At the very least, switching biome-themed tracks upon biome change could have a very positive effect on ambiance/mood.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Music in Minetest...

by paramat » Fri May 02, 2014 10:46

spootonium i like your idea! im interested in generative and ambient music and have recorded a few experiments in 'multidimensional fractal generated music' :P https://soundcloud.com/menokefug i have studied the maths of music, which helped me understand perlin noise, which is very much music in visual form and with extra dimensions.
It's possible to take the perlin parameters and express those in tones of certain frequencies ... 'octaves' are the harmonics, 'persistence' is the brightness of the tone, 'spread' is terrain wavelength in (roughly) metres which can be converted into a musical pitch. For example 2 perlin noises with spreads of 500 and 750 nodes are a root-fifth chord with their frequencies in the perfect 'natural intonation' ratio 3:2. Most mapgens are very consonant and big root-fifth-octave chords, when i use 2 noises in golden ratio, it's a dissonant bluesy sharpened minor sixth.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Music in Minetest...

by Morn76 » Fri May 02, 2014 12:18

SoundHelix ( http://www.soundhelix.com/ ) is GPL and produces impressive compositions. Unfortunately it's in Java though.

Edit: Made an Arch Linux PKGBUILD for your convenience: https://aur.archlinux.org/packages/soundhelix/
Last edited by Morn76 on Fri May 02, 2014 14:50, edited 1 time in total.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Music in Minetest...

by Evergreen » Fri May 02, 2014 12:27

Linux Multimedia Studio: http://lmms.sourceforge.net/
It is quite powerful, and very similar in design to FL Studio. Oh, and it's open source.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Music in Minetest...

by Morn76 » Fri May 02, 2014 13:00

Evergreen wrote:Linux Multimedia Studio: http://lmms.sourceforge.net/
It is quite powerful, and very similar in design to FL Studio. Oh, and it's open source.


No no no, this is about automatic music composition. Please read the previous posts.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Music in Minetest...

by Evergreen » Fri May 02, 2014 13:08

whoops, sorry. Context can be very important sometimes.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: Music in Minetest...

by Jordach » Fri May 02, 2014 14:09

Morn76 wrote:
Evergreen wrote:Linux Multimedia Studio: http://lmms.sourceforge.net/
It is quite powerful, and very similar in design to FL Studio. Oh, and it's open source.


No no no, this is about automatic music composition. Please read the previous posts.

Give me a while, seriously beats toying with the FL Studio beat gen, which is literal shit compared to this (but isn't as GOOD as SoundHelix!)

Will attempt screwing around with it to see what I can do with the original MIDI file output in FL, because that is the same method I did for this old thing:

http://www.mediafire.com/listen/o96iy9b ... /mtest.ogg

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Music in Minetest...

by Morn76 » Fri May 02, 2014 16:05

Don't miss the random song titles generated by SoundHelix (they are a bit buried in its terminal output). :-)

2014-05-02 18:01:14,808 INFO [Generator] SongUtils: Song name: "Obscure giant's prodigious rat under the bed"


Apparently the program is loosely based on AlgoMusic, an old AmigaOS 2 application by the same author.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Music in Minetest...

by rubenwardy » Fri May 02, 2014 17:03

The best way to do immersive, IMO, is to add a client API. Then there will be no extra bandwidth.

Or add some sort of new api that uses a weird format to determine sounds to play.

Like:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
01 sound_cricket.ogg    VOL 05    ON (default:grass OR default:dirt OR default:sand)   NEAR default:shrub
# plays sound_cricket.ogg randomly on nodes near default:shrub, that are grass, dirt or sand.


Ugly format, but easier to implement.

I would prefer a client API.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: Music in Minetest...

by Jordach » Fri May 02, 2014 22:55

Given SoundHelix a try with my skills in FL; managed to make this:

Note: I also partly re-transposed this on purpose.

http://www.mediafire.com/listen/clalvza ... device.ogg

I made one earlier, my bandwidth failed to upload it (at that time);

Note: I seriously love that scratchy / glitchy sound (think reggae / dub notation, 2/3 single notes, then a large triad.)

http://www.mediafire.com/listen/70cgu5r ... Helix1.ogg

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Music in Minetest...

by Morn76 » Fri May 02, 2014 23:36

Very nice, Jordach! Maybe you should fork https://github.com/Neuromancer56/MinetestAmbience and add your ogg files. The file names are defined at line 215 in init.lua.

Perhaps also experiment with lower bpm, e.g. 100–110 and some instruments turned off to make it sound less frenetic and add some variety. The default settings of SoundHelix produce a fairly constant bpm.

I think the filtered, scratchy sound might also work really well for music discs in MT. I saw a music disc mod on the forums a while ago which might benefit from more loops. I think it only supports a single disc at the moment though, so this might entail some light mod hacking. :-)
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: Music in Minetest...

by Jordach » Sat May 03, 2014 00:37

Morn76 wrote:Very nice, Jordach! Maybe you should fork https://github.com/Neuromancer56/MinetestAmbience and add your ogg files. The file names are defined at line 215 in init.lua.

Perhaps also experiment with lower bpm, e.g. 100–110 and some instruments turned off to make it sound less frenetic and add some variety. The default settings of SoundHelix produce a fairly constant bpm.

I think the filtered, scratchy sound might also work really well for music discs in MT. I saw a music disc mod on the forums a while ago which might benefit from more loops. I think it only supports a single disc at the moment though, so this might entail some light mod hacking. :-)

My files are always written at 450kbps, except oddly have that scratchy sound. For some reason it may have been the aliasing from FL Studio, namely that Sytrus VSTi giving me hell - I might write my OWN Jukebox thing for BFD, see if that works well with different discs. (Hint - coal + dye = certain disc!)

Oh, and screenshot of FL showing my work:

[whenever mediacrush works]

(For some reason when I crack the FL out, my routines for audio oddly improve - read: possible due to my high level functioning Autism; this might be why I appear to be skilled at lots of things, but never master them. If you want to understand a bit know about me, feel free: that PM button won't click itself!

N.B. To be clear, music for me is almost ALWAYS playing, so I might have learned it without even having to think about it. Keep this in mind; I will not limit myself to one particular style, as seen in that spoiler)
+ Spoiler

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
ZachyGames
Member
 
Posts: 144
Joined: Sat Mar 22, 2014 12:14

Re: Music in Minetest...

by ZachyGames » Sat May 03, 2014 03:04

I have some relaxing music if you like?

https://www.youtube.com/watch?v=UXgqDlrqmzo found it in night school
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero

Re: Music in Minetest...

by HeroOfTheWinds » Sat May 03, 2014 03:15

Jordach wrote:Given SoundHelix a try with my skills in FL; managed to make this:

Note: I also partly re-transposed this on purpose.

http://www.mediafire.com/listen/clalvza ... device.ogg

I made one earlier, my bandwidth failed to upload it (at that time);

Note: I seriously love that scratchy / glitchy sound (think reggae / dub notation, 2/3 single notes, then a large triad.)

http://www.mediafire.com/listen/70cgu5r ... Helix1.ogg

Both are quite good! But my favorite is the second one. :)

Maybe I should fire a few midis your way that I made a while back.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

User avatar
spootonium
Member
 
Posts: 94
Joined: Fri May 02, 2014 01:38

Re: Music in Minetest... and how I'd do it.

by spootonium » Sat May 03, 2014 10:57

https://mega.co.nz/#!lNkh2DTK!cgbuwUDlfMcitiZigPYL5ESIsFVLvg2_UpKA1OC3JJY .dia (6kB)
https://mega.co.nz/#!oF1jTYxZ!NoJo0hJV_O7_qTwjzYFZ6FfMyPQLmjIIlI_EI7fdeUk .svg (27kB)

This diagram probably only demonstrates my ignorance of the detailed engine structure :-\ Eh, well.
The upshot is:
  • a server-side composing module, producing a stream of MIDI or OSC cues,
  • layering in (as-and-when appropriate) environmental and event-triggered sound cues from "the world",
  • passing this stream of cues to the client, which
  • synthesizes the audio stream using a library of samples (or wavetables, or what-have-you).

From what I can glean from the dev wiki, the server concerns itself primarily with generating and maintaining the game world as an abstracted data model, while the client renders the simulation with which the user interacts. Based on that understanding, it follows that it should be the server's responsibility to procedurally generate ("compose") music, but the client's to synthesize ("perform") it.

Is any of this making sense?
I write code. Sometimes, it even works.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Music in Minetest...

by Morn76 » Sat May 03, 2014 11:10

Why are you putting these tiny files on Mega instead of posting as an attachment??? Isn't Mega the service where people got sued and the founder was jailed? I'm not using that.

P.S. For synthesis, maybe MT could include the timidity source code. Java 7 has the Gervill softsynth which SoundHelix uses on Linux. The only question would be where to get properly licensed patches. But other than that MIDI is fine for a client-server architecture with limited bandwidth.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: Music in Minetest...

by Jordach » Sat May 03, 2014 11:36

Morn76 wrote:Why are you putting these tiny files on Mega instead of posting as an attachment??? Isn't Mega the service where people got sued and the founder was jailed? I'm not using that.

P.S. For synthesis, maybe MT could include the timidity source code. Java 7 has the Gervill softsynth which SoundHelix uses on Linux. The only question would be where to get properly licensed patches. But other than that MIDI is fine for a client-server architecture with limited bandwidth.

Mega.co.nz is fine.

It's possible to combine the two, but people would prefer a real audio stream than a MIDI output. (Trust me, even I dislike MIDI, except when I'm working on it because it's a small file and is basically useful.

+ Spoiler

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Music in Minetest...

by Morn76 » Sat May 03, 2014 11:44

Jordach wrote:He also tweeted that his Call of Duty ping went up when they started spying on him with a wiretap)


And why do they even need a wiretap when they have PRISM and everything goes through a beam splitter? Oh well, I guess it's like the US/UK pretending they had not yet broken Enigma in WW II when they already hat.

Back on topic, of course "real" audio would be better, but the idea is to create auto-composed music either on the server or client and then synthesize that on the client. So I think MIDI is pretty much needed. MIDI doesn't have to sound bad, it all depends on the synthesis engine.

P.S. Ooh, SoundHelix has created something quite catchy:
2014-05-03 13:41:31,954 INFO [Generator] SongUtils: Song name: "The mechanical boy"
2014-05-03 13:41:31,954 DEBUG [Generator] SongUtils: Rendering new song with random seed 3076599096077343850


You can use the song title to recreate a song, so random title generation is actually not a complete gimmick.

P.P.S. The biggest problem with wavetable MIDI synthesis is that it sounds too dry. Something like Calf Chorus and Reverb is needed to make it sound more impressive and less tinny. This is also the main problem MIDI music in PC games had in the 1990s I think. Nice wavetables but no or bad effects. Then again maybe today's softsynths like timidity have built-in reverb?
 

Next

Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 5 guests

cron