sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Sound API...?

    Scheduled Pinned Locked Moved SketchyPhysics
    4 Posts 4 Posters 416 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      Wacov
      last edited by

      Chris, I saw a post from you mentioning a sound API... what exactly would this let us do, aside from uploading sounds along with models? Will sounds stop playing at the end of the simulation? Will we be able to overlap sounds on windows? I'd really like to have a way to play looping engine sounds that are modified dynamically, speeding up/slowing down as a variable changes.

      http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

      1 Reply Last reply Reply Quote 0
      • B Offline
        BTM
        last edited by

        only way to do anything like that now is something like

        if slider("motor")<=0.1 then playsound("motor1.wav");elsif 0.1<= slider("motor")<=0.5 then playsound("motor2.wav");elsif slider("motor")>=0.5 then playsound("motor3.wav");end;
        

        I haven't tested it yet, but it should work. Oh, and motor,1,2,and 3 don't actually get higher pitched, that's just an example of the code. If you wanted them to speed up, you'd have to put each part in another onTick field with different framerates.

        1 Reply Last reply Reply Quote 0
        • M Offline
          MrPlanet
          last edited by

          I think that you would need to edit the file AND on top of that, wait for embedded sound to work, then you would be able to do something like that. But who can wait? 😆

          I reject your reality and substitute my own.

          1 Reply Last reply Reply Quote 0
          • C Offline
            CPhillips
            last edited by

            @wacov said:

            Chris, I saw a post from you mentioning a sound API... what exactly would this let us do, aside from uploading sounds along with models? Will sounds stop playing at the end of the simulation? Will we be able to overlap sounds on windows? I'd really like to have a way to play looping engine sounds that are modified dynamically, speeding up/slowing down as a variable changes.

            It would fix most of the bugs on the Windows side. It will allow overlap and probaby stopping the sound at the end. I dont know about a variable looping sound but I will look into it.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement