Music files by name

Started by namida, January 24, 2016, 01:44:14 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

namida

Okay, this is a feature that's been requested plenty of times in the past - and I finally got around to properly implementing it!

This of course requires support from all three angles - the editor, the player, and the Flexi Toolkit. Since firstly, this feature hasn't been thoroughly tested yet, and secondly, there's other things I want to do before an update; I can't release a stable update with these features yet, but I've uploaded an experimental version that has these features.

The player is the same as always - load content in it, it should play. Please report (in this topic, or in the usual place, but make it clear you're reporting an issue with the experimental release!) if:
- You configure something that according to these instructions should work, but doesn't
- Any older packs suddenly have issues with their music when played in this version, that they did not have when playing in V1.37n / V1.38n / V1.38n-B
In particular, there may be problems in packs that mostly rely on specifying music for every level, rather than using any rotation at all.

The editor is not much changed. The only change is that the music file name is now editable for NeoLemmix levels (previously it was only editable for SuperLemmini levels). You can enter a filename here - don't put any extension; it will first try to load an OGG, then if one isn't found, an IT. Note that you now must outright specify a special music for gimmick / frenzy levels; it's no longer automatic. (Older NXPs will still play special music on those levels, but new ones or individual LVL files will not.)
Note that only the EXE of the editor has been uploaded. Get the data files from the latest stable release.
I doubt there's any problems with this in the editor, but if you do encounter any, let me know.

The Flexi Toolkit has the most visible changes. The music and music pack lists are no longer "Track 1", "Track 2" etc, but just have actual filenames. You can put whatever OGG / IT files you like in there (note: if importing an old pack, you might need to manually re-add music pack files, and possibly remove them from the default music list). The "Edit Track Rotation" button allows you to specify a custom track order - and yes, you can have the same track more than once in your order!
Chances are there's bugs to hell and back with this part of it, so if any pop up, be sure to report them.
Note: You might notice the "Add Default Graphic Set" button is gone; that's because you don't need to include default graphic sets anymore (you only need to include custom ones). Actually, the same applies to default musics too, but I haven't got around to removing that button yet.

Note that a music filename, when specified for a level, cannot exceed 16 characters (excluding the extension). For those that are just used in the normal rotation, they can be as long as you like.
In both cases, they cannot (again, excluding extension) start or end with a space; but they can have a space in the middle.

Please do NOT use any of these experimental versions to create for-release content! They're for testing purposes only! If you do decide to release content based on test versions, then it later breaks, I will not make a special effort to get it working again! Always use stable versions for intended-for-release content!
(It's probably okay to use this editor version, though. But I make no guarantees. For the others, at this point it's probably safe to use them for working on projects, but wait for a stable one before any actual release.)


If you have any questions about how to work this, please reply in this topic. Only post on the bugs subforum if you find a bug with them (or have a suggestion on how to improve it).
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

#1
Known or suspected bugs:

Note: This is only for bugs specifically relating to the new features; not bugs that have existed for a while and just not yet been fixed in these versions.
"Suspected" means that I'm pretty sure the bug will occur based on the code, but haven't actually tested to see if it does.

Player
- (Suspected) If a level doesn't outright specify the music, and the pack has no tracks in its rotation list, the game will probably crash. (It might just play no music instead.)
>> Tested. It doesn't crash, it just doesn't play any music (this is probably the best behaviour to have in such a case).

Editor
(None)

Toolkit
- Still need to remove "Add Default Music" button
- Still need to make sure error checker doesn't report missing musics when default ones are used
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

I uploaded a newer copy of the Flexi Toolkit that fixes some major bugs in the first experimental version, as well as allowing editing the track rotation in the toolkit itself (rather than having to use an external tool). :)

I still wouldn't recommend using it to build for-release NXPs, but at this point, it's probably safe to use it for working on projects and getting ready for the next update (if you intend to update your NXPs, or if you're working on a new project - I will stress that, as always, you do not need to update your NXPs if you aren't interested in using the new features; old ones will continue to work fine!).
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Wafflem

This is excellent! :thumbsup:

This will make things more convenient for people.

I've tested some of my levels (not part of DynaLems) by music name, and the levels work just fine! :thumbsup: I haven't texted the Flexi Toolkit yet though.

However, seems that there is a character limit. For example, I have a music named AcornONMLSuperLem.it. I type this exact lettering, as shown in the first picture. However, when I open it in the level, I get the error and it becomes "acornonmlsuperle", without the m at the end. Is the character limit intended?
YouTube: www.tinyurl.com/YTWafflem
Twitch: www.twitch.tv/Wafflem467

Have level designer's block right now? Have some of my incomplete levels for LOTS of ideas!

namida

Yes; it's just a result of how the music name is actually stored in the LVL file (LVL files have actually been storing them for a long time now; I just never got around to doing the rest of the work needed until now). The limit is 16 characters; this does not include the extension.

This limit will be a thing of the past once I implement a text-based level format, but that might be a while away yet.

There's no length limit (within reason) on names in the standard rotation; only those specified on a per-level basis.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

