A downloadable plugin

Buy Now$2.00 USD or more

THIS PLUGIN WILL NOT WORK WITHOUT SOUNDTRACK MANAGER!

With this plugin, you can layer multiple music tracks, playing all of them at once! Even more powerful than the variable mix feature of Soundtrack Manager, this lets you fade individual parts of music out without fading out the rest!

All layers must be loaded using Soundtrack Manager's LoadBGM command. A base track must be playing when playing a layer. The base track cannot be controlled via "layer" commands, so pick something that you want to be consistent at all times (the track can be silent if you really want.) The base track's loop settings will be used for all layers, so make sure each layer is long enough to cover the loop! 

You can play as many layers as you want at once, so long as your computer can handle it! (Do make sure all layers sound good together, though - your players won't appreciate a horrible cacophony of different tracks playing at once!)

If the base track stops playing, so will all layers.

Commands and their parameters are wrapped into the Plugin Command feature of RPG Maker MZ.

Playing a layer

Plugin command:
PlayBGMLayer trackAlias parameter=value parameter=value ...

Plays the given track over the currently-playing base track. The alias is the one defined in LoadBGM (see Soundtrack Manager for more details).

All parameters are optional. They are separated by spaces, but cannot contain any spaces within them (including before and after = signs). Valid parameters are:

fadeIn

Causes a fade-in effect when the track starts playing. Without this, the track will start at full volume instantly.

fadeTime=5

In seconds, sets how long the fadeIn effect takes. Default value is 1 second.

volume=75

Overrides the volume setting.

pan=-36

Overrides the pan setting.

Playing many layers at once

Plugin command:
PlayBGMWithLayers baseTrackAlias layerAlias layerAlias ...

This command lets you play a bunch of tracks all at once! All must be loaded with LoadBGM before playing. The first track will be set as the base track; all other tracks will be layers. No special parameters can be called for each layer with this command, so set them up appropriately in LoadBGM.

Stop a layer

Plugin command:
StopBGMLayer trackAlias

Simply stops a single layer. The base track and other layers will not be affected by this.

Fade a layer out

Plugin command:
FadeOutBGMLayer trackAlias fadeTime

Causes a single layer to fade out. If a number is provided for "fadeTime", then the fade-out effect will take that long (in seconds); default is 1 second.

Updated 22 days ago
Published 23 days ago
StatusReleased
CategoryTool
AuthorHeroicJay
TagsAudio, Music Production, RPG Maker, RPG Maker MV, RPG Maker MZ

Purchase

Buy Now$2.00 USD or more

In order to download this plugin you must purchase it at or above the minimum price of $2 USD. You will get access to the following files:

Jay_SoundtrackLayering.js 9.5 kB
Jay_SoundtrackLayeringMZ.js 11 kB

Development log

Comments

Log in with itch.io to leave a comment.

OK so I am confused, what does this do that the soundtrack manager does not?

(1 edit)

This lets you play multiple BGMs at once stacked on top of each other. It is another way to do dynamic music changes. In Soundtrack Manager, you can do dynamic music changes only by swapping between completely different tracks.

I wanted to put up a demo on YouTube to show how it would work, but the tracks are in need of a bit of refinement. What I'd intend to do with that demo is a feature I'm implementing into Jay's Journey: each playable character, when in the active party, adds an instrument to the "Ready to Rock" battle theme.

Let's say I was trying to do that with Soundtrack Manager alone. And let's say there are exactly 10 playable characters (Jay's Journey and Jay's Journey 2 combined have more than that.) This would require no fewer than:

* 10 different tracks for just one character present
* 45 different tracks for two characters present (10 * 9 / 2)
* 120 different tracks for three characters present (10 * 9 * 8 / (3 * 2))
* 210 different tracks for four characters present (10 * 9 * 8 * 7 / (4 * 3 * 2))

So 385 different versions of the battle theme - and that number only goes up quickly with each additional character! Clearly not worthwhile.

How many tracks would that take with Soundtrack Layering? 11. One base track and one track for each playable character. Adding another character adds one more track. 

I see. thank you. Can you add recommndations on how to merge this into the main plugin, or it can simply be loaded after that?

(-1)

I don't know what you mean by "merge", but you should place this after Soundtrack Manager in your plugin list if you use it.

Merge = literally copy and paste part of the code in the main one so not to have two plugins loaded.

Controlling the volume of the layered BGM can only be done with your plugin commands, yes?

(2 edits)

I guess you could do that. There may be a function or two that exists in both plugins. It's not really a scenario I support.

And yeah, there's no way to adjust the volume of the layers without my plugin, because base RPG Maker wasn't designed around having layers. (Except the Fade Out command, which I did overwrite to fade out all layers at once.) And... I actually realize there's a scenario involving adjusting layer volume I never tested. I'll... just check that real quick.

EDIT: Tested it. Found a small issue. Updated Soundtrack Manager to fix it. Thanks for somewhat indirectly making me realize it might be an issue. *ahem*

If you try to play the current base track at a different volume, either through Soundtrack Manager or the built-in PlayBGM command, it will change the volume only of the base track. If you use PlayBGMLayer with a layer that's already playing at a different volume, then it will adjust the volume only of that one layer.

(+1)

Thanks for the effort mate. More audio control in MV is amazing to have.