Music won't play

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
Kaht
Newbie
Posts: 19
Joined: Wed Aug 15, 2012 6:24 am
Projects: Perchance to Dream
Contact:

Music won't play

#1 Post by Kaht » Thu Aug 16, 2012 8:08 am

Hi, I'm sorry if this seems stupid. I'm ridiculously new to this kind of thing and I can't figure out why my music won't play for the life of me!!

The music file is in my Archive folder and I've followed all the instructions I can find on the FAQ, they just don't seem to work. I searched the forums but I couldn't find anyone with the same issue.

I have config.has_music set to True with no hashtag in front of it.

Code: Select all

## Music that is played while the user is at the main menu.
   config.main_menu_music = "fear.ogg"

Code: Select all

# The game starts here.
label start:
            
    play music "march.mp3"
    
    scene bg 8attlefield
    with fade
I'm not getting any error messages and I know the file names and extensions are correct, the music just won't play on the main menu or in game for some reason. I'm sure I'm missing something here, I just can't pinpoint it down!

User avatar
squark
Veteran
Posts: 277
Joined: Fri Aug 17, 2007 9:59 am
Completed: Tour de Pharmacy (Proofreader), The Abandoned Land: Book One (Proofreader)
Projects: Raven Hollow (Core Coder, Proofreader), The Universal Hope (Core Coder, Proofreader)
Organization: FlareBlue Entertainment
Location: Always somewhere behind you...
Contact:

Re: Music won't play

#2 Post by squark » Thu Aug 16, 2012 9:53 am

I may be completely off the ball here, but are the in the root folder of the /game/ folder or is Archive a subfolder within the root folder? If it IS a subfolder, you'll have to tell Ren'Py that by amending the file names.
Going with the above it'd look something likes this:

Code: Select all

   config.main_menu_music = "Archive/fear.ogg"
For example, the music in mine is in the Music subfolder. IE, this:

Code: Select all

   config.main_menu_music = "Music/Title.mp3"
If it's not this, then all I can think of is "Is it properly indented?"... Sorry.

EDIT II: No errors, but also no sound? Kind of makes me think that either your speakers are muted or the line jack (if external) may be loose.
Without communication, nothing is possible.
"All we see or seem
Is but a dream within a dream.

I stand amid the roar
Of a surf-tormented shore"
-- Edgar Allen Poe, "A Dream Within A Dream"
Current Projects:
Universal Hope Stalled
Raven Hollow (on hold for now)
Peace and Love,
Squark

User avatar
Kaht
Newbie
Posts: 19
Joined: Wed Aug 15, 2012 6:24 am
Projects: Perchance to Dream
Contact:

Re: Music won't play

#3 Post by Kaht » Thu Aug 16, 2012 11:49 am

Thanks for the response! I wasn't putting the folder in there, but when I tried doing that it still wouldn't play, and still no errors. I've tried all manners of indentation without success :T

The sound on my computer is working fine as well as the sound for the files, I made sure to test it when I couldnt get anything. Even other Ren'py games will play with sound!

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Music won't play

#4 Post by Alex » Thu Aug 16, 2012 12:41 pm

Do you hear the sound of "march.mp3" when game starts? If so, the problem might be in file "fear.ogg" itself. Try to use another sound file for main menu to test it.

User avatar
Kaht
Newbie
Posts: 19
Joined: Wed Aug 15, 2012 6:24 am
Projects: Perchance to Dream
Contact:

Re: Music won't play

#5 Post by Kaht » Thu Aug 16, 2012 2:49 pm

I'm not hearing sound anywhere in the game! It's so strange! I might try some sound clips to see if those work as opposed to just music.

I just replaced the file with a new one and it's still a no go! I guess I can try making a new game and see if that works??

After running Lint though it says that "game/script.rpy:21 'march.mp3' is not loadable". I'm not sure if that helps?

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Music won't play

#6 Post by Alex » Thu Aug 16, 2012 2:58 pm

"game/script.rpy:21 'march.mp3' is not loadable"
It means that Ren'py is unable to load this file - you should use another one.
I'm not hearing sound anywhere in the game!
Mmm... check "preferences" if music volume turned off.

User avatar
Kaht
Newbie
Posts: 19
Joined: Wed Aug 15, 2012 6:24 am
Projects: Perchance to Dream
Contact:

Re: Music won't play

#7 Post by Kaht » Thu Aug 16, 2012 4:54 pm

Alright, so I've figured out that it doesn't like any audio file. Every one I try to put in the main script gives me the ____.mp3/ogg is not loadable, whether i try to have it as music or a sound clip. So I guess Ren'py is refusing to load any of my audio files.

It's also doing the same thing with any .ttf or .fon file I try to have. It refused to use courier new.ttf and loaded about a billion error messages when I tried. So, I'm not sure what to do about that?

I made sure to put my music volume is on high, just in case it can catch something.

User avatar
Sapphi
Eileen-Class Veteran
Posts: 1685
Joined: Fri Jun 05, 2009 3:31 am
Completed: Boku no Taisetsu na Yumeko
Projects: Twelve, PAW ★ PRINTS
Organization: Kitsch-soft
Location: Illinois, USA
Contact:

Re: Music won't play

#8 Post by Sapphi » Thu Aug 16, 2012 5:40 pm

This is just a shot in the dark, but have you tried putting the music in the main game folder and asking Ren'Py to load it from there?

