Sound based on rotation speed

supafly129supafly129 Member Posts: 454
edited April 2015 in Working with GS (Mac)

Is there an efficient/performance-sensitive way to loop a sound based on an actor's rotation speed? For example, let's say there is a bowling ball rolling along the ground, and I want the sound of it touching the ground to play faster as the ball starts rotating faster. Hope that makes sense!

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Constrain pitch to angular velocity.

  • SocksSocks London, UK.Member Posts: 12,822

    @supafly129 said:

    I made you a quick project, let it spin up to speed, then pressing anywhere on the screen slows it down to 0 (as long as you hold the mouse button down).

  • supafly129supafly129 Member Posts: 454
    edited April 2015

    @Socks awesome thank you, this is great! do you know if there's some sort of sound limitation with GS, as in a maximum number of sounds that can be played at once or max times a "play sound" rule can be triggered within a certain amount of time? I ask because after trying this it seems as if the sound doesn't play continuously as it should and is sporadic. Although the character is moving and rotating, the value of the angular velocity doesn't seem to be constantly changing along with it which im assuming is the problem.

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2015

    @supafly129 said:
    do you know if there's some sort of sound limitation with GS, as in a maximum number of sounds that can be played at once . . .

    Not as far as I'm aware, but I've not tested, I imagine polyphony would only be limited by the target device's processor ?

    @supafly129 said:
    Although the character is moving and rotating, the value of the angular velocity doesn't seem to be constantly changing along with it which im assuming is the problem.

    The value of the angular velocity will only change when the angular velocity is accelerating, for example if an actor is rotating at 200 degrees/sec the angular velocity will be static, it won't be changing.

    Also there is glitch in GameSalad's pitch control, the slider goes from 0 to 10 (octaves), but the pitch actually tops out somewhere around 8, so a pitch of 8 is identical to a pitch of 10, if you were operating in this area (unlikely, but not impossible) you would hear no change even when the angular velocity is accelerating or decelerating.

Sign In or Register to comment.