Is it possible to command the Renpy to loop the music at a point other than the beginning of the song?
Thanks in advance.
Music: Possible to set a loop point?
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.
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.
-
- Regular
- Posts: 93
- Joined: Wed Sep 13, 2006 11:29 am
- Contact:
Music: Possible to set a loop point?
Writer / Programmer
Crows Project: Released 12/15/07
Noctua: In Development. Demo 3 released.
Project Silk Road: Planning/Story Construction
"Live while awake. Live while dreaming."
We have a [new] website again!
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Music: Possible to set a loop point?
What you want to do is to divide the music into two parts, and then do something like:
play music "start.ogg"
queue music "rest.ogg"
play music "start.ogg"
queue music "rest.ogg"
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Veteran
- Posts: 284
- Joined: Fri Dec 28, 2007 5:47 am
- Location: Where the Dragons rule!
- Contact:
Re: Music: Possible to set a loop point?
Maybe implementing a possibility in renpy to recognize if the music file has loop points? Or is this connected to SDL library's possibilities?
Angels of paradise, angels of sacrifice
Please let me be under your wings...
Please let me be under your wings...
Re: Music: Possible to set a loop point?
To my knowledge there's no standard format for including such metadata in MP3s or OGGs or other wave-type sound files, so to do such a thing would require the engine to analyse the waveform and work out what time it was in, what tempo (bearing in mind both - along with the key - can and do change mid-song sometimes) and so on, which is a pretty hard task already. Then the engine would have to identify recurring elements in the music or phrases which could recur without sounding bad, and make guesses at which ones are desired. Sometimes it would be relatively easy, but most of the time it's a difficult task. It would definitely require a programmer with a sound knowledge of music theory and DSP at the same time, and I expect that even if PyTom does have that knowledge he'd probably consider it well outside of the scope of a VN engine when it's far simpler for the composer to separate out looping sections when they render the track out in the first place.EvilDragon wrote:Maybe implementing a possibility in renpy to recognize if the music file has loop points? Or is this connected to SDL library's possibilities?
Server error: user 'Jake' not found
-
- Veteran
- Posts: 284
- Joined: Fri Dec 28, 2007 5:47 am
- Location: Where the Dragons rule!
- Contact:
Re: Music: Possible to set a loop point?
Good points, Jake
Angels of paradise, angels of sacrifice
Please let me be under your wings...
Please let me be under your wings...
Who is online
Users browsing this forum: Nozori_Games, Ocelot