IIRC, I noticed with an older version of Ren'Py that while I could ask for images in subfolders like "BG/city.jpg" or "Sprite/chicory.png", music wouldn't play unless I had it in the main folder.
"It is [the writer's] privilege to help man endure by lifting his heart,
by reminding him of the courage and honor and hope and pride
and compassion and pity and sacrifice which have been the glory of his past."
— William Faulkner
▬▬▬▬▬▬▬▬▬▬..+X+..▬▬▬▬▬▬▬▬▬▬
Image

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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 won't play

#9 Post by PyTom » Thu Aug 16, 2012 5:41 pm

In general, if you're having sound problems, put:

Code: Select all

init python:
    config.debug_sound = True
into your script. (This will be the default in 6.14's developer mode.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Kaht
Newbie
Posts: 19
Joined: Wed Aug 15, 2012 6:24 am
Projects: Perchance to Dream
Contact:

Re: Music won't play

#10 Post by Kaht » Thu Aug 16, 2012 6:27 pm

Oh gosh thanks for your help everyone, I really appreciate it. I'm sorry to be so much trouble!

Unfortunately putting the music in the main folder didn't seem to help. I'm using Ren'py 6.13.12 I'll see if there's a later version that might fix things.

When I added the init python: config.debug_sound = True code (properly indented of course) it started giving me an error when I attempted to launch the game "IOError Couldn't find file 'fear.ogg'" followed by the full traceback.

Edit: Ooops, looks like that is the latest version haha or not.
Last edited by Kaht on Thu Aug 16, 2012 7:42 pm, edited 1 time in total.

User avatar
Kaht
Newbie
Posts: 19
Joined: Wed Aug 15, 2012 6:24 am
Projects: Perchance to Dream
Contact:

Re: Music won't play

#11 Post by Kaht » Thu Aug 16, 2012 7:38 pm

Oh gosh!! I found Ren'py 6.14 beta and I don't know what happened but when I tried it there it worked like a charm!

Music is playing on the title screen! :O

YourLocalAlchemist
Newbie
Posts: 13
Joined: Sun Jan 17, 2016 7:46 pm
Contact:

Re: Music won't play

#12 Post by YourLocalAlchemist » Sun Jan 17, 2016 10:24 pm

I too have this problem, but I get error pages. All I'm doing is what's below (but it gives the automatic colors in jEdit)...

Code: Select all

label start:
scene classroom
with fade
show teacher at right
show anzu happy at left
play music "diabolic_waltz.mp3" loop

The images will not load either... WHAT AM I DOING WRONG?

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Music won't play

#13 Post by Alex » Mon Jan 18, 2016 1:55 pm

If this is the only code you have then your game ends too quick and you just unable to see how it goes.
Add some text to show onscreen, like

Code: Select all

label start:
    scene classroom
    with fade
    show teacher at right
    show anzu happy at left
    play music "diabolic_waltz.mp3" loop
    "?"

YourLocalAlchemist
Newbie
Posts: 13
Joined: Sun Jan 17, 2016 7:46 pm
Contact:

Re: Music won't play

#14 Post by YourLocalAlchemist » Mon Jan 18, 2016 9:19 pm

Ok this is the full code (not including all of the "image" and "define")

Code: Select all

label start:
scene classroom
with fade
show teacher at right
show anzu happy at left
play music "diabolic_waltz.mp3" loop
t "Welcome to Anime High School, where all dreams, good and bad, come true!"
menu:
    "Shyly introduce yourself":
        jump shy_intro
    "Proudly introduce yourself":
        jump proud_intro
label shy_intro:
    show anzu shy
    a "H-hi... My name... is Anzu. I'm glad to be here..."
    "The class mutters amongst each other, making Anzu even more nervous."
    jump settle_down
label proud_intro:
    show anzu happy
    a "Hello all you runts! I'm Anzu, and I'm the best ever!"
hide teacher
show edward mad
e "How dare you call me a runt!"
jump settle_down
label settle_down:
    hide anzu
    show teacher
    t "Settle down, class."
    "The muttering slowly stops."
    t "*sigh* Now we can start class..."
    hide teacher
    "Some Time Later..."
    with fade
    jump intro
label intro:
    scene outside
    show anzu happy at left
    a "I wonder how to get to the dorms..."
    "Ha ha ha!"
    a "Who- who's that?"
    play music "konata_no_theme.mp3" loop
    show edward happy at right
    e "Hey, it's you!"
menu:
    "Shyly ask for directions":
        jump shy_and_ed
    "Walk away and look for someone taller":
        jump short_rejection
label shy_and_ed:
    show anzu shy to left
    a "Could you tell me... how to get to the girls dorm?"
    "Edward laughs"
    e "Of course! Right this way..."
    return
label short_rejection:
    a "Oh... It's shorty... I'll go ask someone who can see my face where the dorms are..."
return

None of the images or music will work. Is there something I'm doing wrong?

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Music won't play

#15 Post by Alex » Wed Jan 20, 2016 2:21 pm

The indentation is messed up in some lines, but if it's just a copy/paste problem and you make it right in your code (didn't get any errors related to indentation), that's ok.
If you declare your images incorrectly you'll see a message at top of the screen instead of an image, in this case you'll have to fix the image declaration. If you didn't get any messages then check the size of your images (if it match the screen size neither too small nor too big)

As for music, check other sound files if they can be played - the problem might be in sound file itself. Also check the sound/music volume in preferences and next lines in options.rpy

Code: Select all

## Set this to False if the game does not have any sound effects.
config.has_sound = True

## Set this to False if the game does not have any music.
config.has_music = True

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], khezo