How complex can you make the Music system?
SuperOwen
Member Posts: 3
Hi! I'm brand new to GameSalad and I'm wondering about what I can do with the audio within the game - mainly, how complex you can make the music system? Are there any limitations when it comes to wanting to create complex music-based games?
The games I'll be wanting to make will be platformers with music at their core. When the player walks over pick-ups, coins, etc. can I bring in a melody line that is in time with the music? Can I add different effects such as reverb or a lowpass filter when I go into like a cave or underwater?
Kind of a big question I know, but any help would be much appreciated!
Cheers!
The games I'll be wanting to make will be platformers with music at their core. When the player walks over pick-ups, coins, etc. can I bring in a melody line that is in time with the music? Can I add different effects such as reverb or a lowpass filter when I go into like a cave or underwater?
Kind of a big question I know, but any help would be much appreciated!
Cheers!
Comments
There are no built in effects, you would need to bounce off a clean version + a version with reverb for the caves and a LP filter for the underwater parts.
Sounds complex, but it's not really once you know the logic.
As for cutting between differently effected bounces . . . . hmmm that might be possible, although not directly supported, I think the answer lies in chopping your song into small pieces (perhaps bars / half bars - or, depending on your tempo, even beats ?) - and have them play in sequence referenced to the game's clock - when you change scene > kill the reverb version > and jump over to the relevant 'block' of the non reverb version.
Easily divisible tempos might help (120bpm comes to mind) - as would 4/4 timing.
Or something to that effect, it's doable (I think) but GS is no Logic / ProTools !
It's really easy to move between (for example) a filtered (underwater) and dry (normal) version of the same piece of music - you simply have both playing and - depending on what you are doing you simply turn the volume of one up (while the other goes down).
I just set up a little test, took a couple of minutes, grab a little block and pull it under water (the lower half of the screen) and the music loses all it's top end (filtered version gets turned up and the dry version gets turned down) - drag the poor little block out of the water and the volumes are swapped around again.
Very simple to set up - and easy to control - and it's very effective too !
Here, I a made you a quick demo . . .
As well as the filtering, I think the volume should drop the deeper you go underwater (again pretty simple to set up).
Good luck with your project.
You can't ! (but you can play numerous sounds at the same time).
@SuperOwen If you use .ogg audio loops (so import as sounds) you can have a lot of layers and trigger things dynamically and in time. i.e have loops come in at certain time intervals so all the loops are in sync. Out GS game Honey Tribe does this:
> "Wow guys thanks for the help with this! And big thanks to Tynan for going out of your way to help, it really means a lot! "
No problem, I am learning myself, attempting to answer other people's questions is a good way to learn - so thanks to you ! : ) as I now know you can do some pretty cool audio 'effects' based on the character's environment.
Here you go:
http://www.mediafire.com/?h20y0mqita1bck6
No wonder when on importing GS asks if it is sounds or music and says if its over 30 seconds to use music!
??
40MB (2 music tracks) isn't too much, iPhones/iPads have RAM in the gigabytes and typically hold hundreds of songs !? Or are you trying to keep below the 20MB threshold so people can download the app over a phone connection ?
[EDIT: just read your second post . . . ]
Ah! Yes I see what you mean.
I wonder if there is another way.
Im going to have a little play and see if i can come up with anything, if you chose to do the same, the audio length is on the main music so is a good 3 mins long! Its a shame GS doesn't let us play multiple music files.
im wondering if i could maybe have a separate deeply muffled sound that i just play over the top to try and mask it. The object of my game is not to be in water so if you go in, will literally only last a couple of seconds.
Agreed.
As the filtered version will have much less information in (you're essentially rolling off the top end) you may as well make it really low quality (like 32kbps) - so you have (example figures) a 10MB main track (unfiltered) and a 500kb muffled track - both the same length.
Or as you say . . . just pull out a 4 bar loop from the main track and filter it to death and then stick it on loop, then cut to this when underwater.
Or you could try some good old frequency modulation (keep the sweep of the frequency centred on 1 (pitch) and the sweep down and up equidistant and you will find you get your wobbly / crazy sound without the track losing sync . . . . hold on a minute let me knock up a demo, easier than explaining . . .
"Its those little things that if you get enough right of, can make a big difference overall"
+1,000
http://www.mediafire.com/?gsz7t01b3cz0o1n
Like this:
http://www.mediafire.com/?x67cqs2w1y2c6sb
Yes i was using Audacity and using a filter to give that underwater feel. I then exported as mp3 and imported into GS and let that use its own compression method which gave me the 40mb per track. I then did the same but exported as ogg with a quality of 0 (the lowest), imported them but the same outcome size.
So currently i have;
Main track as normal playing as Music.
When in water i interpolate the music volume down to 0.3 in 0.5 seconds
I then play a bubbling/splashing underwater sound and also a chopped up 15 seconds of the main track, filtered with a ton of reverb.
When not in water the sound effects stop and the music interpolates back to 1 in 0.2 seconds.
This now using about 3mb RAM for sounds including my other sound effects i have in the game too
Im quite happy with the result as you can still hear the main track but you get that filtered under water sound from the above effects. Like i said, literally you do not want to be in water in my game and when you are, it'll only last a couple of seconds.
EDIT: Just see you've made the demos so i'll check them out now, cheers
You are compressing your audio on the way out of Audacity . . . and then compressing it again when importing it into GS, you gain nothing from the first compression process, you might as well export from Audacity as an uncompressed WAV/AIFF . . . . by compressing twice you only lose a little quality and gain nothing in memory savings.
"filtered with a ton of reverb"
Reverb drops off (is actually non-existent) under water, rather than increasing.
"interpolates back to 1 in 0.2 seconds"
If you interpolate it to 1.2 in 0.24 seconds you will get the same result but without GS's interpolate glitch . . . . audio volume can't go past 1, so it will be the same volume, doing this (1.2 in 0.24 seconds) simply places the interpolate glitch outside of your volume ramp.
I see regarding the compression etc, audio is not really one of my forte's, if it sounds alright is good for me
Reverb ... I learn something new every day ... check that out! I just used it as it made the overall cut up filtered part more muffled, didn't really think about the technicalities of it, but now thinking about it, thats pretty logical.
Nice tip on the interpolate part, whats this glitch as i have noticed one?
If you use interpolate to fade up anything that goes to 1 (alpha channel fade in or out / audio volume fade in or out . . . etc) then you will notice there is a glitch in the last part of the interpolation (it's actually the last 10%) - it essentially misses out the last 0.1 of the interpolation value . . . the result = smooth fades are ruined with a little jump at the end (the same goes for audio).
So using interpolate (interpolating from 0 to 1) you think you are going to get . . .
0
0.1
0.2
0.3
(cont . . )
8.4
8.5
8.6
8.7
8.8
8.9
9.0
9.1
9.2
9.3
9.4
9.5
9.6
9.7
9.8
9.9
1
But GS actually does this . . .
0
0.1
0.2
0.3
(cont . . )
8.4
8.5
8.6
8.7
8.8
8.9
1
1
1
1
1
1
1
1
1
1
1
That is to say with interpolate there is no 9.0 to 1 !!! The first 90% is fine, but after 9.0 it just jumps to 1 !!
Witness it for yourself:
http://www.mediafire.com/?ziu9bt1ix6gw0eq
Two squares . . . left hand side is interpolating the alpha channel from 0 to 1 over 5 seconds . . . . the right hand side is interpolating from 0 to 1.2 over 5.2 seconds . . . they both hit 100% opacity at the exact same time but the one on the right doesn't have the little glitch at the end (you might have to cover you hand over the one you are not watching).
Using ease in / ease out (or any combination) makes the glitch worse (I won't explain why here, unless you want to be bored to death).
So fading volume up go to 1.2 and multiply your fade time by 120%
So fading volume down go to -0.2 and multiply your fade time by 120%
So fading alpha channels up go to 1.2 and multiply your fade time by 120%
So fading alpha channels down go to -0.2 and multiply your fade time by 120%