Intro music track seamlessly switching to a loop track

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
duanemoody
Regular
Posts: 100
Joined: Fri Oct 02, 2009 2:32 pm
Projects: American Jurassic
Organization: Pier 7 Media
Location: Arizona
Contact:

Intro music track seamlessly switching to a loop track

#1 Post by duanemoody » Mon Jan 31, 2011 5:50 pm

Someone mentioned a VN that did this, and we're looking at a few themes we'd like to consider using this on.

Will it blend?

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

Re: Intro music track seamlessly switching to a loop track

#2 Post by Aleema » Mon Jan 31, 2011 5:56 pm

Erm, what are you asking? How to do it?

User avatar
OdysseyStudio
Regular
Posts: 94
Joined: Wed Oct 20, 2010 12:34 am
Location: Spokane, WA
Contact:

Re: Intro music track seamlessly switching to a loop track

#3 Post by OdysseyStudio » Wed Feb 02, 2011 12:30 pm

The Only way I could Think of doing that is using the 'queue' statement if you want do that.

Code: Select all

label start:

    play music 'into.ogg'
    queue music 'loopsong.ogg'

    return
You would play your intro and once it is done it will play the next track you have under the 'queue' statement. Then it will loop that piece instead.

More info on audio is here http://www.renpy.org/wiki/renpy/doc/reference/Audio
The artist's world is limitless. It can be found anywhere, far from where he lives or a few feet away. It is always on his doorstep.
--Paul Strand

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: Intro music track seamlessly switching to a loop track

#4 Post by SleepKirby » Sun Feb 06, 2011 4:26 am

OdysseyStudio wrote:

Code: Select all

    play music 'into.ogg'
    queue music 'loopsong.ogg'
Hmm... I'm currently trying exactly this, but when I do, there's a noticeable break in the music (about 0.1 of a second I'd say) between the first track and the second track. Does this happen for anyone else, and if so, is there a way to fix it? I'm using .mp3, if that's relevant (I'm not that well versed with music file formats and their differences).

User avatar
OdysseyStudio
Regular
Posts: 94
Joined: Wed Oct 20, 2010 12:34 am
Location: Spokane, WA
Contact:

Re: Intro music track seamlessly switching to a loop track

#5 Post by OdysseyStudio » Sun Feb 06, 2011 12:10 pm

Did you check to see if you loop or intro song file has any silence in the beginning of them or end of them that you don't want? Cause it works seamlessly on mine with the music I mixed.
The artist's world is limitless. It can be found anywhere, far from where he lives or a few feet away. It is always on his doorstep.
--Paul Strand

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: Intro music track seamlessly switching to a loop track

#6 Post by SleepKirby » Sun Feb 06, 2011 2:46 pm

I don't think so - the music tracks transition seamlessly in Winamp and iTunes.

Hmm, so it works for you? Maybe I'll try again with .ogg songs (or just different songs) and see what happens.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]