Easy audio Looping

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,079
First Language
English




Ever downloaded a great sound track that you wanted to use in the game, but then you found out it just plays from start to finish, and starts playing again from the beginning?

However, if you listen to some of the BGM's that come with RPG Maker, such as the battle themes, you'll notice that they have the intro part, but then it will just keep playing forever.

This is accomplished through a concept called "looping". Basically, let's say you had a 60 second song, and you wanted the part between 15 and 45 seconds to keep playing. You would specify that at the 15 second mark, you would like to start looping, and at the 45 second mark, you would end looping.

Now, your audio file starts playing from the beginning of the song. Once it reaches the 15 second mark, it will notice that it's entered a loop. It will continue to play until the 45 second mark, where it notices that it's at the end of the loop. Now it goes back to the beginning of the loop, and starts playing the song at 15 seconds again.

Normally, this information is set in the music files themselves. However, with this plugin, you can use a simple spreadsheet to maintain audio loops for all of your music files!

This also means you can create different kinds of loops for the same music file if you wanted to, without distributing multiple copies of the same file.
 
More information and downloads are available at HimeWorks
 
Last edited by a moderator:

RyanBram

Veteran
Veteran
Joined
May 13, 2012
Messages
184
Reaction score
173
First Language
Indonesian
Primarily Uses
RMMV
What?!

This is the plugin that I am thinking about and you just made it?

Very, very awesome. Thank you for making it, Tsukihime.

:D
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,079
First Language
English
What?!


This is the plugin that I am thinking about and you just made it?


Very, very awesome. Thank you for making it, Tsukihime.


:D
Thanks. I was actually looking at your tutorial yesterday trying to figure out what unit of measure was being used for the loop start and loop duration to get an idea how looping works.


I'm thinking of linking people to that tutorial to show how people usually set up loop points, so they can get a better idea the motivation behind this.


After making this plugin I've created a couple audio profiles for some of the BGM's I've collected and am pretty satisfied with the looping.
 

KockaAdmiralac

Cube-shaped garbage can
Veteran
Joined
Jun 15, 2015
Messages
570
Reaction score
157
First Language
Serbian
Primarily Uses
N/A
And what's the difference between using a script to do this and using Audacity to modify looping directly?

At least you could do that in VXA...

EDIT : I meant, how is it easier?
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,079
First Language
English
And what's the difference between using a script to do this and using Audacity to modify looping directly?


At least you could do that in VXA...


EDIT : I meant, how is it easier?
1. You don't have to download extra software, or figure out how to get it work. This is a big deal for me.


2. You can have multiple looping profiles without having to distribute multiple copies of the same audio file.


3. You can set custom starting points for your songs. Don't want to start at the beginning? Just specify where you want to start. Again, without having to distribute a different audio file.


4. You could potentially share looping data with others easily. Just have them copy it into their own file and they're good to go. You could build entire public libraries of various profiles for different purposes and people can just grab them as needed.


If you are more comfortable using audacity or other audio editors for editing your music, then this probably wouldn't make too much of a difference. However, for those that are like me who just can't figure out how to use audacity and are satisfied with just looking at when the loops begin and end and writing some times down, it works just as well.
 
Last edited by a moderator:

KockaAdmiralac

Cube-shaped garbage can
Veteran
Joined
Jun 15, 2015
Messages
570
Reaction score
157
First Language
Serbian
Primarily Uses
N/A
Yeah, perhaps I'll stick with Audacity...

But, great job for making this!

I know lots of people will find it useful :)

(It does not mean I think it's useless, I just do it faster with Audacity)
 

Rito

Veteran
Veteran
Joined
Jun 29, 2015
Messages
107
Reaction score
50
First Language
French
Audacity supports only one loop unlike the plugin.

This was the reason for my request.

 

Thanks you !

 


But there comes a question.

Is it possible to start a new music (in command plugin) at the same point as the old?

 

For example, the first music has some instruments and the 2nd is a little more dynamic.

 

A bit similar as the mario kart wii menu:

Part 1:



2nd part: https://youtu.be/fN2dJP0WLDQ?t=44s

3rd part: https://youtu.be/fN2dJP0WLDQ?t=1m6s

etc.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,079
First Language
English
I will provide audio crossfade as a separate plugin
 

ZcheK

ZcheK
Veteran
Joined
Feb 22, 2016
Messages
96
Reaction score
22
First Language
English
Primarily Uses
Is it possible to stop the music looping with a plugin command and have it continue? This would be awesome as you could create a crescendo where the player slowly walks towards something and the music develops with them, they used this a lot in FFVII.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,079
First Language
English
Is it possible to stop the music looping with a plugin command and have it continue? This would be awesome as you could create a crescendo where the player slowly walks towards something and the music develops with them, they used this a lot in FFVII.


I have updated the plugin to v1.2 with support for loading and removing audio profiles while the BGM is playing.


This means that if you load an audio profile and it applies to the current BGM, the current BGM will begin looping (it will not change the initial offset however).


Removing an audio profile will be done the same as before as a plugin command:


remove_audio_profile PROFILE_NAME


The difference is if you remove an audio profile it applies to the current BGM, the current BGM will revert to the default loop info if applicable. So for example, if the profile created a custom 5 second loop, removing the profile will take out that loop and your BGM will continue to play as if the custom loop never existed.


You can apply and remove audio profiles at anytime. Remember that you can have multiple profiles for the same BGM defined in your data file, however only one profile can be active at anytime (I am not sure what happens if you load multiple at the same time)
 
Last edited by a moderator:

omegadaxer

Veteran
Veteran
Joined
Jul 23, 2016
Messages
35
Reaction score
5
First Language
English
Primarily Uses
RMMV
Hi Hime~!


I've followed your instructions, but each time I actually run the plugin command, I get an error that reads: "Cannot read property 'folder' of undefined"


I'm not sure if this is something I'm doing wrong or not, and I've tried starting from scratch and following your instructions multiple times, still to the same error. I'm currently just using your Battle1 template to test it, so literally sticking exactly to the manual here. Any ideas?


Thanks!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly! Going to do another art stream tonight so that I can finish my Fauna Focus piece~ Feel free to drop by!
Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.
The only thing getting me through today so far is coffee. And lots of it.

Forum statistics

Threads
97,852
Messages
947,384
Members
129,079
Latest member
DerLaPux
Top