How to change music in the middle of the novel?
-
- 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?
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.
- 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?
Uh... You type "play music" and "stop music" .... Does this help you? :XD Sorry. I'm new too. But it works for me.
- 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?
At the beginning of the game, you will have something like thisFoxx 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.
Code: Select all
play music "this_is_my_music.mp3"
Code: Select all
play music "this_is_my_music.mp3" fadein(3.0)
This also applies to the 'stop music' function
Code: Select all
stop music
Code: Select all
stop music fadeout(4.0)
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..."
- 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?
Much more precise and complete... I'm never good at explaining >_<
- 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?
It comes with practiseFake Existence wrote: Much more precise and complete... I'm never good at explaining >_<
-
- 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?
Thanks. This worked!78909087 wrote:At the beginning of the game, you will have something like thisFoxx 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.if you want it to fade in, you can make itCode: Select all
play music "this_is_my_music.mp3"
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.)Code: Select all
play music "this_is_my_music.mp3" fadein(3.0)
This also applies to the 'stop music' functionWhich you can add a fadeout to.Code: Select all
stop music
Where it will fade out to silence over four seconds. Like before, you can change the number inside the brackets.Code: Select all
stop music fadeout(4.0)
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..."
Who is online
Users browsing this forum: No registered users