Play two tracks of music at the same time(Please Help!)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
clua
Miko-Class Veteran
Posts: 537
Joined: Sat Dec 12, 2009 1:38 pm
Completed: Stormy Night /The Knife of the Traitor/Charlatans
Projects: The Hurtful Wall /_Salomon/Infurubia
Tumblr: notttt-che
itch: chegovia
Location: In a jar with pirañas
Contact:

Play two tracks of music at the same time(Please Help!)

#1 Post by clua » Tue Jun 14, 2011 8:12 pm

Hello!
Here s my problem
There s a part of the visual which I would like to hear the sound of rain(in a very low sound)and the main music of the scene also at the same time.

What I have now Is the scene with the rain sound playing(and ocassionally some thunders sounds) and then I play the music track but it stops the rain sound..

What should I do? Please help! :oops:
♦WIP♦
Infurubia
The hurtful wall
_Salomon

♦COMPLETE♦
+The Knife of the Traitor(Nanoreno 2012)
+Charlatans(Nanoreno 2015)

Dev tumblr
EVN Store

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: Play two tracks of music at the same time(Please Help!)

#2 Post by Aleema » Tue Jun 14, 2011 8:22 pm

I usually make a new sound channel for ambience sounds like rain, etc.

Code: Select all

$ renpy.music.register_channel("ambience", "sfx", True)
(rename "ambience" to whatever you want)

And then call it like:

Code: Select all

play ambience "rain.mp3" fadein 3.0
You have to stop it like music, too.

User avatar
clua
Miko-Class Veteran
Posts: 537
Joined: Sat Dec 12, 2009 1:38 pm
Completed: Stormy Night /The Knife of the Traitor/Charlatans
Projects: The Hurtful Wall /_Salomon/Infurubia
Tumblr: notttt-che
itch: chegovia
Location: In a jar with pirañas
Contact:

Re: Play two tracks of music at the same time(Please Help!)

#3 Post by clua » Tue Jun 14, 2011 8:41 pm

°A° amazing! It worked
Thank you so much !!
♦WIP♦
Infurubia
The hurtful wall
_Salomon

♦COMPLETE♦
+The Knife of the Traitor(Nanoreno 2012)
+Charlatans(Nanoreno 2015)

Dev tumblr
EVN Store

Post Reply

Who is online

Users browsing this forum: No registered users