Page 1 of 3

Music in Minetest...

Posted: Sat Mar 08, 2014 13:21
by TenPlus1
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...

Posted: Sat Mar 08, 2014 13:42
by Krock
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.

Posted: Sat Mar 08, 2014 16:47
by 4aiman
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!

Posted: Sat Mar 08, 2014 16:52
by TenPlus1
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...

Posted: Sat Mar 08, 2014 17:24
by sfan5
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.

Posted: Sun Mar 09, 2014 07:22
by RealBadAngel
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.

Posted: Sun Mar 09, 2014 07:23
by 4aiman
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!

Posted: Sun Mar 09, 2014 07:48
by RealBadAngel
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...

Posted: Sun Mar 09, 2014 17:25
by 4aiman
So it works like texturepacks and all I need to know are the names of sounds that a game uses?

Posted: Mon Mar 10, 2014 07:07
by RealBadAngel
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.

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

Posted: Fri May 02, 2014 05:30
by spootonium
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.

Re: Music in Minetest...

Posted: Fri May 02, 2014 06:56
by TenPlus1
spootonium: that would be a cool feature indeed if someone managed to implement it...

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

Posted: Fri May 02, 2014 07:27
by thetoon
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.

Re: Music in Minetest...

Posted: Fri May 02, 2014 10:46
by paramat
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.

Re: Music in Minetest...

Posted: Fri May 02, 2014 12:18
by Morn76
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/

Re: Music in Minetest...

Posted: Fri May 02, 2014 12:27
by Evergreen
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.

Re: Music in Minetest...

Posted: Fri May 02, 2014 13:00
by Morn76
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.

Re: Music in Minetest...

Posted: Fri May 02, 2014 13:08
by Evergreen
whoops, sorry. Context can be very important sometimes.

Re: Music in Minetest...

Posted: Fri May 02, 2014 14:09
by Jordach
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

Re: Music in Minetest...

Posted: Fri May 02, 2014 16:05
by Morn76
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.

Re: Music in Minetest...

Posted: Fri May 02, 2014 17:03
by rubenwardy
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:

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.

Re: Music in Minetest...

Posted: Fri May 02, 2014 22:55
by Jordach
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

Re: Music in Minetest...

Posted: Fri May 02, 2014 23:36
by Morn76
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. :-)

Re: Music in Minetest...

Posted: Sat May 03, 2014 00:37
by Jordach
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
Image

Re: Music in Minetest...

Posted: Sat May 03, 2014 03:04
by ZachyGames
I have some relaxing music if you like?

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