Optimizing music?
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.
- Karrion
- Regular
- Posts: 74
- Joined: Fri Jan 18, 2019 8:33 pm
- Projects: Murder on the Marine Express
- Organization: 1564 Studio
- itch: 1564-studio
- Contact:
Optimizing music?
Right now the music of our project is like 90% of the size of it. I know there is a thread for optimizing images and was very useful for reducing the size of those, but couldn't find a similar thread for music. One of the problems we have is that we have to have multiple loops in the music files due to now being able to have seamless loops (we don't know how to use audacity or similar, out composer uses Maestro to compose). Is there an easy way to solve this?
Re: Optimizing music?
First advice would be to convert all your audio into .ogg format.
For the loops, it sounds like you are manually looping several songs into one file, which is not recommended at all because that would create huge file sizes. I’d say separate all of them, have a single file for a single song, and play/loop them within your Renpy scripts. For a single song:
And that would loop the song forever by default, until you tell it to stop.
You can also make music fade in or out to make good transitions:
If you want different songs to automatically play one after another, do:
Maybe even use the queue function for more control. Everything is documented here: https://www.renpy.org/doc/html/audio.html
For the loops, it sounds like you are manually looping several songs into one file, which is not recommended at all because that would create huge file sizes. I’d say separate all of them, have a single file for a single song, and play/loop them within your Renpy scripts. For a single song:
Code: Select all
play music "songname.ogg"
You can also make music fade in or out to make good transitions:
Code: Select all
play music "songname.ogg" fadeout 2.0 fadein 2.0
Code: Select all
play music [ "a.ogg", "b.ogg" ] fadeout 1.0 fadein 1.0
- Karrion
- Regular
- Posts: 74
- Joined: Fri Jan 18, 2019 8:33 pm
- Projects: Murder on the Marine Express
- Organization: 1564 Studio
- itch: 1564-studio
- Contact:
Re: Optimizing music?
We tried using fadeins and fadeouts and all kinds of control but it always leaves like a half second of silence. I tried with tighten in the channel settings and the like to no avail. What I saw is that the best way to produce seamless loops is using sound programs like Audacity, Fruit Loops, and the like, but no tutorial for people with no idea. Also, we are already using .ogg.
Re: Optimizing music?
I think the seconds of silence are from your original soundtracks, try trimming the beginning and end of them so that they immediately play and end.
You can also look up "crossfade," there are a couple forums that talk about this, which might be what you want, though a bit more complicated than what I had:
viewtopic.php?t=45204
viewtopic.php?t=42418
You can also look up "crossfade," there are a couple forums that talk about this, which might be what you want, though a bit more complicated than what I had:
viewtopic.php?t=45204
viewtopic.php?t=42418
- qirien
- Miko-Class Veteran
- Posts: 541
- Joined: Thu Jul 31, 2003 10:06 pm
- Organization: Metasepia Games
- Deviantart: qirien
- Github: qirien
- itch: qirien
- Location: New Mexico, USA
- Discord: qirien
- Contact:
Re: Optimizing music?
When you export your OGG files, you can choose the quality with a slider. Lower quality will not sound quite as good, but will be a smaller file size.
Who is online
Users browsing this forum: Majestic-12 [Bot]