How to change music in the middle of the novel?

Questions, skill improvement, and respectful critique involving music, sound, and movies.
Post Reply
Message
Author
Foxx
Newbie
Posts: 4
Joined: Mon Jan 19, 2015 8:30 pm
Deviantart: Crafted-Comics
Skype: The_Derpinator15
Contact:

How to change music in the middle of the novel?

#1 Post by Foxx »

Hi, I'm kinda new to Ren'Py and am just a simple visual novel writer. I'm just wondering if anyone can help me learn how to make the music change from one track to another in a certain part. Say, Happy music plays in the beginning but the situation evolves into a horror and now I want it to fade into the horror track I have.

User avatar
Catlip Candy
Regular
Posts: 147
Joined: Tue Nov 25, 2014 5:03 am
Completed: Raven // Encanto
Projects: My Twisted Love Story (title susceptible to change)
Organization: Catlip Candy
Tumblr: catlipcandy
Deviantart: CatlipCandy
Soundcloud: Catlip Candy
itch: catlipcandy
Location: Philippines
Contact:

Re: How to change music in the middle of the novel?

#2 Post by Catlip Candy »

Uh... You type "play music" and "stop music" .... Does this help you? :XD Sorry. I'm new too. But it works for me.
All I ask from the readers is to give feedback on what they think I should improve more.
Even the harshest comments are welcomed and greatly appreciated, as long as it is your truthful opinion!
Please help me become a better visual novel creator!

Image
~~~~~~ Catlip Candy ~~~~~~~



User avatar
78909087
Veteran
Posts: 277
Joined: Sat Aug 16, 2014 2:33 pm
Completed: Dungeons and Don't Do It, Wake Up
Projects: Lethe
IRC Nick: Pacermist
Contact:

Re: How to change music in the middle of the novel?

#3 Post by 78909087 »

Foxx wrote:Hi, I'm kinda new to Ren'Py and am just a simple visual novel writer. I'm just wondering if anyone can help me learn how to make the music change from one track to another in a certain part. Say, Happy music plays in the beginning but the situation evolves into a horror and now I want it to fade into the horror track I have.
At the beginning of the game, you will have something like this

Code: Select all

play music "this_is_my_music.mp3"
if you want it to fade in, you can make it

Code: Select all

play music "this_is_my_music.mp3" fadein(3.0)
Where the music will fade in over three seconds. (You can change the number inside the brackets. 2.0 = two seconds, 1.5 = 'one and half' seconds.)
This also applies to the 'stop music' function

Code: Select all

stop music
Which you can add a fadeout to.

Code: Select all

stop music fadeout(4.0)
Where it will fade out to silence over four seconds. Like before, you can change the number inside the brackets.
You can apply fadeout to the stopping track before adding the new music, to make the transition less sudden.

For example, in script.

Code: Select all

label start:
    play music "ambiance.mp3" fadein(3.0)
    "Villager" "Oh no, the sky will fall."
    "Villager" "I don't know what we'll do."
    stop music fadeout(4.0)
    "Hero" "Never fear! I will protect you."
    "Hero" "Even I was once a scared little boy..."
    play music "Childhood.mp3" fadein(3.0)
    "Hero" "It all started..."

User avatar
Catlip Candy
Regular
Posts: 147
Joined: Tue Nov 25, 2014 5:03 am
Completed: Raven // Encanto
Projects: My Twisted Love Story (title susceptible to change)
Organization: Catlip Candy
Tumblr: catlipcandy
Deviantart: CatlipCandy
Soundcloud: Catlip Candy
itch: catlipcandy
Location: Philippines
Contact:

Re: How to change music in the middle of the novel?

#4 Post by Catlip Candy »

:oops: Much more precise and complete... :lol: I'm never good at explaining >_<
All I ask from the readers is to give feedback on what they think I should improve more.
Even the harshest comments are welcomed and greatly appreciated, as long as it is your truthful opinion!
Please help me become a better visual novel creator!

Image
~~~~~~ Catlip Candy ~~~~~~~



User avatar
78909087
Veteran
Posts: 277
Joined: Sat Aug 16, 2014 2:33 pm
Completed: Dungeons and Don't Do It, Wake Up
Projects: Lethe
IRC Nick: Pacermist
Contact:

Re: How to change music in the middle of the novel?

#5 Post by 78909087 »

Fake Existence wrote: :oops: Much more precise and complete... :lol: I'm never good at explaining >_<
It comes with practise :wink:

Foxx
Newbie
Posts: 4
Joined: Mon Jan 19, 2015 8:30 pm
Deviantart: Crafted-Comics
Skype: The_Derpinator15
Contact:

Re: How to change music in the middle of the novel?

#6 Post by Foxx »

78909087 wrote:
Foxx wrote:Hi, I'm kinda new to Ren'Py and am just a simple visual novel writer. I'm just wondering if anyone can help me learn how to make the music change from one track to another in a certain part. Say, Happy music plays in the beginning but the situation evolves into a horror and now I want it to fade into the horror track I have.
At the beginning of the game, you will have something like this

Code: Select all

play music "this_is_my_music.mp3"
if you want it to fade in, you can make it

Code: Select all

play music "this_is_my_music.mp3" fadein(3.0)
Where the music will fade in over three seconds. (You can change the number inside the brackets. 2.0 = two seconds, 1.5 = 'one and half' seconds.)
This also applies to the 'stop music' function

Code: Select all

stop music
Which you can add a fadeout to.

Code: Select all

stop music fadeout(4.0)
Where it will fade out to silence over four seconds. Like before, you can change the number inside the brackets.
You can apply fadeout to the stopping track before adding the new music, to make the transition less sudden.

For example, in script.

Code: Select all

label start:
    play music "ambiance.mp3" fadein(3.0)
    "Villager" "Oh no, the sky will fall."
    "Villager" "I don't know what we'll do."
    stop music fadeout(4.0)
    "Hero" "Never fear! I will protect you."
    "Hero" "Even I was once a scared little boy..."
    play music "Childhood.mp3" fadein(3.0)
    "Hero" "It all started..."
Thanks. This worked!

Post Reply

Who is online

Users browsing this forum: No registered users