Getting sound to play over another sound
asiammyself
Member Posts: 3
Hey guys,
First post here and so far gamesalad is pretty cool. I'm working on a piano currently and have run into a problem. I've tried trouble shooting but nothing seems to be working. Anyways the problem is I have a piano and it plays a note and then fades out after release. So if the user tries to hit it again before it fades out I have tried to play the same sound over it. So for example I hit the key it plays sound and I release. It starts fading but I hit it again before it fades out so it plays sound 2 which is the same sound but I just made a copy. Seems like in theory it would work but I keep getting this glitch when I try to do it.
Here is a download link to give you all an idea: http://www.2shared.com/file/ixt3jugc/piano.html works pretty well but try a quick double click and you'll see what I mean. Anyways any ideas?
First post here and so far gamesalad is pretty cool. I'm working on a piano currently and have run into a problem. I've tried trouble shooting but nothing seems to be working. Anyways the problem is I have a piano and it plays a note and then fades out after release. So if the user tries to hit it again before it fades out I have tried to play the same sound over it. So for example I hit the key it plays sound and I release. It starts fading but I hit it again before it fades out so it plays sound 2 which is the same sound but I just made a copy. Seems like in theory it would work but I keep getting this glitch when I try to do it.
Here is a download link to give you all an idea: http://www.2shared.com/file/ixt3jugc/piano.html works pretty well but try a quick double click and you'll see what I mean. Anyways any ideas?
Comments
Individual piano keys are not polyphonic (pianos *keyboards* are) - so if you hit a real piano key once it sounds, but hitting the same note again (before the sustain/release has finished) kills off the sustain/release of the previous note.
when key is hit attribute equals 1. When attribute is 1 trigger sound.
when released Interpolate attribute back to 0. (which fades note out)
You do make a good point about the sustain of the previous note. I'm going to go ahead and try revise the behaviors and post what I get.
Whats going on?
I appreciate any ideas to get this working.
What kind of glitch are you getting.