Sounds playing back differently?

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.
Message
Author
Qu-ko
Regular
Posts: 54
Joined: Sun Jun 18, 2006 12:27 am
Location: Massachusetts, land of evil-ness
Contact:

Sounds playing back differently?

#1 Post by Qu-ko »

In advance, I apologize for my uselessness in this forum overall. All I do is ask stupid questions without contributing much, so, um... FORGIVENESS IS REQUESTED. :<

...Anyway, my problem. I've converted a sound effect from .mp3/.wav to .ogg format, right? Yet when I play it in Ren'Py, it plays back... differently than when I converted it. It has a sort of shrill ringing in it, and it sounds kind of muffled, definitely not the way I wanted it to be played. I went and played it in Winamp too, just to make sure it wasn't a problem with the conversion or the sound itself, and it played back just the way I wanted it to.

...Forgive me if I'm missing something here, but is there something I'm supposed to be doing that I'm not? I'm using Audacity as a converter/sound editor, and I did play around a bit with the sound effect to make it less staticy and to amplify it a little... but that shouldn't affect how it plays in Ren'Py, though, right? Right?

(Also forgive me if this question has been asked before; I did a search and little came up, so I decided to just go ahead and ask. .-.)
ヾ(゚Д゚)ノ うわあああぁぁぁぁぁぁぁ―――――――

Alessio
Miko-Class Veteran
Posts: 576
Joined: Fri May 07, 2004 9:40 am
Completed: GO! Magical Boy (2006), Angelic Orbs (soundtrack)
Projects: Cyberlin (in progress)
Location: Finland
Contact:

Re: Sounds playing back differently?

#2 Post by Alessio »

Not using Audacity here, but it sounds as if the quality setting for the ogg encoding is too low. Just like mp3, ogg is a lossy format. The higher the compression rate, the worse the sound quality. And then of course re-encoding from one lossy format to another (mp3 to ogg) will always result in a loss of quality (although not as radical as you describe).

Qu-ko
Regular
Posts: 54
Joined: Sun Jun 18, 2006 12:27 am
Location: Massachusetts, land of evil-ness
Contact:

Re: Sounds playing back differently?

#3 Post by Qu-ko »

I actually made sure to up the quality to its maximum setting earlier in trying to figure out what the problem was. I exported it again, played it back in Winamp, and it was fine. But when it played back in Ren'Py, it was all ringy and staticy and... definitely not how I wanted it to be. So I'm not so sure it's a problem with Audacity...
ヾ(゚Д゚)ノ うわあああぁぁぁぁぁぁぁ―――――――

Ivlivs
Veteran
Posts: 267
Joined: Sun Feb 25, 2007 1:00 pm
Contact:

Re: Sounds playing back differently?

#4 Post by Ivlivs »

I've definitely had this same problem when I was making Jitteh Dawn. I ultimately ended up using a different piece entirely.
Jitteh Dawn --- A VN by Ivlivs

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Sounds playing back differently?

#5 Post by PyTom »

Hm... I'll consider updating the voribis and ogg libraries, to see if there's a fix.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Sounds playing back differently?

#6 Post by monele »

It might be interesting to post the actual music file : the original one so someone can try converting it and see if it's still messing up... and the converted one so we can test it in-game and see if it has the same sound problem (I'm thinking it might be related to your computer maybe).

Qu-ko
Regular
Posts: 54
Joined: Sun Jun 18, 2006 12:27 am
Location: Massachusetts, land of evil-ness
Contact:

Re: Sounds playing back differently?

#7 Post by Qu-ko »

It's a sound of someone getting out of bed. It's not the best quality, but it's not as awful as it was before I filtered it. So, have at it if you so desire.

http://download.yousendit.com/4C6DBED51E7461B8
ヾ(゚Д゚)ノ うわあああぁぁぁぁぁぁぁ―――――――

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Sounds playing back differently?

#8 Post by monele »

A quick test revealed the problem : your OGG runs at 48000Hz. Ren'Py seems not to be able to deal correctly with that :/... Either wait for a fix or convert/save your OGG in 41000Hz

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Sounds playing back differently?

#9 Post by PyTom »

Another alternative might be to set config.sound_sample_rate to 48000.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Qu-ko
Regular
Posts: 54
Joined: Sun Jun 18, 2006 12:27 am
Location: Massachusetts, land of evil-ness
Contact:

Re: Sounds playing back differently?

#10 Post by Qu-ko »

...Duh, Qu.

And the sad part is, I so would've never figured that out if no one had told me. I lowered the sample rate and it sounds just as it should now.

Thanks for pointing that out. ><
ヾ(゚Д゚)ノ うわあああぁぁぁぁぁぁぁ―――――――

Qu-ko
Regular
Posts: 54
Joined: Sun Jun 18, 2006 12:27 am
Location: Massachusetts, land of evil-ness
Contact:

Re: Sounds playing back differently?

#11 Post by Qu-ko »

...Sorry about double post, but this is strange.

I just tried to run my script, and I got this error:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


On line 12 of C:\Documents and Settings\Owner\Desktop\renpy-6.3.2\warning/game/script.rpy: expected '=' not found.
image cafeteria-sitting = "cafeteria-sitting.png"
^

On line 244 of C:\Documents and Settings\Owner\Desktop\renpy-6.3.2\warning/game/script.rpy: end of line expected.
scene cafeteria-sitting with dissolve
^

Ren'Py Version: Ren'Py 6.3.2b
"cafeteria-sitting" is a view from across a cafeteria table, which the characters are going to be placed behind using layers. And I'm trying to set up using a scene with the very backmost image, but it's giving me this error. I defined the image and then tried to use it like everything else that's been working, but now I have an error. O_o Most likely something stupid I'm missing, but...
ヾ(゚Д゚)ノ うわあああぁぁぁぁぁぁぁ―――――――

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Sounds playing back differently?

#12 Post by PyTom »

You can't include a - in image names. Use a space instead.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Sounds playing back differently?

#13 Post by monele »

Would "_" work too ?

Ivlivs
Veteran
Posts: 267
Joined: Sun Feb 25, 2007 1:00 pm
Contact:

Re: Sounds playing back differently?

#14 Post by Ivlivs »

monele wrote:Would "_" work too ?
Absolutely. Underscores are quite conventional in programming contexts.
Jitteh Dawn --- A VN by Ivlivs

Guest

Re: Sounds playing back differently?

#15 Post by Guest »

PyTom wrote:Another alternative might be to set config.sound_sample_rate to 48000.
How do I do that?

Post Reply

Who is online

Users browsing this forum: Google [Bot]