#5
Alright so, aside from fixing a few annoying bugs in the Flexi Toolkit - not major ones, pretty much all of them just relate to the Check Issues giving false positives (and less often, false negatives) in relation to music files - it seems that this is mostly ready to go.

One thing I am thinking - similar to how default musics don't need to be provided, there should also probably be a way to have global music packs. If a user prefers the DOS versions of ONML musics over the Amiga ones, they shouldn't have to create a seperate copy of the music pack for every pack that uses ONML music.
EDIT: Okay, done that. I didn't upload a new experimental version for it, though.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

alexis9000

didn't knew the music files here were PNG files. Seems like I'll have to convert again :\

Nepster

NO! Music cannot be stored in .png files.
You can use .ogg (recommended), .mod (if you have them), .mp3 and some other file formats.

alexis9000

I have a file that it's not working (some .it file) when I play my level instead of playing my .it file, it plays "Can-Can" and I don't want that, I want it to play the new song (I already put the song in Flexi ToolKit, already tried to write the name of the file in NeoLemmix Editor, but nothing). Then I thought maybe I had to modify some "music.txt" file, but then I looked inside it "how am I supposed to modify such a thing if no one tells me to modify it?" so that's why I am so confused, lol.

IchoTolot

Quote from: alexis9000 on November 19, 2016, 03:09:48 PM
I have a file that it's not working (some .it file) when I play my level instead of playing my .it file, it plays "Can-Can" and I don't want that, I want it to play the new song (I already put the song in Flexi ToolKit, already tried to write the name of the file in NeoLemmix Editor, but nothing). Then I thought maybe I had to modify some "music.txt" file, but then I looked inside it "how am I supposed to modify such a thing if no one tells me to modify it?" so that's why I am so confused, lol.

can we have the .it file?

It needs to be in the toolkit + the level must have set it as it's track. Also the filename CAN be too long. I would recommend getting the pack to work first -- then care about the music.

Nepster

One thing you might want to check: In the editor the music file has to be entered without the file extension, i.e. "myMusic" instead of "myMusic.it".

alexis9000

Quote from: Nepster on November 19, 2016, 03:23:36 PM
One thing you might want to check: In the editor the music file has to be entered without the file extension, i.e. "myMusic" instead of "myMusic.it".

Thanks, but it still won't work that way. I've put the file for you attached. Gotta go now, I'll be back later.

Somehow I'm also not being able to put the file in this forum, so I've put it on sendspace for you, here it is --> https://www.sendspace.com/file/9t4q1a

IchoTolot

#12
Quote from: alexis9000 on November 19, 2016, 03:34:08 PM
Quote from: Nepster on November 19, 2016, 03:23:36 PM
One thing you might want to check: In the editor the music file has to be entered without the file extension, i.e. "myMusic" instead of "myMusic.it".

Thanks, but it still won't work that way. I've put the file for you attached. Gotta go now, I'll be back later.

Somehow I'm also not being able to put the file in this forum, so I've put it on sendspace for you, here it is --> https://www.sendspace.com/file/9t4q1a

A 45 MB ".it" file :lem-mindblown:

Normally these are hardly 100 KB

Even as a MP3/OGG this file size is huge for a ~ 5 min song! I think somehow your conversion is wrong, even if I can play the song. Also try remane it ahrix01, the "_" could cause problems.

My recommendation would still be: Get the levels + pack to work and then try to put in the right music as I still sense that the main problem is located there.

EDIT:

After downloading your file and creating a test level in the cavelem style (attached): I got your music to work! (without the _ in the name)

To load the level in the NeoLemmix Player put the track in the music folder (leaving out the "_" in the file name). Test playing in the editor with a testplayer: Make a music folder for the test player and put the file in there. Be sure that you have the tileset!
Try to load my level in the editor to see how I put in the music track in the level properties window!

Also there is no way the file needs to be 45MB  try to turn the size down :P

IchoTolot

#13
Afterthought: We assume that your .it file is actually an uncompressed wavefile! That would explain the size of it!  Try to convert the original (I assume) wavefile properly to an OGG file using a music editor like Audacity.

Dullstar

#14
I think the samples in .its may be partially compressed based on a test, but I'm not sure (it could also be setting related).  I opened the .it file in OpenMPT and converted it to a .wav using the default settings. The resulting file was 105 MB. I tried saving the sample (not a typo - singular sample) from the .it as well and got a smaller size of 23.7 MB.

I'm not entirely sure what's going on there, but whatever.

Anyway, the main point is that the file is indeed a .it that contains two notes - a C-5 in 2 channels (one left panned, one right panned, resulting in center panning), of one sample consisting of the entire song. This is consistent with what happens if you go into OpenMPT and go to File->Open->(Some Sort of Wave File).

An .ogg of this song should be about 5 MB. I did a conversion. I won't upload it here, though, because it's not mine.

To convert to ogg:
http://www.audacityteam.org/
Using this program, (Audacity), open the file (I believe you'll need to use the File->Import function rather than File->Open if I recall correctly). Then, once it's been loaded just hit Export, set the file format to .ogg, and you're good to go!

Mod/it/xm/etc. files tend not to be very large; often (usually?) much less than 1 MB. If it's large that means it probably wasn't an appropriate use of the format.