WML macros that group default songs by mood

Create music and sound effects for mainline or user-made content.

Moderator: Forum Moderators

Post Reply
User avatar
solsword
Code Contributor
Posts: 291
Joined: January 12th, 2009, 10:21 pm
Location: Santa Cruz, CA
Contact:

WML macros that group default songs by mood

Post by solsword »

Not sure if this should go here or in the WML forum, but it seems less technical, so I'm posting it here.

I just started working on the first scenario of my first campaign, which is also my first work with WML, so I'm kinda jumping into things, but when I got to making the [music] tag, I noticed that the built-in music macros in sound-utils.cfg are a bit lacking. I can get the default playlist, or I can set a single song as the song for the scenario, but as I had no idea what the different songs sounded like, and the default playlist includes basically all of them, I found that my first task was to listen to all of the default songs, so that I could decide which to use.

While doing that, I decided that a 1-song playlist would be rather boring, so I wrote a series of macros that group the default songs into moods (as I see them) and then generate playlists for those moods. I also added macros for picking a random song to play once for various events (e.g. pick a sad song to play).

I now have a group of macros that can do things like change to a "battle" playlist or play a "sad" song and then move back to the previous playlist. They are rather simple macros, but I think that it would be useful to include them in something like sound-utils.cfg (maybe "mood-utils.cfg"?) for two reasons. First, it suggests to people new to the sound files what sound files they can use for various purposes: i.e. other people might not have to listen to each of the tracks to get some idea of what they're like. Second, it provides convenient playlist control to scenario builders: You can do something like {MOOD_NORMAL} and then have an event that does {MOOD_BATTLE} when the real fighting begins, without having to worry too much about constructing the playlists and which songs should be on them. Also, I hope that making it easier to control the music broadly without thinking about details will encourage more people to use more controlled music in their scenarios/campaigns.

Of course, people may not agree with my mood categories, or my assignments of specific songs to specific moods. That's fine with me, I'm willing to accept modifications of my macros that others can agree on. I'd like to avoid there being too many moods (as that would discourage people from using the system due to complexity), but maybe there are some that I've missed that should be there. In any case, I would like to see this make its way into the standard macros, if possible, but I'm not sure what the procedure for that is. I figured that suggesting it on the forums was a good first step.

I've attached my .cfg file for mood macros to this post.
Attachments
music_indented.cfg
The WML file for my mood macros.
(4.49 KiB) Downloaded 306 times
The Knights of the Silver Spire campaign.

http://www.cs.hmc.edu/~pmawhorter - my website.

Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: WML macros that group default songs by mood

Post by zookeeper »

solsword wrote:Of course, people may not agree with my mood categories, or my assignments of specific songs to specific moods. That's fine with me, I'm willing to accept modifications of my macros that others can agree on. I'd like to avoid there being too many moods (as that would discourage people from using the system due to complexity), but maybe there are some that I've missed that should be there. In any case, I would like to see this make its way into the standard macros, if possible, but I'm not sure what the procedure for that is. I figured that suggesting it on the forums was a good first step.
Well, nothing wrong with having a macro set like that, but I'm not sure if it's a good idea for mainline. There'll be disagreement over which songs belong to which moods. Also, I think that our mainline macro library is getting too big. There are already over 300 macros in about 20 separate files, which is quite a lot. I'm getting rather hesitant of adding much new macros in the "might be useful to someone, but not needed in mainline" category. And it looks like those can't be directly used both for setting the scenario's starting playlist and immediately switching the music mid-scenario.

Of course we can still add them if a lot of people seem to really want it.
User avatar
solsword
Code Contributor
Posts: 291
Joined: January 12th, 2009, 10:21 pm
Location: Santa Cruz, CA
Contact:

Re: WML macros that group default songs by mood

Post by solsword »

According to my understanding of WML (which is quite limited at this point), the CUE_* macros should work for switching music mid-scenario, while the MOOD_* macros change the playlist. So if you wanted immediate battle music you'd do {CUE_BATTLE}, and if you wanted that battle music to continue, you'd do {CUE_BATTLE} followed by {MOOD_BATTLE}. Will that not work?

I do understand the need to fight bloat, so maybe putting these in mainline isn't the best idea. I guess I just want to encourage more creative use of the playlist system than the SCENARIO_MUSIC macro provides for. Of course, single-song playlists may not be that bad after all, since most of the songs are quite long and bear repetition well. What would people think of a README file in the music/ directory that contained the song's author's thoughts on mood, just to help guide new developers looking for a song to use?
The Knights of the Silver Spire campaign.

http://www.cs.hmc.edu/~pmawhorter - my website.

Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Re: WML macros that group default songs by mood

Post by turin »

Even if you don't want to define macros for them, it might be useful to have a file (not even necessarily a WML file) listing all the music files and giving a brief description... otherwise you still have the problem of having to listen to every single track (and there are dozens, each 2-6 minutes long) before you can find out what songs to put in each scenario.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: WML macros that group default songs by mood

Post by zookeeper »

solsword wrote:According to my understanding of WML (which is quite limited at this point), the CUE_* macros should work for switching music mid-scenario, while the MOOD_* macros change the playlist. So if you wanted immediate battle music you'd do {CUE_BATTLE}, and if you wanted that battle music to continue, you'd do {CUE_BATTLE} followed by {MOOD_BATTLE}. Will that not work?
Hmm, yeah, it might. I'm not sure if immediate=yes is implied when using play_once=yes, but otherwise yes.
solsword wrote:I do understand the need to fight bloat, so maybe putting these in mainline isn't the best idea. I guess I just want to encourage more creative use of the playlist system than the SCENARIO_MUSIC macro provides for. Of course, single-song playlists may not be that bad after all, since most of the songs are quite long and bear repetition well. What would people think of a README file in the music/ directory that contained the song's author's thoughts on mood, just to help guide new developers looking for a song to use?
Well, mainline campaigns do use multi-track playlists for almost all scenarios, so I'd imagine that just using single-track playlists or otherwise ignoring the capabilities of changing music mid-scenario are mostly just due to the author not caring about music or simply being a noob. In either case, I doubt a new set of macros would really help them; to use them, they must know they exist.

Also, authors who care about music in their campaigns and are not noobs are likely to want to decide which exact tracks will play in their scenarios, so they'd still have to check what tracks the macros actually contain and probably make some exceptions anyway. All in all, I just feel like these would cause more work and confusion than they'd save, and the potential users would be pretty much only those who haven't yet learned how to specify their playlists and alter them mid-scenario; which isn't much harder than learning these macros would be.
User avatar
solsword
Code Contributor
Posts: 291
Joined: January 12th, 2009, 10:21 pm
Location: Santa Cruz, CA
Contact:

Re: WML macros that group default songs by mood

Post by solsword »

Good points... I guess the macros really aren't useful given that anyone with the will to use them can just-as-easily code them themselves.

I stick by my idea of a music-description file, though.

Also, anyone is welcome to use the macros, and if it seems appropriate, I may post them as examples of MusicWML, or as a separate playlist control tutorial on the wiki.
The Knights of the Silver Spire campaign.

http://www.cs.hmc.edu/~pmawhorter - my website.

Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
Post Reply