- Quick links
- Unanswered topics
- Active topics
- Search
- Members
- The team
- FAQ
- Login
- Register
- Board indexRen'Py Visual Novel EngineRen'Py Questions and Announcements
- Search
- Unanswered topics
- Active topics
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
- Print view
13 posts• Page 1 of 1
Message
Author
- roachflower
- Newbie
- Posts: 7
- Joined: Sat Mar 11, 2023 6:51 am
- Contact:
Contact roachflower
Send private message
renpy music won't play!! [SOLVED]
- Quote
#1Postby roachflower »
I've put the music in the correct file, and have done the correct way to play music "audio/musicfile.mp3", to the point where Renpy used to recognise it and it worked just fine! Now, for some reason, it's having problems and saying it can't find my music file.
"OS error: Couldn't find the file 'audio/bgm_bachelorlearns.mp3'
Any idea if this is glitch or something off with my code?
these are the strings of code renpy has a problem with: play music "audio/bgm_bachelorlearns.mp3"
play music "audio/spookyviolin.mp3"
play music "audio/whitenoise.mp3" fadein 1.0
audio for other ones works as well following the exact same code. one that works is : play sound "audio/breathing.mp3"
aaa dont know what to do. bit confused
FOR FUTURE REFERENCE JUST IN CASE:
Check if songs are corrupted and can be playable in other music players
- Attachments
Last edited by roachflower on Tue Mar 14, 2023 6:00 am, edited 1 time in total.
Top
m_from_space
- Eileen-Class Veteran
- Posts: 1294
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Contact m_from_space
Send private message
Re: renpy music won't play!!
- Quote
#2Postby m_from_space »
Renpy automatically detects all audio files inside the "audio" folder and stores them inside the audio-object. So when playing files you can simply do:
Code: Select all
play music spookyviolin# orplay sound whitenoise
I'm not sure why some files play and others create an error though. You sure there is no typo inside the filename?
Top
- roachflower
- Newbie
- Posts: 7
- Joined: Sat Mar 11, 2023 6:51 am
- Contact:
Contact roachflower
Send private message
Re: renpy music won't play!!
- Quote
#3Postby roachflower »
Hi! First of all, thanks so much for replying. Unfortunately, this did not work.
I tried changing the file name to see if it would work, to something simple, so I renamed it, 'intro.mp3'.
I tried
play music intro.mp3
play music audio/intro.mp3
play music intro
and all the same variations with quotations marks, so play music "intro" and so on.
All of them show the same message, (OSerror: couldn't find file) except for one attempt, that wrote "Nameerror: name 'intro' not defined" which I think has to do with lack of quotation marks, but i don't know.
Sorry for being a timesucker, but I'm genuinely stumped. I don't know if this is a computer problem, or if I need to like reinstall renpy or something, but I am just so confused!!
Top
- roachflower
- Newbie
- Posts: 7
- Joined: Sat Mar 11, 2023 6:51 am
- Contact:
Contact roachflower
Send private message
Re: renpy music won't play!!
- Quote
#4Postby roachflower »
I even tried replacing said file, but now no sound works. life is pain
Top
m_from_space
- Eileen-Class Veteran
- Posts: 1294
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Contact m_from_space
Send private message
Re: renpy music won't play!!
- Quote
#5Postby m_from_space »
This sounds odd.
Make sure:
1) the files are actually inside the "myproject/game/audio" folder (sorry for even mentioning that again!)
2) you have read access for those files (like they are not only accessible by root or admin or something)
Could you provide one of those files here? I could check if my project detects them. xD
Top
- rayminator
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Contact rayminator
Send private message
Re: renpy music won't play!!
- Quote
#6Postby rayminator »
try converting the mp3 files to ogg
Top
- roachflower
- Newbie
- Posts: 7
- Joined: Sat Mar 11, 2023 6:51 am
- Contact:
Contact roachflower
Send private message
Re: renpy music won't play!!
- Quote
#7Postby roachflower »
Okay, so since I messaged I found out why that 'intro.mp3' wasn't specifically playing (something to do with icloud) but there's still music that doesn't play for no reason.
How do I check read access?! And sure, I can send a rain mp3, but I don't know how to do that, haha.
Top
m_from_space
- Eileen-Class Veteran
- Posts: 1294
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Contact m_from_space
Send private message
Re: renpy music won't play!!
- Quote
#8Postby m_from_space »
roachflower wrote: ↑Sun Mar 12, 2023 2:43 pmOkay, so since I messaged I found out why that 'intro.mp3' wasn't specifically playing (something to do with icloud) but there's still music that doesn't play for no reason.
How do I check read access?! And sure, I can send a rain mp3, but I don't know how to do that, haha.
When replying here, you can add an attachment below the buttons next to "Options".
Normally files should have read access, I just added this to be sure. If other programs can play them, you should be save.
Top
- roachflower
- Newbie
- Posts: 7
- Joined: Sat Mar 11, 2023 6:51 am
- Contact:
Contact roachflower
Send private message
Re: renpy music won't play!!
- Quote
#9Postby roachflower »
Okay, it's not letting me attach anything, but holy shit.
I tried playing all of the problematic sound files and to my HORROR they all do not play. No idea why not, but they just cannot be played by usual players. Looks like I'll have to replace a lot of sounds I thought were fine.
Thank you so much for continuing to reply (and for helping me figure out how to use these forums, lol.)
The last question I have for you because you seem very Knowledgeable is that my game cannot recognise my "main_menu.png" in the gui, so I can't access my load screens in game. Any reason behind this?
Top
- rayminator
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Contact rayminator
Send private message
Re: renpy music won't play!!
- Quote
#10Postby rayminator »
roachflower wrote: ↑Mon Mar 13, 2023 5:08 amOkay, it's not letting me attach anything, but holy shit.
I tried playing all of the problematic sound files and to my HORROR they all do not play. No idea why not, but they just cannot be played by usual players. Looks like I'll have to replace a lot of sounds I thought were fine.
Thank you so much for continuing to reply (and for helping me figure out how to use these forums, lol.)
what properly happened is that your music files got corrupted somehow due to power outages or bad hard drive or bad sector on the drive
roachflower wrote: ↑Mon Mar 13, 2023 5:08 amThe last question I have for you because you seem very Knowledgeable is that my game cannot recognise my "main_menu.png" in the gui, so I can't access my load screens in game. Any reason behind this?
have you changed anything in screens.rpy if so can you provide your changes
this is what the code should look like
Code: Select all
style main_menu_frame: xsize 420 yfill True background "gui/overlay/main_menu.png"
can you go to gui/overlay and find main_menu.png and open it in any photo edit to see if it opens up?
or
it could be the reason what I said about your hard drive or file is corrupted
Top
Imperf3kt
- Lemma-Class Veteran
- Posts: 3828
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Contact Imperf3kt
Send private messageTwitter
Re: renpy music won't play!!
- Quote
#11Postby Imperf3kt »
Do you hide file extensions, or are they shown?
I've seen people often accidentally name files things like "mysong.mp3.mp3"
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Top
- roachflower
- Newbie
- Posts: 7
- Joined: Sat Mar 11, 2023 6:51 am
- Contact:
Contact roachflower
Send private message
Re: renpy music won't play!!
- Quote
#12Postby roachflower »
rayminator wrote: ↑Mon Mar 13, 2023 9:44 amhave you changed anything in screens.rpy if so can you provide your changes
this is what the code should look like
Code: Select all
style main_menu_frame: xsize 420 yfill True background "gui/overlay/main_menu.png"
can you go to gui/overlay and find main_menu.png and open it in any photo edit to see if it opens up?
or
it could be the reason what I said about your hard drive or file is corrupted
THANK YOU SO MUCH OH MY GOD?!?
I had never opened screens.rpy, so the default was
# background "gui/main_menu.png/"
Which I thought was weird, so i then deleted the hashtag and replaced it with your code. THEN I got an error message that the game_menu couldn't be found. I put the dots together and found out that for some bizarre reason the code was changed to just "/game_menu.png" which meant it couldn't find it.
No idea why it turned out like that, I hadn't ever opened screens.rpy. Thank you so much! I'm a newbie programmer so I'm still learning why the program does what it does.
Thanks for everyone's time and help, my problems are now SOLVED to completion!!!
Top
- roachflower
- Newbie
- Posts: 7
- Joined: Sat Mar 11, 2023 6:51 am
- Contact:
Contact roachflower
Send private message
Re: renpy music won't play!!
- Quote
#13Postby roachflower »
Imperf3kt wrote: ↑Mon Mar 13, 2023 6:40 pmDo you hide file extensions, or are they shown?
I've seen people often accidentally name files things like "mysong.mp3.mp3"
Thanks for replying! My songs ended up being corrupted and unplayable, but I'll look out for this next time.
Top
Post Reply
- Print view
13 posts• Page 1 of 1
Return to “Ren'Py Questions and Announcements”
Who is online
Users browsing this forum: Ahrefs [Bot], Baidu [Spider]
- Board index
- All times are UTC-04:00
- Delete cookies
- Members
- The team
Style developed by Zuma Portal and Turaiel.
Powered by phpBB® Forum Software © phpBB Limited
Privacy|Terms