ZFGC

Resources => Coding => Topic started by: Rayo on June 29, 2011, 05:45:08 pm

Title: Sound Looping
Post by: Rayo on June 29, 2011, 05:45:08 pm
Hello again, now I have a new problem! XD
I don't know if it is a problem of Game Maker but if a sound is looping(mp3) and I loop another sound(mp3)
I can't hear the first looping sound. Only the second sound is looping.
Title: Re: Sound Looping
Post by: Zhello on June 29, 2011, 06:54:13 pm
Hello again, now I have a new problem! XD
I don't know if it is a problem of Game Maker but if a sound is looping(mp3) and I loop another sound(mp3)
I can't hear the first looping sound. Only the second sound is looping.
Both sounds are playing but you cannot hear the second one? Try using this code for the first sound
sound_volume(index,value) - index=mp3 music, value the volume for the sound, for example 0.3, 0.5, etc.

one more thing, the sounds are in room creation code yes?  You can loop both sounds however for the code I just gave you plant that one in there right under the mp3 sound you want to lower.
Title: Re: Sound Looping
Post by: Rayo on June 30, 2011, 04:42:59 pm
Hm...okay this was my new code in the creation code of the map:
Quote
sound_volume(North_Hyrule_Field,0.5);
sound_volume(Introduction,0.5);
sound_loop(North_Hyrule_Field);
sound_loop(Introduction);
But I could only heard the Introduction MP3. :-\
The problem is only with MP3's and OGG's, etc..., but not with .mid and .wav.

EDIT: I can only hear the music's with the multimedia player.
Title: Re: Sound Looping
Post by: Zhello on July 06, 2011, 06:16:40 pm
hmmm. :-\ the code should work with mp3 music.  I am going to recheck this code on gmk with some of my mp3s.
edit:
your volume is too low, try 0.75-1.05
make sure both mp3s do not have the same volume. The one you wanna hear suppose to be somewhat higher then the other mp3.

for example
the town music is mp3 and the volume is 0.75 but for people talking in the background the volume for that can be 0.80-0.85 or lower.
Title: Re: Sound Looping
Post by: Rayo on July 07, 2011, 08:31:43 am
I don't know why it doesn't work. :-\
Here is an example. Go to the Creation Code of the first map to see my code:
http://www.mediafire.com/?4faxxlrp5gkpb70
Title: Re: Sound Looping
Post by: Zhello on July 07, 2011, 02:06:11 pm
I don't know why it doesn't work. :-\
Here is an example. Go to the Creation Code of the first map to see my code:
http://www.mediafire.com/?4faxxlrp5gkpb70


I tested out the sound volume, it turns out it doesn't work for mp3s, only midi and such.  The music you had on the gmk. I might have something you can replace it with, but I need to find it on my pc first.
I suggest you only use mp3 music only for rooms that you need one song playing.

Plus here is a new set up for the music to play, if you have any midis
Code: [Select]
if !sound_isplaying(Hyrule_town){
    sound_stop_all()//if you want to add another sound, add another loop sound right below the stop sound code.
    sound_loop(Hyrule_town)
    sound_volume(Hyrule_town,0.7);//possibly the lowest for a song/sound to play
}

remember, try to find a midi version of this song you need.

To get you started off, here is one that might suit you well. If I find any of those mp3s in midi, ill repost/edit.
Title: Re: Sound Looping
Post by: Rayo on July 07, 2011, 03:09:07 pm
Okay, Then I must use midis or waves...
Oh, and you don't have to search any of those mp3s in midi, because I have the sounds in midi too.

Otherwise: Thank you for your help. :)

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved