Adding post rubber "bump" sound

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #38447
    RustyCardores
    Moderator
      @rustycardores
      MemberModerator

      I’ll start by saying that “I know nothing about building tables”… but I can generally find my way around a script for a bit of cut and paste here and there.

      So my question is, if a table doesn’t have the low level “bump” sound on post rubbers, can it be easily added in a global kinda way or is it a matter of doing something for each and every post rubber?

      I ask because I’m using sound driven tactile feedback and the tables that have the post rubber “bump” sound, have that extra bit of realism to them. In fact, playing a table without them feels a bit odd now, so I would love to add them to some of my favourite tables if possible.

      Cheers, Rusty.

      #38448
      randr
      Keymaster
        @randr
        ModeratorMember

        Add all things you want to have that sound to a collection reference the name in collision sub in script for collision name. I think it’s usually rubbers for name of collection

        ********************************************************
        Messing with the VPinball app and push notifications.
        So if you haven't downloaded app yet what are you waiting for!?
        for IOS and Android

        ********************************************************

        #38455
        Daryl
        Participant
          @allknowing2012
          Member

          If you look most table scripts have default sounds scripted in (from a table->new for example) there is the following script.

          If you create a collection called for example Targets – and make it “Fire events for the collection”, it will perform this function for each hit & object in that collection.

           

          You were looking for Posts – so see that script below. Of course this assumes you have the related sound “<filename>” in the sound manager as well.

          Sub Targets_Hit (idx)

          PlaySound “target”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0

          End Sub

           

          Sub Metals_Thin_Hit (idx)

          PlaySound “metalhit_thin”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0

          End Sub

           

          Sub Metals_Medium_Hit (idx)

          PlaySound “metalhit_medium”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0

          End Sub

           

          Sub Metals2_Hit (idx)

          PlaySound “metalhit2”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0

          End Sub

           

          Sub Gates_Hit (idx)

          PlaySound “gate4”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0

          End Sub

           

          Sub Spinner_Spin

          PlaySound “fx_spinner”,0,.25,0,0.25

          End Sub

           

          Sub Rubbers_Hit(idx)

          dim finalspeed

          finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)

          If finalspeed > 20 then

          PlaySound “fx_rubber2”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0

          End if

          If finalspeed >= 6 AND finalspeed <= 20 then

          RandomSoundRubber()

          End If

          End Sub

           

          Sub Posts_Hit(idx)

          dim finalspeed

          finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)

          If finalspeed > 16 then

          PlaySound “fx_rubber2”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0

          End if

          If finalspeed >= 6 AND finalspeed <= 16 then

          RandomSoundRubber()

          End If

          End Sub

           

           

          #38461
          RustyCardores
          Moderator
            @rustycardores
            MemberModerator

            thanks guys.  It’s 5am here, give me a bit to wake up and down a few coffees and I’ll try and figure it out. ;)

            btw…. I did say to myself yesterday that I wasn’t going to “spend any time on the pinCab today and that I was going to do some real work”…. looks like work will have to wait for another day. ;)

            #38463
            Ben Logan2
            Participant
              @benlogan2
              Member

              Great topic. How about adding the flipper rubber collision sound that’s featured on many of JP’s tables? Similar process? I love those sounds.

              #38465
              nFozzy
              Participant
                @nfozzy

                Nearly all tables have the sounds, the collections, with the corresponding scripting – they’re all elements in the default table. So it’s easy to fix. Check that the sound collections aren’t empty (f8 brings up the collection menu) and make sure all the individual objects in the collection have ‘has hit event’ checked.

                1 user thanked author for this post.
                #38467
                Drybonz
                Participant
                  @drybonz
                  Member

                  I don’t have any checkboxes for hit events in the collection menu. Maybe I am misunderstanding where I should be looking?

                  #38474
                  nFozzy
                  Participant
                    @nfozzy

                    On the objects themselves under ‘Physics’, every wall/primitive/rubber in the collection has to have ‘has hit event’ checked

                    #38481
                    Drybonz
                    Participant
                      @drybonz
                      Member

                      Ok, thanks for the info Fozzy.

                      #38500
                      RustyCardores
                      Moderator
                        @rustycardores
                        MemberModerator

                        Cheers Fozzy, I’ll see what I can do.

                        #38528
                        Daryl
                        Participant
                          @allknowing2012
                          Member

                          I don’t have any checkboxes for hit events in the collection menu. Maybe I am misunderstanding where I should be looking?

                          What I would do is double check – verify – add a msgbox “Sound was called” line in the various scripts to ensure they are being called.

                          Once you verify then of course remove the msgbox line.
                          Sub Posts_Hit(idx)
                          dim finalspeed
                          msgbox “Posts_hit”
                          finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
                          etc

                          #38541
                          RustyCardores
                          Moderator
                            @rustycardores
                            MemberModerator

                            OK I have added the sound.

                            I have checked the sound collection (F8) is not empty

                            I have checked that all items within that collection has “has hit event” ticked.

                            Now, looking at the script I noticed that there was nothing like the following that I see in other tables right above the RandomSound portion of the script….

                            Sub Posts_Hit(idx)
                            dim finalspeed
                            finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
                            If finalspeed > 16 then<
                            PlaySound “fx_rubber2”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
                            End if
                            If finalspeed >= 6 AND finalspeed <= 16 then
                            RandomSoundRubber()
                            End If
                            End Sub
                            So I had a crack at adding the above.  The table plays, but as soon as a ball makes contact with one of the posts, I get a Variable Undefined ‘vol’ error message.

                            I’m probably way off the mark as to what I should be doing, but in my defence I did mention right at the beginning that I have no clue about building tables.  :scratch:  lol

                            #38543
                            Daryl
                            Participant
                              @allknowing2012
                              Member

                              In VPX do a table new – and look at the scripts there. The examples I pasted here come straight from there.

                              I didnt paste all the supporting scripts  – again they are in the “table new” script. So grab them from there.

                              1 user thanked author for this post.
                              #38544
                              randr
                              Keymaster
                                @randr
                                ModeratorMember

                                Sounds like you didn’t copy the complete collision/rolling script.

                                ********************************************************
                                Messing with the VPinball app and push notifications.
                                So if you haven't downloaded app yet what are you waiting for!?
                                for IOS and Android

                                ********************************************************

                                #38545
                                RustyCardores
                                Moderator
                                  @rustycardores
                                  MemberModerator

                                  I have it working now. I simply removed everything after PlaySound “fx_rubber2” and went straight to End Sub

                                   

                                  #39396
                                  RustyCardores
                                  Moderator
                                    @rustycardores
                                    MemberModerator

                                    I’ve just added bump sounds to a recently updated table and … if you allow to veer a little off topic… it reminded me of something I tried to figure out how to do ages ago.

                                    I’m not sure if I asked it here or on another forum, but what I want to do, is have 2 “sound events” for one “collision event”.  The reason being, is that I want ONLY my bumper sounds to play across two sound devices. (yeah I know…. it’s to do with that darn Poor Man’s DOF that I bang on about all the time. :wacko:  I want to hear the bumpers from the back of the cab, as well as hear and feel them from the front tactile drivers)

                                    I learned a little from this thread, so I tried a duplicating the bumper sound subs in the script and had them call a duplicate (renamed) version of the bumper sound (that I toggled to the secondary output), but that didn’t work. It simply played the duplicate routine. :(

                                    Anyone got any ideas on this and if it’s even possible?

                                  Viewing 16 posts - 1 through 16 (of 16 total)

                                  Forums are currently locked.

                                  ©2024 VPinBall.com

                                  Log in with your credentials

                                  Forgot your details?