Changing BGM pitch without replaying?

There's a part of my game where night suddenly falls, and I want the pitch of the BGM to fall along with it. But, I have no idea how to do it. I'm pretty sure a script can fix it, but I couldn't make heads or tails of what I found when I looked it up.

Knowing how this works would also help other parts of my game since music is such an integral part.
just use a change background music command and set it a lower pitch of course how you use this will depend on how exactly night is falling in your game.
just use a change background music command and set it a lower pitch of course how you use this will depend on how exactly night is falling in your game.
WITHOUT replaying. I want the music to continue on as normal and have the pitch decrease, not start the song over.
I know that it has been tried, I remember a thread somewhere on this forum about it.

But it eventually didn't lead to a solution. The way sounds are handled is inside hidden classes of the engine.

I may be wrong, but I don't think you'll be able to do it with Ace.

Edit: something close was found here.
Okay so I tested it using the script at the top

38bce85481.png


But I got this error message when I tried playing it:

226eaf403c.png


I don't get why... That IS the title of the song.

04a0fd22f9.png
I've just tried the code and it works for me.  I am wondering about that apparent line break in your script call.  I can get the whole call on to one line.  Is there a reason why yours is split?  As it appears to have split in the middle of the name, that could be what is throwing the whole thing off.
I've just tried the code and it works for me.  I am wondering about that apparent line break in your script call.  I can get the whole call on to one line.  Is there a reason why yours is split?  As it appears to have split in the middle of the name, that could be what is throwing the whole thing off.
What do you mean? When I copy "Audio.bgm_play("Audio/BGM/14 Abandoned Water", 80, 60, Audio.bgm_pos)" into the script box it automatically text wraps.
I have the updated version of Ace and perhaps it has a wider script box than the earlier version.  

The reason I was asking is that I have seen several posts in different queries which warn that splitting the line can cause problems, and that one cannot rely on the automatic wrapping to get it right.  I know that there is a work around, but don't remember what it is.

I think you will have to wait until someone who does know reads this thread.
I can confirm that on the earlier version (1.01a) it breaks at this position.

Edit:

It works if you manually break the line like this:

Audio.bgm_play(
"Audio/BGM/14 Abandoned Water", 80, 60,
Audio.bgm_pos)
The latest version has bigger window indeed, but still the same issue can happen.

If your title is too long and it's wrapped (even automatically) it still counts as next line and doesn't know how to combine them.

If your title will be short enough to have:

Audio.bgm_play("Audio/BGM/Abandoned",100, 120, Audio.bgm_pos)Then it will work. If a line is ending with a 'comma' then it will continue reading the code as normal.

I tried putting

Audio.bgm_play("Audio/BGM/Super_Long_Title_Of_The_Soundtrack_I_Mean_BGM_That_Will_Not_Fit_Into_The_Window_And_Will_Cause_Crash", 100, 120, Audio.bgm_pos)(It was automatically wrapped, due to no space.)

And it crashed.

Try using shorter BGM titles if they're not fitting.
I can confirm that on the earlier version (1.01a) it breaks at this position.

Edit:

It works if you manually break the line like this:

Audio.bgm_play(

"Audio/BGM/14 Abandoned Water", 80, 60,

Audio.bgm_pos)
Hmm it works but there's a pretty noticable pause before it starts playing, so it's still got the same problem as the song starting over.
Then if it is not possible to prevent that, perhaps you have to be a bit sneaky and disguise it.  You don't say how the transition from day to night is caused, but if it is evented, then playing around with something like this might work.

Use a suitable SE or ME with the command for night to fall.  For that sound it could be a sort of tinkling that often goes with starlight, or anything you want.  As it is playing, it will cover over the pause in the pitch change in the BGM.  Possibly the order of event commands would be

Play SE

Change pitch

command to change to night.
Hmm it works but there's a pretty noticable pause before it starts playing, so it's still got the same problem as the song starting over.
I was also thinking about this - and have no idea how to prevent that.

It's like the BGM is starting form 0 volume and goes to the defined volume from script call.

To be honest I got curious myself - let's say I have a battle, where the less boss's HP is - the higher pitch of the BGM - tense and stuff.

As the OP it'd like to change the pitch without any pause, would that be possible?
@Rikifive

That's actually quite a different question as it is for a battle scene. Let's stick to one question at a time.
@Rikifive

That's actually quite a different question as it is for a battle scene. Let's stick to one question at a time.
Wouldn't the same script apply to a battle?

The night falls by an event that the player walks over, it just tints the screen.
Then if you to try what I suggested above put it in the event on that tile.

And Rikifive's is a bit of a different question because it needs to be tied in with keeping track of the boss's HP etc.
I just gave an example - I know how to make that stuff (keep track of the boss's HP) - that's obvious. (okay, for me at least)

I asked:

As the OP it'd like to change the pitch without any pause, would that be possible?
That's the only question in my post - There's nothing about 'how to setup that in battle' etc.

Why I was referring to 'battle scene'? Because I thought, that without that example/argument I'd be asked "But why do you need this, can't you just use that workaround?"

Koi is right - I want to know absolutely the same thing, nothing more.
Then if you to try what I suggested above put it in the event on that tile.

And Rikifive's is a bit of a different question because it needs to be tied in with keeping track of the boss's HP etc.
I did put it on the tile, it doesn't matter when or where I put the script, there's always a pause. I have a BGS of spring peepers that starts at that point, but it doesn't do a very good job of covering up the obvious gap.

And it's not really different, just take the script and put it in the battle events, set the condition according to the enemy's HP. The problem is the script itself. And I know nothing about coding :/
Well, my honest opinion is that cabfe is probably right and this cannot be done in Ace. 

The only other workaround that I can think of is this:

Event command fade out BGM over a couple of seconds so that it is not an abrupt stop

Same event do a script call to fade in the BGM with the lower pitch.

The exact timing will need some experimenting.

Tthere is no event command to fade in music, so you will have to use the script "Audio Fade In"  by rpgmakersource.  I am having huge problems loading pages on the site, so I can't help you find a link, but if you search the VXAce script forum using audio and fade as your search terms, you should find it fairly easily.  Alternatively, you should find it on the freebies page of their website at rpgmakersource.com

EDIT

here is the link

http://forums.rpgmakerweb.com/index.php?/topic/40032-audio-fade-in-easy-to-use-bgm-bgs-me/?hl=%2Baudio+%2Bfade

Original thread: https://forums.rpgmakerweb.com/threads/changing-bgm-pitch-without-replaying.46019/